orka-cli 1.0.0 → 1.0.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.
- package/README.md +225 -100
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Orka
|
|
2
2
|
|
|
3
|
-
Multi-agent coding orchestration CLI
|
|
3
|
+
**Multi-agent coding orchestration CLI.** Orka coordinates a swarm of AI agents that work like an engineering team — Coordinator breaks down goals, Scout analyzes the codebase, Builders implement in parallel, and Reviewer ensures quality — all automatically coordinated without file conflicts.
|
|
4
4
|
|
|
5
5
|
```
|
|
6
6
|
$ orka run "build user authentication with OAuth2 and JWT"
|
|
@@ -18,64 +18,86 @@ $ orka run "build user authentication with OAuth2 and JWT"
|
|
|
18
18
|
│ ⚡ BUILD │ API routes & middleware │ bld-2 │ 4 files │
|
|
19
19
|
│ ⏳ QUEUE │ Login & signup UI │ — │ 5 files │
|
|
20
20
|
└──────────┴──────────────────────────┴────────┴──────────┘
|
|
21
|
-
[P]ause [L]ogs [C]ost detail [Q]uit
|
|
22
21
|
```
|
|
23
22
|
|
|
24
|
-
##
|
|
23
|
+
## Features
|
|
25
24
|
|
|
26
|
-
- **
|
|
27
|
-
- **Zero file
|
|
28
|
-
- **
|
|
29
|
-
- **
|
|
30
|
-
- **
|
|
31
|
-
- **
|
|
32
|
-
- **
|
|
25
|
+
- **Parallel multi-agent swarm** — Coordinator + Scout + N Builders + Reviewer work concurrently
|
|
26
|
+
- **Zero file conflicts** — atomic SQLite file ownership locks prevent two agents from editing the same file
|
|
27
|
+
- **AI self-healing loop** — TesterAgent runs your test suite after each build; if tests fail, Builder retries with the test output as feedback
|
|
28
|
+
- **Human gate** — optionally require human approval before any task is marked done, with a full diff preview
|
|
29
|
+
- **Web dashboard** — built-in HTTP server with real-time WebSocket updates; monitor and control sessions from any browser
|
|
30
|
+
- **Remote access** — built-in Cloudflare Tunnel support (`--tunnel`) for iPad/remote access without VPN
|
|
31
|
+
- **Provider-agnostic** — Claude, OpenAI, Gemini, Ollama (local/free), OpenRouter — mix and match per role
|
|
32
|
+
- **Git integration** — auto-branch per session, auto-commit after approval, safe rollback
|
|
33
|
+
- **Crash recovery** — full state persisted in SQLite; `orka resume` picks up exactly where it left off
|
|
34
|
+
- **Cost tracking** — real-time token usage and estimated cost per agent
|
|
35
|
+
- **Plugin system** — extend with custom roles, providers, and hooks
|
|
36
|
+
- **MCP server** — expose Orka as an MCP tool for use inside Claude, Cursor, and other AI editors
|
|
33
37
|
|
|
34
|
-
##
|
|
38
|
+
## Installation
|
|
35
39
|
|
|
36
40
|
```bash
|
|
37
41
|
npm install -g orka-cli
|
|
38
42
|
```
|
|
39
43
|
|
|
40
|
-
|
|
44
|
+
**Requirements:** Node.js v20+, at least one LLM provider (API key or local Ollama)
|
|
45
|
+
|
|
46
|
+
## Quickstart
|
|
47
|
+
|
|
41
48
|
```bash
|
|
42
|
-
|
|
49
|
+
# 1. Initialize config in your project
|
|
50
|
+
cd your-project
|
|
51
|
+
orka init
|
|
52
|
+
|
|
53
|
+
# 2. Add your API key
|
|
54
|
+
orka login --provider claude
|
|
55
|
+
|
|
56
|
+
# 3. Run your first session
|
|
57
|
+
orka run "add input validation to all API endpoints"
|
|
43
58
|
```
|
|
44
59
|
|
|
45
|
-
|
|
60
|
+
## Web Dashboard (Mission Control)
|
|
46
61
|
|
|
47
|
-
|
|
62
|
+
Run Orka as a persistent server and control everything from your browser — no terminal needed after startup.
|
|
48
63
|
|
|
49
64
|
```bash
|
|
50
|
-
#
|
|
51
|
-
orka
|
|
65
|
+
# Start the server (point --static to the GUI build)
|
|
66
|
+
orka serve --project /path/to/your-project --static /path/to/gui/dist
|
|
52
67
|
|
|
53
|
-
#
|
|
54
|
-
orka
|
|
68
|
+
# With Cloudflare Tunnel for iPad/remote access
|
|
69
|
+
orka serve --project /path/to/your-project --static /path/to/gui/dist --tunnel
|
|
70
|
+
# → 🌐 Tunnel URL: https://xxxxx.trycloudflare.com
|
|
71
|
+
```
|
|
55
72
|
|
|
56
|
-
|
|
57
|
-
|
|
73
|
+
From the dashboard you can:
|
|
74
|
+
- **Start new sessions** — type a goal and click Run
|
|
75
|
+
- **Monitor agents** — real-time swarm canvas with task status
|
|
76
|
+
- **Review diffs** — click any `AWAITING APPROVAL` task to see the full git diff
|
|
77
|
+
- **Approve or reject** — with optional feedback sent back to the Builder
|
|
58
78
|
|
|
59
|
-
|
|
60
|
-
orka rollback
|
|
79
|
+
Alternatively, run server + session together in one command:
|
|
61
80
|
|
|
62
|
-
|
|
63
|
-
orka
|
|
81
|
+
```bash
|
|
82
|
+
orka run "your goal" --serve --serve-static /path/to/gui/dist [--tunnel]
|
|
64
83
|
```
|
|
65
84
|
|
|
66
|
-
##
|
|
85
|
+
## Configuration
|
|
67
86
|
|
|
68
|
-
`orka init`
|
|
87
|
+
`orka init` generates `orka.config.yaml` in your project root:
|
|
69
88
|
|
|
70
89
|
```yaml
|
|
71
90
|
providers:
|
|
72
91
|
claude:
|
|
73
|
-
apiKey: ${ANTHROPIC_API_KEY} #
|
|
92
|
+
apiKey: ${ANTHROPIC_API_KEY} # reads from environment variable
|
|
74
93
|
ollama:
|
|
75
94
|
baseUrl: http://localhost:11434
|
|
76
95
|
|
|
77
96
|
swarm:
|
|
78
|
-
builders: 2
|
|
97
|
+
builders: 2 # number of parallel Builder agents
|
|
98
|
+
review: true # enable Reviewer agent
|
|
99
|
+
maxReviewRetries: 3
|
|
100
|
+
humanGate: false # set true to require human approval before done
|
|
79
101
|
|
|
80
102
|
roles:
|
|
81
103
|
coordinator: { provider: claude, model: claude-sonnet-4-20250514 }
|
|
@@ -84,14 +106,20 @@ roles:
|
|
|
84
106
|
reviewer: { provider: claude, model: claude-sonnet-4-20250514 }
|
|
85
107
|
|
|
86
108
|
git:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
push: false #
|
|
91
|
-
|
|
109
|
+
autoBranch: true
|
|
110
|
+
autoMerge: true
|
|
111
|
+
commitPrefix: "[orka]"
|
|
112
|
+
push: false # never pushes without explicit confirmation
|
|
113
|
+
conflictResolution: prompt # prompt | auto | manual
|
|
114
|
+
|
|
115
|
+
tester:
|
|
116
|
+
enabled: false # set true to enable self-healing test loop
|
|
117
|
+
command: "npm test"
|
|
118
|
+
timeout: 60000
|
|
119
|
+
maxRetries: 3
|
|
92
120
|
```
|
|
93
121
|
|
|
94
|
-
### Setup
|
|
122
|
+
### Budget Setup (fully local, free)
|
|
95
123
|
|
|
96
124
|
```yaml
|
|
97
125
|
roles:
|
|
@@ -101,7 +129,7 @@ roles:
|
|
|
101
129
|
reviewer: { provider: ollama, model: llama3 }
|
|
102
130
|
```
|
|
103
131
|
|
|
104
|
-
### Setup
|
|
132
|
+
### Quality Setup (cloud for planning and review)
|
|
105
133
|
|
|
106
134
|
```yaml
|
|
107
135
|
roles:
|
|
@@ -111,97 +139,194 @@ roles:
|
|
|
111
139
|
reviewer: { provider: claude, model: claude-sonnet-4-20250514 }
|
|
112
140
|
```
|
|
113
141
|
|
|
142
|
+
## Human Gate (Approval Workflow)
|
|
143
|
+
|
|
144
|
+
Enable `humanGate: true` in your config to require human review before any task is finalized.
|
|
145
|
+
|
|
146
|
+
**Pipeline with human gate:**
|
|
147
|
+
```
|
|
148
|
+
Builder → TesterAgent → ReviewerAgent → awaiting_approval → [you approve] → done
|
|
149
|
+
↘ [you reject] → Builder retries
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
When a task reaches `awaiting_approval`:
|
|
153
|
+
- The web dashboard shows a purple **APPROVE** badge
|
|
154
|
+
- Click the task to open a diff preview modal
|
|
155
|
+
- Click **Approve** to finalize, or **Reject** with optional feedback
|
|
156
|
+
- On rejection, the Builder retries with your feedback as context
|
|
157
|
+
|
|
158
|
+
## Self-Healing Test Loop
|
|
159
|
+
|
|
160
|
+
Enable `tester.enabled: true` to have Orka automatically run your test suite after each build:
|
|
161
|
+
|
|
162
|
+
```yaml
|
|
163
|
+
tester:
|
|
164
|
+
enabled: true
|
|
165
|
+
command: "npm test"
|
|
166
|
+
timeout: 60000
|
|
167
|
+
maxRetries: 3
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Pipeline:**
|
|
171
|
+
```
|
|
172
|
+
Builder writes code → TesterAgent runs tests → pass: send to Reviewer
|
|
173
|
+
→ fail: Builder retries with test output
|
|
174
|
+
```
|
|
175
|
+
|
|
114
176
|
## Rules System
|
|
115
177
|
|
|
116
|
-
|
|
178
|
+
Create `orka.rules.md` in your project root to guide all agents:
|
|
117
179
|
|
|
118
180
|
```markdown
|
|
119
181
|
## Code Style
|
|
120
|
-
-
|
|
121
|
-
-
|
|
182
|
+
- Use TypeScript strict mode
|
|
183
|
+
- Prefer named exports over default exports
|
|
184
|
+
- All functions must have explicit return types
|
|
122
185
|
|
|
123
186
|
## Architecture
|
|
124
|
-
-
|
|
125
|
-
-
|
|
187
|
+
- API routes go in src/app/api/
|
|
188
|
+
- Use Zod for validation, not manual type checking
|
|
189
|
+
- No direct database calls outside of repository files
|
|
126
190
|
```
|
|
127
191
|
|
|
128
|
-
Global rules (
|
|
192
|
+
Global rules (applied to all projects): `~/.orka/rules.md`
|
|
129
193
|
|
|
130
|
-
## Commands
|
|
194
|
+
## All Commands
|
|
131
195
|
|
|
196
|
+
### Session Management
|
|
132
197
|
```bash
|
|
133
|
-
orka
|
|
134
|
-
orka
|
|
135
|
-
orka
|
|
136
|
-
orka run "goal"
|
|
137
|
-
orka run "goal" --
|
|
138
|
-
orka run "goal" --
|
|
139
|
-
orka
|
|
140
|
-
orka
|
|
141
|
-
orka
|
|
142
|
-
orka
|
|
143
|
-
orka
|
|
144
|
-
orka
|
|
145
|
-
orka board --ink --watch # board Ink + live refresh
|
|
146
|
-
orka logs # activity log session terakhir
|
|
147
|
-
orka logs --session session-123 # filter ke session tertentu
|
|
148
|
-
orka logs --type task:completed # filter berdasarkan message type
|
|
149
|
-
orka pause # pause semua agent
|
|
150
|
-
orka resume # lanjut dari pause / crash
|
|
151
|
-
orka rollback # rollback session branch terakhir ke base commit
|
|
152
|
-
orka fix # resolve git conflict otomatis (LLM)
|
|
153
|
-
orka fix --strategy ours # pakai versi branch saat ini
|
|
154
|
-
orka fix --strategy theirs # pakai versi incoming branch
|
|
155
|
-
orka cost # token & cost summary
|
|
156
|
-
orka rules edit # edit orka.rules.md
|
|
157
|
-
orka memory show # tampilkan memory
|
|
158
|
-
orka memory add "catatan" # tambah entry
|
|
159
|
-
orka memory clear # hapus semua memory
|
|
160
|
-
orka plugin add my-plugin # pasang plugin ke registry lokal
|
|
161
|
-
orka plugin list # lihat plugin aktif
|
|
198
|
+
orka run "goal" # start an orchestration session
|
|
199
|
+
orka run "goal" --files src/app.ts # single-task run targeting specific files
|
|
200
|
+
orka run "goal" --no-git # disable session branch and auto-commit
|
|
201
|
+
orka run "goal" --builders 4 # use 4 parallel Builder agents
|
|
202
|
+
orka run "goal" --provider claude # override all roles to one provider
|
|
203
|
+
orka run "goal" --dry-run # preview plan without calling any LLM
|
|
204
|
+
orka run "goal" --mock # use mock provider (no API calls, for testing)
|
|
205
|
+
orka run "goal" --serve # start HTTP server alongside the session
|
|
206
|
+
orka run "goal" --serve --tunnel # + expose via Cloudflare Tunnel
|
|
207
|
+
orka pause # pause all agents gracefully
|
|
208
|
+
orka resume # resume from pause or crash
|
|
209
|
+
orka rollback # rollback last session branch to base commit
|
|
162
210
|
```
|
|
163
211
|
|
|
164
|
-
|
|
212
|
+
### Monitoring
|
|
213
|
+
```bash
|
|
214
|
+
orka status # show last session status board
|
|
215
|
+
orka status --watch # live-refresh status board
|
|
216
|
+
orka status --ink # interactive Ink TUI board
|
|
217
|
+
orka board # alias for status
|
|
218
|
+
orka logs # show event log for last session
|
|
219
|
+
orka logs --session session-123 # filter to a specific session
|
|
220
|
+
orka logs --type task:completed # filter by message type
|
|
221
|
+
orka cost # show token usage and cost summary
|
|
222
|
+
```
|
|
165
223
|
|
|
166
|
-
|
|
224
|
+
### Web Server
|
|
225
|
+
```bash
|
|
226
|
+
orka serve # start HTTP server + web dashboard
|
|
227
|
+
orka serve --port 8080 # custom port (default: 4242)
|
|
228
|
+
orka serve --project /path/to/project # set project directory
|
|
229
|
+
orka serve --static /path/to/gui/dist # serve web dashboard
|
|
230
|
+
orka serve --tunnel # expose via Cloudflare Tunnel
|
|
231
|
+
```
|
|
167
232
|
|
|
233
|
+
### Provider & Credentials
|
|
234
|
+
```bash
|
|
235
|
+
orka login --provider claude # save Claude API key
|
|
236
|
+
orka login --provider openai # save OpenAI API key
|
|
237
|
+
orka login --provider gemini # save Gemini API key
|
|
238
|
+
orka login --provider ollama # configure Ollama base URL
|
|
239
|
+
orka logout --provider claude # remove saved credential
|
|
240
|
+
orka whoami # show credential status for all providers
|
|
241
|
+
orka models --provider claude # list available models from provider
|
|
168
242
|
```
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
243
|
+
|
|
244
|
+
### Project Setup
|
|
245
|
+
```bash
|
|
246
|
+
orka init # generate config from default preset
|
|
247
|
+
orka init --profile ollama # local-first preset (no cloud API needed)
|
|
248
|
+
orka init --wizard # interactive setup wizard
|
|
249
|
+
orka init --force # overwrite existing config
|
|
175
250
|
```
|
|
176
251
|
|
|
177
|
-
|
|
252
|
+
### Git Conflict Resolution
|
|
253
|
+
```bash
|
|
254
|
+
orka fix # resolve git conflicts using LLM
|
|
255
|
+
orka fix --strategy ours # keep current branch version
|
|
256
|
+
orka fix --strategy theirs # keep incoming branch version
|
|
257
|
+
```
|
|
178
258
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
259
|
+
### Rules & Memory
|
|
260
|
+
```bash
|
|
261
|
+
orka rules show # show active project and global rules
|
|
262
|
+
orka rules edit # open project rules in $EDITOR
|
|
263
|
+
orka memory show # show memory entries
|
|
264
|
+
orka memory add "always use pnpm" # add a memory entry
|
|
265
|
+
orka memory clear # clear all memory entries
|
|
266
|
+
```
|
|
183
267
|
|
|
184
|
-
|
|
268
|
+
### Plugins
|
|
269
|
+
```bash
|
|
270
|
+
orka plugin add my-plugin # install plugin from npm
|
|
271
|
+
orka plugin add ./local-plugin # install local plugin
|
|
272
|
+
orka plugin list # list installed plugins
|
|
273
|
+
orka plugin remove my-plugin # uninstall plugin
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### MCP Server
|
|
277
|
+
```bash
|
|
278
|
+
orka mcp-server # start as MCP server (stdio transport)
|
|
279
|
+
```
|
|
185
280
|
|
|
186
|
-
|
|
187
|
-
- [BRD](docs/superpowers/specs/2026-03-11-brd.md) — business requirements
|
|
188
|
-
- [PRD](docs/superpowers/specs/2026-03-11-prd.md) — product requirements & user stories
|
|
189
|
-
- [ERD](docs/superpowers/specs/2026-03-11-erd.md) — database schema
|
|
190
|
-
- [Contributing](CONTRIBUTING.md) — setup development, commit rules, branching strategy repo
|
|
281
|
+
## Git Flow
|
|
191
282
|
|
|
192
|
-
|
|
283
|
+
Orka never touches your active branch directly:
|
|
193
284
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
285
|
+
```
|
|
286
|
+
main (your branch)
|
|
287
|
+
│
|
|
288
|
+
└── orka/session-<timestamp> ← session branch (auto-created)
|
|
289
|
+
├── task-1: auth types ← builder-1 works here
|
|
290
|
+
├── task-2: auth service ← builder-2 works here
|
|
291
|
+
└── task-3: API routes ← builder-2 works here
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
After all tasks are approved, Orka auto-commits to the session branch. You decide when to merge.
|
|
295
|
+
|
|
296
|
+
**Safety guarantees:**
|
|
297
|
+
- Never force pushes
|
|
298
|
+
- Never pushes to remote without explicit confirmation (`push: false` by default)
|
|
299
|
+
- Merge conflicts → session pauses and notifies you, never silently auto-resolves
|
|
300
|
+
|
|
301
|
+
## Supported Providers
|
|
302
|
+
|
|
303
|
+
| Provider | Models | Notes |
|
|
304
|
+
|----------|--------|-------|
|
|
305
|
+
| **Claude** | claude-sonnet-4, claude-haiku-4-5, ... | Best quality |
|
|
306
|
+
| **OpenAI** | gpt-4o, gpt-4o-mini, o1, ... | |
|
|
307
|
+
| **Gemini** | gemini-2.0-flash, gemini-1.5-pro, ... | |
|
|
308
|
+
| **Ollama** | llama3, deepseek-coder-v2, qwen2.5-coder, ... | Free, runs locally |
|
|
309
|
+
| **OpenRouter** | Any model via OpenRouter | |
|
|
310
|
+
| **Zai / GLM** | glm-4, ... | |
|
|
311
|
+
|
|
312
|
+
## MCP Integration
|
|
313
|
+
|
|
314
|
+
Use Orka as an MCP tool inside Claude Desktop, Cursor, or any MCP-compatible editor:
|
|
315
|
+
|
|
316
|
+
```json
|
|
317
|
+
{
|
|
318
|
+
"mcpServers": {
|
|
319
|
+
"orka": {
|
|
320
|
+
"command": "orka",
|
|
321
|
+
"args": ["mcp-server"]
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
```
|
|
201
326
|
|
|
202
327
|
## Contributing
|
|
203
328
|
|
|
204
|
-
|
|
329
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
205
330
|
|
|
206
331
|
## License
|
|
207
332
|
|