@locusai/cli 0.8.0 → 0.9.0

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 (4) hide show
  1. package/README.md +154 -0
  2. package/bin/agent/worker.js +5924 -11488
  3. package/bin/locus.js +26027 -23148
  4. package/package.json +2 -2
package/README.md CHANGED
@@ -0,0 +1,154 @@
1
+ # @locusai/cli
2
+
3
+ Command-line interface for [Locus](https://locusai.dev) - an AI-native project management platform for engineering teams.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g @locusai/cli
9
+ ```
10
+
11
+ Or with other package managers:
12
+
13
+ ```bash
14
+ # pnpm
15
+ pnpm add -g @locusai/cli
16
+
17
+ # yarn
18
+ yarn global add @locusai/cli
19
+
20
+ # bun
21
+ bun add -g @locusai/cli
22
+ ```
23
+
24
+ ## Quick Start
25
+
26
+ ```bash
27
+ # Initialize Locus in your project
28
+ locus init
29
+
30
+ # Index your codebase for AI context
31
+ locus index
32
+
33
+ # Run an agent to work on tasks
34
+ locus run --api-key YOUR_API_KEY
35
+
36
+ # Execute a prompt with repository context
37
+ locus exec "Explain the authentication flow"
38
+ ```
39
+
40
+ ## Commands
41
+
42
+ ### `locus init`
43
+
44
+ Initialize Locus in the current directory. Creates the necessary configuration files and directory structure:
45
+
46
+ - `.locus/` - Configuration directory
47
+ - `.locus/config.json` - Project settings
48
+ - `.locus/LOCUS.md` - AI agent instructions
49
+
50
+ Running `init` on an already initialized project will update the configuration to the latest version.
51
+
52
+ ### `locus index`
53
+
54
+ Index the codebase for AI context. This analyzes your project structure and creates a searchable index that helps AI agents understand your codebase.
55
+
56
+ ```bash
57
+ locus index [options]
58
+
59
+ Options:
60
+ --dir <path> Project directory (default: current directory)
61
+ --model <name> AI model to use
62
+ --provider <name> AI provider: claude or codex (default: claude)
63
+ ```
64
+
65
+ ### `locus run`
66
+
67
+ Start an agent to work on tasks from your Locus workspace.
68
+
69
+ ```bash
70
+ locus run [options]
71
+
72
+ Options:
73
+ --api-key <key> Your Locus API key (required)
74
+ --workspace <id> Workspace ID to connect to
75
+ --sprint <id> Sprint ID to work on
76
+ --model <name> AI model to use
77
+ --provider <name> AI provider: claude or codex (default: claude)
78
+ --api-url <url> Custom API URL
79
+ --dir <path> Project directory (default: current directory)
80
+ --skip-planning Skip the planning phase
81
+ ```
82
+
83
+ ### `locus exec`
84
+
85
+ Run a prompt with repository context. Supports both single execution and interactive REPL mode.
86
+
87
+ ```bash
88
+ locus exec "your prompt" [options]
89
+ locus exec --interactive [options]
90
+
91
+ Options:
92
+ --interactive, -i Start interactive REPL mode
93
+ --session, -s <id> Resume a previous session
94
+ --model <name> AI model to use
95
+ --provider <name> AI provider: claude or codex (default: claude)
96
+ --dir <path> Project directory (default: current directory)
97
+ --no-stream Disable streaming output
98
+ --no-status Disable status display
99
+ ```
100
+
101
+ #### Session Management
102
+
103
+ Manage your exec sessions with these subcommands:
104
+
105
+ ```bash
106
+ # List recent sessions
107
+ locus exec sessions list
108
+
109
+ # Show messages from a session
110
+ locus exec sessions show <session-id>
111
+
112
+ # Delete a session
113
+ locus exec sessions delete <session-id>
114
+
115
+ # Clear all sessions
116
+ locus exec sessions clear
117
+ ```
118
+
119
+ ## Configuration
120
+
121
+ Locus stores its configuration in the `.locus/` directory within your project:
122
+
123
+ - `config.json` - Project settings including workspace ID and version
124
+ - `codebase-index.json` - Indexed codebase structure
125
+
126
+ The `.locus/LOCUS.md` file provides AI instructions and context that agents use when working on your codebase.
127
+
128
+ ## AI Providers
129
+
130
+ Locus supports multiple AI providers:
131
+
132
+ - **Claude** (default) - Anthropic's Claude models
133
+ - **Codex** - OpenAI Codex models
134
+
135
+ Specify the provider with the `--provider` flag:
136
+
137
+ ```bash
138
+ locus exec "your prompt" --provider codex
139
+ locus run --api-key YOUR_KEY --provider claude
140
+ ```
141
+
142
+ ## Requirements
143
+
144
+ - Node.js 18 or later
145
+ - A Locus API key (for `run` command)
146
+
147
+ ## Links
148
+
149
+ - [Documentation](https://docs.locusai.dev)
150
+ - [Website](https://locusai.dev)
151
+
152
+ ## License
153
+
154
+ MIT