@cortices/agent 0.3.17 → 0.3.19

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/cortices.mjs CHANGED
@@ -7,8 +7,40 @@ import { execFileSync } from 'child_process'
7
7
 
8
8
  const __dirname = dirname(fileURLToPath(import.meta.url))
9
9
 
10
- // Determine agent type from --agent flag (default: claude)
11
10
  const args = process.argv.slice(2)
11
+ const SERVICE_COMMANDS = ['install', 'uninstall', 'restart', 'list', 'status']
12
+
13
+ // Show top-level help
14
+ if (args.length === 0 || args[0] === '-h' || args[0] === '--help') {
15
+ console.log(`cortices — AI agent dashboard CLI
16
+
17
+ Usage:
18
+ cortices <command> [options]
19
+ cortices [options] Run agent in foreground (default: claude)
20
+
21
+ Commands:
22
+ install Install agent as a background service
23
+ uninstall Remove agent service
24
+ restart Restart agent service(s)
25
+ list List installed agent services
26
+ status Show agent service status
27
+
28
+ Run options:
29
+ --agent TYPE Agent backend: claude (default), codex, opencode, native
30
+ --dir DIR Working directory (default: current directory)
31
+ --name NAME Agent name shown in dashboard
32
+ --api-key KEY Cortices API key for authentication
33
+ --interactive Start with interactive permission mode
34
+
35
+ Examples:
36
+ cortices install --api-key ck_xxx --dir /path/to/project --name my-agent
37
+ cortices restart my-agent
38
+ cortices list
39
+ cortices --api-key ck_xxx --dir /path/to/project # run in foreground`)
40
+ process.exit(0)
41
+ }
42
+
43
+ // Determine agent type from --agent flag (default: claude)
12
44
  let agentType = 'claude'
13
45
  const agentIdx = args.indexOf('--agent')
14
46
  if (agentIdx !== -1 && args[agentIdx + 1]) {