trismegistus 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +19 -7
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -151,13 +151,11 @@ function initProject(projectDir) {
|
|
|
151
151
|
if (!existsSync(claudeCommandsDir)) {
|
|
152
152
|
mkdirSync(claudeCommandsDir, { recursive: true });
|
|
153
153
|
}
|
|
154
|
-
const
|
|
155
|
-
{ name: CONFIG_FILE, content: CONFIG_TEMPLATE },
|
|
154
|
+
const userFiles = [
|
|
156
155
|
{ name: TASKS_FILE, content: TASKS_TEMPLATE },
|
|
157
|
-
{ name: NOTES_FILE, content: NOTES_TEMPLATE }
|
|
158
|
-
{ name: README_FILE, content: README_TEMPLATE }
|
|
156
|
+
{ name: NOTES_FILE, content: NOTES_TEMPLATE }
|
|
159
157
|
];
|
|
160
|
-
for (const file of
|
|
158
|
+
for (const file of userFiles) {
|
|
161
159
|
const path = join(tmgDir, file.name);
|
|
162
160
|
if (existsSync(path)) {
|
|
163
161
|
result.skipped.push(file.name);
|
|
@@ -166,6 +164,16 @@ function initProject(projectDir) {
|
|
|
166
164
|
result.created.push(file.name);
|
|
167
165
|
}
|
|
168
166
|
}
|
|
167
|
+
const managedFiles = [
|
|
168
|
+
{ name: CONFIG_FILE, content: CONFIG_TEMPLATE },
|
|
169
|
+
{ name: README_FILE, content: README_TEMPLATE }
|
|
170
|
+
];
|
|
171
|
+
for (const file of managedFiles) {
|
|
172
|
+
const path = join(tmgDir, file.name);
|
|
173
|
+
const exists = existsSync(path);
|
|
174
|
+
writeFileSync(path, file.content);
|
|
175
|
+
result.created.push(`${file.name}${exists ? " (updated)" : ""}`);
|
|
176
|
+
}
|
|
169
177
|
for (const cmd of CLAUDE_COMMANDS) {
|
|
170
178
|
const path = join(claudeCommandsDir, cmd.name);
|
|
171
179
|
const exists = existsSync(path);
|
|
@@ -649,10 +657,14 @@ program.name("tmg").description("Trismegistus \u2014 Task Manager for Claude Cod
|
|
|
649
657
|
program.command("init").description("Create .trismegistus/ folder in current directory").action(() => {
|
|
650
658
|
const result = initProject(process.cwd());
|
|
651
659
|
for (const name of result.created) {
|
|
652
|
-
|
|
660
|
+
if (name.endsWith("(updated)")) {
|
|
661
|
+
console.log(` Updated ${name.replace(" (updated)", "")}`);
|
|
662
|
+
} else {
|
|
663
|
+
console.log(` Created ${name}`);
|
|
664
|
+
}
|
|
653
665
|
}
|
|
654
666
|
for (const name of result.skipped) {
|
|
655
|
-
console.log(` Skipped ${name}
|
|
667
|
+
console.log(` Skipped ${name}`);
|
|
656
668
|
}
|
|
657
669
|
console.log("");
|
|
658
670
|
console.log(" Add your tasks to .trismegistus/tasks.md, then run: tmg start");
|