@cortices/agent 0.3.18 → 0.3.20

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,41 @@ 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
+ upgrade Check for updates and upgrade all agents
26
+ list List installed agent services
27
+ status Show agent service status
28
+
29
+ Run options:
30
+ --agent TYPE Agent backend: claude (default), codex, opencode, native
31
+ --dir DIR Working directory (default: current directory)
32
+ --name NAME Agent name shown in dashboard
33
+ --api-key KEY Cortices API key for authentication
34
+ --interactive Start with interactive permission mode
35
+
36
+ Examples:
37
+ cortices install --api-key ck_xxx --dir /path/to/project --name my-agent
38
+ cortices restart my-agent
39
+ cortices list
40
+ cortices --api-key ck_xxx --dir /path/to/project # run in foreground`)
41
+ process.exit(0)
42
+ }
43
+
44
+ // Determine agent type from --agent flag (default: claude)
12
45
  let agentType = 'claude'
13
46
  const agentIdx = args.indexOf('--agent')
14
47
  if (agentIdx !== -1 && args[agentIdx + 1]) {