trismegistus 1.1.0 → 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 +22 -13
- 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,14 +164,21 @@ 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
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
writeFileSync(path, cmd.content);
|
|
175
|
-
result.created.push(`.claude/commands/${cmd.name}`);
|
|
176
|
-
}
|
|
179
|
+
const exists = existsSync(path);
|
|
180
|
+
writeFileSync(path, cmd.content);
|
|
181
|
+
result.created.push(`.claude/commands/${cmd.name}${exists ? " (updated)" : ""}`);
|
|
177
182
|
}
|
|
178
183
|
const gitignorePath = join(projectDir, ".gitignore");
|
|
179
184
|
let gitignoreContent = existsSync(gitignorePath) ? readFileSync(gitignorePath, "utf-8") : "";
|
|
@@ -652,10 +657,14 @@ program.name("tmg").description("Trismegistus \u2014 Task Manager for Claude Cod
|
|
|
652
657
|
program.command("init").description("Create .trismegistus/ folder in current directory").action(() => {
|
|
653
658
|
const result = initProject(process.cwd());
|
|
654
659
|
for (const name of result.created) {
|
|
655
|
-
|
|
660
|
+
if (name.endsWith("(updated)")) {
|
|
661
|
+
console.log(` Updated ${name.replace(" (updated)", "")}`);
|
|
662
|
+
} else {
|
|
663
|
+
console.log(` Created ${name}`);
|
|
664
|
+
}
|
|
656
665
|
}
|
|
657
666
|
for (const name of result.skipped) {
|
|
658
|
-
console.log(` Skipped ${name}
|
|
667
|
+
console.log(` Skipped ${name}`);
|
|
659
668
|
}
|
|
660
669
|
console.log("");
|
|
661
670
|
console.log(" Add your tasks to .trismegistus/tasks.md, then run: tmg start");
|