shadowdocs 2.5.3 → 2.5.5

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/bin/cli.js CHANGED
@@ -5,14 +5,20 @@ import { loadConfig, saveConfig } from '../dist/core/config.js';
5
5
  import { validateApiKey } from '../dist/services/ai.js';
6
6
  import { ExitCodes } from '../dist/core/types.js';
7
7
  import readline from 'readline';
8
+ import chalk from 'chalk';
8
9
 
9
10
  async function main() {
10
11
  process.stdout.write("\x1b[2J\x1b[H");
11
12
 
12
13
  const args = process.argv.slice(2);
14
+ const isInteractive = process.stdin.isTTY && process.stdout.isTTY;
13
15
 
14
16
  if (args.length === 0) {
15
- startApp();
17
+ if (isInteractive) {
18
+ startApp();
19
+ } else {
20
+ await runNonInteractive();
21
+ }
16
22
  return;
17
23
  }
18
24
 
@@ -82,7 +88,7 @@ async function main() {
82
88
  }
83
89
 
84
90
  if (command === '--version' || command === '-v') {
85
- console.log('2.0.0');
91
+ console.log('2.5.4');
86
92
  return;
87
93
  }
88
94
 
@@ -106,4 +112,21 @@ async function main() {
106
112
  main().catch((err) => {
107
113
  console.error(' Error:', err.message);
108
114
  process.exit(ExitCodes.FATAL_INPUT_ERROR);
109
- });
115
+ });
116
+
117
+ async function runNonInteractive() {
118
+ console.log('');
119
+ console.log(chalk.cyan.bold('╔══════════════════════════════════════════╗'));
120
+ console.log(chalk.cyan.bold('║ SHADOWDOCS CLI ║'));
121
+ console.log(chalk.cyan.bold('╚══════════════════════════════════════════╝'));
122
+ console.log('');
123
+ console.log(chalk.yellow(' Commands:'));
124
+ console.log(chalk.white(' g - Generate Docs'));
125
+ console.log(chalk.white(' i - Improve Docs'));
126
+ console.log(chalk.white(' e - Explain Project'));
127
+ console.log(chalk.white(' s - Settings'));
128
+ console.log(chalk.white(' h - Help'));
129
+ console.log(chalk.white(' q - Quit'));
130
+ console.log('');
131
+ console.log(chalk.dim(' Run in a real terminal for full interactive UI.'));
132
+ }
@@ -29,6 +29,6 @@ export default function Menu({ onSelect }) {
29
29
  }
30
30
  }
31
31
  });
32
- return (_jsxs(Box, { flexDirection: "column", borderStyle: "bold", borderColor: "cyan", padding: 1, children: [_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Box, { children: ['S', 'H', 'A', 'D', 'O', 'W', 'D', 'O', 'C', 'S'].map((letter, i) => (_jsx(Text, { bold: true, color: rainbowColors[i], children: letter }, i))) }), _jsx(Text, { bold: true, color: "yellow", children: '═'.repeat(21) })] }), _jsx(Text, { bold: true, color: "cyan", children: "\u25B6 COMMANDS" }), _jsx(Text, { dimColor: true, children: '─'.repeat(20) }), menuItems.map((item, index) => (_jsx(Box, { flexDirection: "column", marginBottom: 1, children: index === selectedIndex ? (_jsxs(_Fragment, { children: [_jsxs(Text, { bold: true, color: "yellow", children: [" \u25B6 [", item.key, "]"] }), _jsxs(Text, { bold: true, color: "green", children: [" \u25B6 ", item.label] }), _jsxs(Text, { dimColor: true, children: [" ", item.desc] })] })) : (_jsxs(Text, { children: [" [", item.key, "] ", item.label] })) }, item.key))), _jsx(Text, { children: "\n" }), _jsx(Text, { bold: true, color: "cyan", children: "\u25B6 NAVIGATION" }), _jsx(Text, { dimColor: true, children: '─'.repeat(20) }), _jsx(Text, { color: "green", children: " w/\u2191 : Up s/\u2193 : Down" }), _jsx(Text, { color: "green", children: " Enter : Select q : Quit" }), _jsx(Text, { color: "green", children: " g/i/e/s/h : Quick select" }), _jsx(Text, { children: "\n" }), _jsx(Text, { bold: true, color: "yellow", children: '═'.repeat(21) }), _jsx(Text, { bold: true, color: "magenta", children: " Version 2.4.1 " }), _jsx(Text, { bold: true, color: "yellow", children: '═'.repeat(21) })] }));
32
+ return (_jsxs(Box, { flexDirection: "column", borderStyle: "bold", borderColor: "cyan", padding: 1, children: [_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Box, { children: ['S', 'H', 'A', 'D', 'O', 'W', 'D', 'O', 'C', 'S'].map((letter, i) => (_jsx(Text, { bold: true, color: rainbowColors[i], children: letter }, i))) }), _jsx(Text, { bold: true, color: "yellow", children: '═'.repeat(21) })] }), _jsx(Text, { bold: true, color: "cyan", children: "\u25B6 COMMANDS" }), _jsx(Text, { dimColor: true, children: '─'.repeat(20) }), menuItems.map((item, index) => (_jsx(Box, { flexDirection: "column", marginBottom: 1, children: index === selectedIndex ? (_jsxs(_Fragment, { children: [_jsxs(Text, { bold: true, color: "yellow", children: [" \u25B6 [", item.key, "]"] }), _jsxs(Text, { bold: true, color: "green", children: [" \u25B6 ", item.label] }), _jsxs(Text, { dimColor: true, children: [" ", item.desc] })] })) : (_jsxs(Text, { children: [" [", item.key, "] ", item.label] })) }, item.key))), _jsx(Text, { children: "\n" }), _jsx(Text, { bold: true, color: "cyan", children: "\u25B6 NAVIGATION" }), _jsx(Text, { dimColor: true, children: '─'.repeat(20) }), _jsx(Text, { color: "green", children: " w/\u2191 : Up s/\u2193 : Down" }), _jsx(Text, { color: "green", children: " Enter : Select q : Quit" }), _jsx(Text, { color: "green", children: " g/i/e/s/h : Quick select" }), _jsx(Text, { children: "\n" }), _jsx(Text, { bold: true, color: "yellow", children: '═'.repeat(21) }), _jsx(Text, { bold: true, color: "magenta", children: " Version 2.5.4 " }), _jsx(Text, { bold: true, color: "yellow", children: '═'.repeat(21) })] }));
33
33
  }
34
34
  //# sourceMappingURL=Menu.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shadowdocs",
3
- "version": "2.5.3",
3
+ "version": "2.5.5",
4
4
  "description": "AI-powered documentation generator for developer projects",
5
5
  "type": "module",
6
6
  "main": "dist/interactive.js",
@@ -77,7 +77,7 @@ export default function Menu({ onSelect }: MenuProps) {
77
77
 
78
78
  <Text>{"\n"}</Text>
79
79
  <Text bold color="yellow">{'═'.repeat(21)}</Text>
80
- <Text bold color="magenta"> Version 2.4.1 </Text>
80
+ <Text bold color="magenta"> Version 2.5.4 </Text>
81
81
  <Text bold color="yellow">{'═'.repeat(21)}</Text>
82
82
  </Box>
83
83
  );