coder-config 0.45.7 → 0.45.9

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/lib/cli.js CHANGED
@@ -5,6 +5,7 @@
5
5
  const fs = require('fs');
6
6
  const path = require('path');
7
7
  const os = require('os');
8
+ const chalk = require('chalk');
8
9
  const { VERSION, TOOL_PATHS } = require('./constants');
9
10
 
10
11
  /**
@@ -323,39 +324,22 @@ function runCli(manager) {
323
324
  function printHelp() {
324
325
  const showLoops = isRalphLoopsEnabled();
325
326
 
326
- // ANSI color codes
327
- const c = {
328
- reset: '\x1b[0m',
329
- bold: '\x1b[1m',
330
- dim: '\x1b[2m',
331
- cyan: '\x1b[36m',
332
- green: '\x1b[32m',
333
- yellow: '\x1b[33m',
334
- blue: '\x1b[34m',
335
- magenta: '\x1b[35m',
336
- white: '\x1b[37m',
337
- };
338
-
339
- // Check if colors should be disabled
340
- const noColor = process.env.NO_COLOR || process.env.TERM === 'dumb';
341
- if (noColor) {
342
- Object.keys(c).forEach(k => c[k] = '');
343
- }
344
-
345
327
  // Helper to format a command line
346
328
  const cmd = (name, desc) => {
347
329
  const paddedName = name.padEnd(32);
348
- return `${c.cyan}${paddedName}${c.reset}${desc}`;
330
+ return `${chalk.cyan(paddedName)}${desc}`;
349
331
  };
350
332
 
351
333
  // Helper to create a boxed section
352
334
  const box = (title, lines) => {
353
- const maxLen = Math.max(...lines.map(l => l.replace(/\x1b\[[0-9;]*m/g, '').length), title.length + 4);
335
+ // Strip ANSI codes for length calculation
336
+ const stripAnsi = (str) => str.replace(/\x1b\[[0-9;]*m/g, '');
337
+ const maxLen = Math.max(...lines.map(l => stripAnsi(l).length), title.length + 4);
354
338
  const width = Math.min(maxLen + 2, 80);
355
- const top = `┌─ ${c.bold}${title}${c.reset} ${'─'.repeat(Math.max(0, width - title.length - 5))}┐`;
339
+ const top = `┌─ ${chalk.bold(title)} ${'─'.repeat(Math.max(0, width - title.length - 5))}┐`;
356
340
  const bot = `└${'─'.repeat(width)}┘`;
357
341
  const content = lines.map(l => {
358
- const stripped = l.replace(/\x1b\[[0-9;]*m/g, '');
342
+ const stripped = stripAnsi(l);
359
343
  const padding = Math.max(0, width - stripped.length - 1);
360
344
  return `│ ${l}${' '.repeat(padding)}│`;
361
345
  }).join('\n');
@@ -364,15 +348,15 @@ function printHelp() {
364
348
 
365
349
  // Header
366
350
  console.log(`
367
- ${c.yellow}Usage:${c.reset} ${c.bold}coder-config${c.reset} [OPTIONS] ${c.cyan}COMMAND${c.reset} [ARGS]...
351
+ ${chalk.yellow('Usage:')} ${chalk.bold('coder-config')} [OPTIONS] ${chalk.cyan('COMMAND')} [ARGS]...
368
352
 
369
- ${c.dim}Configuration manager for AI coding tools (Claude Code, Gemini CLI, Codex CLI)${c.reset}
353
+ ${chalk.dim('Configuration manager for AI coding tools (Claude Code, Gemini CLI, Codex CLI)')}
370
354
  `);
371
355
 
372
356
  // Options section
373
357
  console.log(box('Options', [
374
- `${c.green}--version${c.reset} ${c.dim}-v${c.reset} Show version and exit`,
375
- `${c.green}--help${c.reset} ${c.dim}-h${c.reset} Show this message and exit`,
358
+ `${chalk.green('--version')} ${chalk.dim('-v')} Show version and exit`,
359
+ `${chalk.green('--help')} ${chalk.dim('-h')} Show this message and exit`,
376
360
  ]));
377
361
  console.log();
378
362
 
@@ -458,11 +442,11 @@ ${c.dim}Configuration manager for AI coding tools (Claude Code, Gemini CLI, Code
458
442
  console.log();
459
443
 
460
444
  // Examples
461
- console.log(`${c.yellow}Examples:${c.reset}`);
462
- console.log(` ${c.dim}$${c.reset} coder-config init`);
463
- console.log(` ${c.dim}$${c.reset} coder-config add postgres github`);
464
- console.log(` ${c.dim}$${c.reset} coder-config memory add preference "Use TypeScript"`);
465
- console.log(` ${c.dim}$${c.reset} coder-config ui`);
445
+ console.log(chalk.yellow('Examples:'));
446
+ console.log(` ${chalk.dim('$')} coder-config init`);
447
+ console.log(` ${chalk.dim('$')} coder-config add postgres github`);
448
+ console.log(` ${chalk.dim('$')} coder-config memory add preference "Use TypeScript"`);
449
+ console.log(` ${chalk.dim('$')} coder-config ui`);
466
450
  console.log();
467
451
  }
468
452
 
package/lib/constants.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * Constants and tool path configurations
3
3
  */
4
4
 
5
- const VERSION = '0.45.7';
5
+ const VERSION = '0.45.9';
6
6
 
7
7
  // Tool-specific path configurations
8
8
  const TOOL_PATHS = {
@@ -1198,6 +1198,8 @@ _coder_workstream_cd() {
1198
1198
  }
1199
1199
  # Only alias cd in interactive shells (avoid breaking scripts/Claude Code)
1200
1200
  [[ $- == *i* ]] && alias cd='_coder_workstream_cd'
1201
+ # Pass through cd completions to the wrapper function (zsh only)
1202
+ [[ -n "$ZSH_VERSION" ]] && compdef _cd _coder_workstream_cd
1201
1203
  ${endMarker}
1202
1204
  `;
1203
1205
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coder-config",
3
- "version": "0.45.7",
3
+ "version": "0.45.9",
4
4
  "description": "Configuration manager for AI coding tools - Claude Code, Gemini CLI, Codex CLI, Antigravity. Manage MCPs, rules, permissions, memory, and workstreams.",
5
5
  "author": "regression.io",
6
6
  "main": "config-loader.js",
@@ -42,6 +42,7 @@
42
42
  "license": "MIT",
43
43
  "dependencies": {
44
44
  "@iarna/toml": "^3.0.0",
45
+ "chalk": "^4.1.2",
45
46
  "js-yaml": "^4.1.1",
46
47
  "node-pty": "^1.1.0",
47
48
  "ws": "^8.19.0"