Skip to content

Commit 84580d1

Browse files
dcramerclaude
andcommitted
fix: Improve visibility of actionable CLI commands
Commands in hints and error messages were using colors.dim, making them hard to notice. Now using colors.bold for important fix commands (dex doctor --fix) and colors.cyan for hints/suggestions (dex help, dex init, dex list --all, etc.). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent c91dc4f commit 84580d1

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

src/cli/args.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export function parseArgs(
201201
}
202202

203203
const cmd = commandName ? `dex ${commandName}` : "dex <command>";
204-
errorMsg += `\nRun '${colors.dim}${cmd} --help${colors.reset}' for usage.`;
204+
errorMsg += `\nRun ${colors.cyan}${cmd} --help${colors.reset} for usage.`;
205205

206206
console.error(errorMsg);
207207
process.exit(1);

src/cli/config.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function exitUnknownKey(key: string): never {
9292
`${colors.red}Error:${colors.reset} Unknown config key: ${key}`,
9393
);
9494
console.error(
95-
`Run "${colors.dim}dex config --help${colors.reset}" for available keys.`,
95+
`Run ${colors.cyan}dex config --help${colors.reset} for available keys.`,
9696
);
9797
process.exit(1);
9898
}
@@ -266,14 +266,14 @@ ${colors.bold}EXAMPLES:${colors.reset}
266266
`${colors.red}Error:${colors.reset} --local requires being in a dex project`,
267267
);
268268
console.error(
269-
`${colors.dim}Run "dex init" to initialize a project or use --global${colors.reset}`,
269+
`Run ${colors.cyan}dex init${colors.reset} to initialize a project or use ${colors.cyan}--global${colors.reset}`,
270270
);
271271
process.exit(1);
272272
}
273273
const projectPath = getProjectConfigPath();
274274
if (!projectPath) {
275275
console.error(
276-
`${colors.dim}Run "dex init" to initialize a git repository or use --global${colors.reset}`,
276+
`Run ${colors.cyan}dex init${colors.reset} to initialize a git repository or use ${colors.cyan}--global${colors.reset}`,
277277
);
278278
process.exit(1);
279279
}
@@ -318,7 +318,7 @@ ${colors.bold}EXAMPLES:${colors.reset}
318318
console.error(`${colors.red}Error:${colors.reset} Missing config key`);
319319
console.error(`Usage: dex config <key>[=<value>]`);
320320
console.error(
321-
`Run "${colors.dim}dex config --help${colors.reset}" for available keys.`,
321+
`Run ${colors.cyan}dex config --help${colors.reset} for available keys.`,
322322
);
323323
process.exit(1);
324324
}
@@ -394,7 +394,7 @@ ${colors.bold}EXAMPLES:${colors.reset}
394394
`${colors.dim}Existing tasks will NOT be automatically migrated.${colors.reset}`,
395395
);
396396
console.log(
397-
`${colors.dim}Run 'dex doctor --fix' after this change to migrate tasks.${colors.reset}`,
397+
`Run ${colors.bold}dex doctor --fix${colors.reset} after this change to migrate tasks.`,
398398
);
399399
console.log("");
400400
}

src/cli/doctor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ ${colors.bold}EXAMPLES:${colors.reset}
170170
console.log(`\nFixed ${fixed} issue(s).`);
171171
} else if (fixable > 0 && !shouldFix) {
172172
console.log(
173-
`\n${colors.dim}Run 'dex doctor --fix' to fix ${fixable} issue(s).${colors.reset}`,
173+
`\nRun ${colors.bold}dex doctor --fix${colors.reset} to fix ${fixable} issue(s).`,
174174
);
175175
}
176176
}

src/cli/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export async function runCli(
112112
);
113113
}
114114
console.error(
115-
`Run "${colors.dim}dex help${colors.reset}" for usage information.`,
115+
`Run ${colors.cyan}dex help${colors.reset} for usage information.`,
116116
);
117117
process.exit(1);
118118
}

src/cli/status.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ ${colors.bold}EXAMPLES:${colors.reset}
334334
if (readyTasks.length > READY_LIMIT) {
335335
const remaining = readyTasks.length - READY_LIMIT;
336336
console.log(
337-
`${colors.dim}... and ${remaining} more (dex list --ready)${colors.reset}`,
337+
`${colors.dim}... and ${remaining} more${colors.reset} ${colors.cyan}dex list --ready${colors.reset}`,
338338
);
339339
}
340340
}

src/cli/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@ export function createService(options: CliOptions): TaskService {
3434
export async function exitIfTaskNotFound(
3535
task: Task | null,
3636
id: string,
37-
service: TaskService
37+
service: TaskService,
3838
): Promise<Task> {
3939
if (task) return task;
4040
console.error(
41-
`${colors.red}Error:${colors.reset} Task ${colors.bold}${id}${colors.reset} not found`
41+
`${colors.red}Error:${colors.reset} Task ${colors.bold}${id}${colors.reset} not found`,
4242
);
4343
const allTasks = await service.list({ all: true });
4444
if (allTasks.length > 0) {
4545
console.error(
46-
`${colors.dim}Hint: Run "dex list --all" to see all tasks${colors.reset}`
46+
`${colors.dim}Hint:${colors.reset} Run ${colors.cyan}dex list --all${colors.reset} to see all tasks`,
4747
);
4848
}
4949
process.exit(1);

0 commit comments

Comments
 (0)