@shepai/cli 1.6.0 → 1.6.1

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.
Files changed (58) hide show
  1. package/dist/src/presentation/cli/commands/settings/show.command.d.ts.map +1 -1
  2. package/dist/src/presentation/cli/commands/settings/show.command.js +16 -18
  3. package/dist/src/presentation/cli/ui/index.d.ts +1 -1
  4. package/dist/src/presentation/cli/ui/index.d.ts.map +1 -1
  5. package/dist/src/presentation/cli/ui/output.d.ts +5 -4
  6. package/dist/src/presentation/cli/ui/output.d.ts.map +1 -1
  7. package/dist/src/presentation/cli/ui/output.js +6 -7
  8. package/dist/src/presentation/cli/ui/tables.d.ts +10 -5
  9. package/dist/src/presentation/cli/ui/tables.d.ts.map +1 -1
  10. package/dist/src/presentation/cli/ui/tables.js +62 -17
  11. package/dist/tsconfig.build.tsbuildinfo +1 -1
  12. package/package.json +1 -1
  13. package/web/.next/BUILD_ID +1 -1
  14. package/web/.next/build-manifest.json +2 -2
  15. package/web/.next/cache/.previewinfo +1 -1
  16. package/web/.next/cache/.rscinfo +1 -1
  17. package/web/.next/cache/config.json +3 -3
  18. package/web/.next/fallback-build-manifest.json +2 -2
  19. package/web/.next/prerender-manifest.json +3 -3
  20. package/web/.next/server/app/_global-error.html +2 -2
  21. package/web/.next/server/app/_global-error.rsc +1 -1
  22. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  23. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  24. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  25. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  26. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  27. package/web/.next/server/app/_not-found.html +2 -2
  28. package/web/.next/server/app/_not-found.rsc +1 -1
  29. package/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  30. package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  31. package/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  32. package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  33. package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  34. package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  35. package/web/.next/server/app/index.html +2 -2
  36. package/web/.next/server/app/index.rsc +1 -1
  37. package/web/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  38. package/web/.next/server/app/index.segments/_full.segment.rsc +1 -1
  39. package/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
  40. package/web/.next/server/app/index.segments/_index.segment.rsc +1 -1
  41. package/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  42. package/web/.next/server/app/version.html +2 -2
  43. package/web/.next/server/app/version.rsc +1 -1
  44. package/web/.next/server/app/version.segments/_full.segment.rsc +1 -1
  45. package/web/.next/server/app/version.segments/_head.segment.rsc +1 -1
  46. package/web/.next/server/app/version.segments/_index.segment.rsc +1 -1
  47. package/web/.next/server/app/version.segments/_tree.segment.rsc +1 -1
  48. package/web/.next/server/app/version.segments/version/__PAGE__.segment.rsc +1 -1
  49. package/web/.next/server/app/version.segments/version.segment.rsc +1 -1
  50. package/web/.next/server/pages/404.html +2 -2
  51. package/web/.next/server/pages/500.html +2 -2
  52. package/web/.next/server/server-reference-manifest.js +1 -1
  53. package/web/.next/server/server-reference-manifest.json +1 -1
  54. package/web/.next/trace +1 -1
  55. package/web/.next/trace-build +1 -1
  56. /package/web/.next/static/{KEXMk8lvSdd16ntuo5U2V → tXmFlRBlP8T8QaqOrcoHM}/_buildManifest.js +0 -0
  57. /package/web/.next/static/{KEXMk8lvSdd16ntuo5U2V → tXmFlRBlP8T8QaqOrcoHM}/_clientMiddlewareManifest.json +0 -0
  58. /package/web/.next/static/{KEXMk8lvSdd16ntuo5U2V → tXmFlRBlP8T8QaqOrcoHM}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"show.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/settings/show.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAO5C;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CA6C3C"}
1
+ {"version":3,"file":"show.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/settings/show.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAO5C;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CA+B3C"}
@@ -13,7 +13,7 @@ import { OutputFormatter } from '../../ui/output.js';
13
13
  import { getShepDbPath } from '../../../../infrastructure/services/filesystem/shep-directory.service.js';
14
14
  import { getSettings } from '../../../../infrastructure/services/settings.service.js';
15
15
  import { statSync } from 'node:fs';
16
- import { messages, fmt } from '../../ui/index.js';
16
+ import { messages } from '../../ui/index.js';
17
17
  /**
18
18
  * Create the show settings command
19
19
  */
@@ -31,24 +31,10 @@ Examples:
31
31
  .action((options) => {
32
32
  try {
33
33
  const settings = getSettings();
34
- const output = OutputFormatter.format(settings, options.output);
34
+ // Build database metadata for table format
35
+ const dbMeta = options.output === 'table' ? getDatabaseMeta() : undefined;
36
+ const output = OutputFormatter.format(settings, options.output, dbMeta);
35
37
  console.log(output);
36
- // Show database metadata for table format
37
- if (options.output === 'table') {
38
- const dbPath = getShepDbPath();
39
- let sizeStr = 'unknown';
40
- try {
41
- const stats = statSync(dbPath);
42
- sizeStr = formatFileSize(stats.size);
43
- }
44
- catch {
45
- // File may not be accessible
46
- }
47
- messages.newline();
48
- console.log(fmt.heading('Database'));
49
- console.log(` ${fmt.label('Path:')} ${dbPath}`);
50
- console.log(` ${fmt.label('Size:')} ${sizeStr}`);
51
- }
52
38
  }
53
39
  catch (error) {
54
40
  const err = error instanceof Error ? error : new Error(String(error));
@@ -57,6 +43,18 @@ Examples:
57
43
  }
58
44
  });
59
45
  }
46
+ function getDatabaseMeta() {
47
+ const dbPath = getShepDbPath();
48
+ let size = 'unknown';
49
+ try {
50
+ const stats = statSync(dbPath);
51
+ size = formatFileSize(stats.size);
52
+ }
53
+ catch {
54
+ // File may not be accessible
55
+ }
56
+ return { path: dbPath, size };
57
+ }
60
58
  function formatFileSize(bytes) {
61
59
  if (bytes < 1024)
62
60
  return `${bytes} B`;
@@ -15,6 +15,6 @@ export { colors, type Colors } from './colors.js';
15
15
  export { symbols, type Symbols } from './symbols.js';
16
16
  export { fmt, type Formatters } from './formatters.js';
17
17
  export { messages, type Messages } from './messages.js';
18
- export { TableFormatter } from './tables.js';
18
+ export { TableFormatter, type DatabaseMeta } from './tables.js';
19
19
  export { OutputFormatter, type OutputFormat } from './output.js';
20
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC"}
@@ -2,12 +2,13 @@
2
2
  * Output Format Utilities
3
3
  *
4
4
  * Provides utilities for formatting output in multiple formats:
5
- * - Table (default, using cli-table3)
5
+ * - Table (default, clean text-based layout)
6
6
  * - JSON (structured data)
7
7
  * - YAML (human-readable structured data)
8
8
  *
9
9
  * @module output
10
10
  */
11
+ import { type DatabaseMeta } from './tables.js';
11
12
  export type OutputFormat = 'table' | 'json' | 'yaml';
12
13
  /**
13
14
  * Output formatter for multiple formats
@@ -16,11 +17,11 @@ export declare class OutputFormatter {
16
17
  /**
17
18
  * Formats data according to the specified output format
18
19
  */
19
- static format(data: unknown, format: OutputFormat): string;
20
+ static format(data: unknown, format: OutputFormat, dbMeta?: DatabaseMeta): string;
20
21
  /**
21
- * Formats data as a table
22
+ * Formats data as a clean text display
22
23
  */
23
- static formatAsTable(data: unknown): string;
24
+ static formatAsTable(data: unknown, dbMeta?: DatabaseMeta): string;
24
25
  /**
25
26
  * Formats data as JSON
26
27
  */
@@ -1 +1 @@
1
- {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/ui/output.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAErD;;GAEG;AACH,qBAAa,eAAe;IAC1B;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,GAAG,MAAM;IAW1D;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM;IAK3C;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM;IAI1C;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM;CAG3C"}
1
+ {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/ui/output.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAErD;;GAEG;AACH,qBAAa,eAAe;IAC1B;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,MAAM;IAWjF;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,MAAM;IAIlE;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM;IAI1C;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM;CAG3C"}
@@ -2,7 +2,7 @@
2
2
  * Output Format Utilities
3
3
  *
4
4
  * Provides utilities for formatting output in multiple formats:
5
- * - Table (default, using cli-table3)
5
+ * - Table (default, clean text-based layout)
6
6
  * - JSON (structured data)
7
7
  * - YAML (human-readable structured data)
8
8
  *
@@ -17,10 +17,10 @@ export class OutputFormatter {
17
17
  /**
18
18
  * Formats data according to the specified output format
19
19
  */
20
- static format(data, format) {
20
+ static format(data, format, dbMeta) {
21
21
  switch (format) {
22
22
  case 'table':
23
- return OutputFormatter.formatAsTable(data);
23
+ return OutputFormatter.formatAsTable(data, dbMeta);
24
24
  case 'json':
25
25
  return OutputFormatter.formatAsJSON(data);
26
26
  case 'yaml':
@@ -28,11 +28,10 @@ export class OutputFormatter {
28
28
  }
29
29
  }
30
30
  /**
31
- * Formats data as a table
31
+ * Formats data as a clean text display
32
32
  */
33
- static formatAsTable(data) {
34
- const table = TableFormatter.createSettingsTable(data);
35
- return table.toString();
33
+ static formatAsTable(data, dbMeta) {
34
+ return TableFormatter.createSettingsTable(data, dbMeta);
36
35
  }
37
36
  /**
38
37
  * Formats data as JSON
@@ -1,19 +1,24 @@
1
1
  /**
2
2
  * Table Formatting Utilities
3
3
  *
4
- * Provides utilities for rendering structured data as formatted tables
5
- * in the terminal using cli-table3.
4
+ * Provides clean text-based rendering for structured CLI output.
5
+ * Uses alignment, whitespace, and colors instead of box-drawing borders.
6
6
  *
7
7
  * @module tables
8
8
  */
9
- import Table from 'cli-table3';
9
+ export interface DatabaseMeta {
10
+ path: string;
11
+ size: string;
12
+ }
10
13
  /**
11
14
  * Table formatter for CLI output
12
15
  */
13
16
  export declare class TableFormatter {
17
+ private static readonly LABEL_WIDTH;
14
18
  /**
15
- * Creates a formatted table for settings data
19
+ * Creates a clean, formatted settings display string.
16
20
  */
17
- static createSettingsTable(settings: unknown): InstanceType<typeof Table>;
21
+ static createSettingsTable(settings: unknown, dbMeta?: DatabaseMeta): string;
22
+ private static section;
18
23
  }
19
24
  //# sourceMappingURL=tables.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/ui/tables.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,YAAY,CAAC;AAG/B;;GAEG;AACH,qBAAa,cAAc;IACzB;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,OAAO,GAAG,YAAY,CAAC,OAAO,KAAK,CAAC;CAwC1E"}
1
+ {"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/ui/tables.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAM;IAEzC;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,MAAM;IAgE5E,OAAO,CAAC,MAAM,CAAC,OAAO;CAcvB"}
@@ -1,32 +1,77 @@
1
1
  /**
2
2
  * Table Formatting Utilities
3
3
  *
4
- * Provides utilities for rendering structured data as formatted tables
5
- * in the terminal using cli-table3.
4
+ * Provides clean text-based rendering for structured CLI output.
5
+ * Uses alignment, whitespace, and colors instead of box-drawing borders.
6
6
  *
7
7
  * @module tables
8
8
  */
9
- import Table from 'cli-table3';
9
+ import { colors } from './colors.js';
10
+ import pc from 'picocolors';
10
11
  /**
11
12
  * Table formatter for CLI output
12
13
  */
13
14
  export class TableFormatter {
15
+ static LABEL_WIDTH = 15;
14
16
  /**
15
- * Creates a formatted table for settings data
17
+ * Creates a clean, formatted settings display string.
16
18
  */
17
- static createSettingsTable(settings) {
19
+ static createSettingsTable(settings, dbMeta) {
18
20
  const s = settings;
19
- const table = new Table({
20
- style: { head: [], border: [] },
21
- });
22
- // Models section
23
- table.push([{ colSpan: 2, content: 'Models', hAlign: 'center' }], ['Analyze', s.models.analyze], ['Requirements', s.models.requirements], ['Plan', s.models.plan], ['Implement', s.models.implement]);
24
- // User section
25
- table.push([{ colSpan: 2, content: 'User', hAlign: 'center' }], ['Name', s.user.name ?? '(not set)'], ['Email', s.user.email ?? '(not set)'], ['GitHub', s.user.githubUsername ?? '(not set)']);
26
- // Environment section
27
- table.push([{ colSpan: 2, content: 'Environment', hAlign: 'center' }], ['Editor', s.environment.defaultEditor], ['Shell', s.environment.shellPreference]);
28
- // System section
29
- table.push([{ colSpan: 2, content: 'System', hAlign: 'center' }], ['Auto-Update', String(s.system.autoUpdate)], ['Log Level', s.system.logLevel]);
30
- return table;
21
+ const lines = [];
22
+ lines.push(` ${pc.bold(colors.brand('Settings'))}`);
23
+ lines.push('');
24
+ // Models
25
+ lines.push(...TableFormatter.section('Models', [
26
+ ['Analyze', s.models.analyze],
27
+ ['Requirements', s.models.requirements],
28
+ ['Plan', s.models.plan],
29
+ ['Implement', s.models.implement],
30
+ ]));
31
+ // User
32
+ lines.push(...TableFormatter.section('User', [
33
+ ['Name', s.user.name],
34
+ ['Email', s.user.email],
35
+ ['GitHub', s.user.githubUsername],
36
+ ]));
37
+ // Environment
38
+ lines.push(...TableFormatter.section('Environment', [
39
+ ['Editor', s.environment.defaultEditor],
40
+ ['Shell', s.environment.shellPreference],
41
+ ]));
42
+ // System
43
+ lines.push(...TableFormatter.section('System', [
44
+ ['Auto-Update', String(s.system.autoUpdate)],
45
+ ['Log Level', s.system.logLevel],
46
+ ]));
47
+ // Agent
48
+ lines.push(...TableFormatter.section('Agent', [
49
+ ['Type', s.agent.type],
50
+ ['Auth', s.agent.authMethod],
51
+ ...(s.agent.token ? [['Token', '••••••••']] : []),
52
+ ]));
53
+ // Database
54
+ if (dbMeta) {
55
+ lines.push(...TableFormatter.section('Database', [
56
+ ['Path', dbMeta.path],
57
+ ['Size', dbMeta.size],
58
+ ]));
59
+ }
60
+ return lines.join('\n');
61
+ }
62
+ static section(title, rows) {
63
+ const lines = [];
64
+ lines.push(` ${pc.bold(title)}`);
65
+ for (const [label, value] of rows) {
66
+ const paddedLabel = label.padEnd(TableFormatter.LABEL_WIDTH);
67
+ if (value === undefined || value === null) {
68
+ lines.push(` ${colors.muted(paddedLabel)}${pc.italic(colors.muted('(not set)'))}`);
69
+ }
70
+ else {
71
+ lines.push(` ${colors.muted(paddedLabel)}${value}`);
72
+ }
73
+ }
74
+ lines.push('');
75
+ return lines;
31
76
  }
32
77
  }