orka-cli 1.0.0 → 1.0.2

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 (2) hide show
  1. package/README.md +173 -104
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Orka
2
2
 
3
- Multi-agent coding orchestration CLI. Orka mengorkestrasi AI agents untuk bekerja seperti tim engineering — Coordinator dekomposisi goal, Scout analisis codebase, Builder implementasi paralel, Reviewer jaga kualitassemua terkoordinasi otomatis tanpa konflik file.
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 qualityall automatically coordinated without file conflicts.
4
4
 
5
5
  ```
6
6
  $ orka run "build user authentication with OAuth2 and JWT"
@@ -18,64 +18,57 @@ $ 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
- ## Fitur
23
+ ## Features
25
24
 
26
- - **Multi-agent paralel** — Coordinator + Scout + N Builders + Reviewer bekerja serentak
27
- - **Zero file conflict** — file ownership via atomic SQLite lock, tidak ada dua agent edit file yang sama
28
- - **Review gate** — setiap perubahan di-review Reviewer sebelum di-commit, max 3x retry sebelum eskalasi ke user
29
- - **Agent-agnostic** — Claude, Ollama (gratis/lokal), OpenAI, Gemini bisa dicampur per role
30
- - **Git integration** — auto-branch per task, auto-merge setelah approved, rebase in-flight branches
31
- - **Survive crash** — state di SQLite, `orka resume` lanjut dari titik terakhir
32
- - **Cost tracking** — token dan biaya per agent, real-time di TUI
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
+ - **Provider-agnostic** — Claude, OpenAI, Gemini, Ollama (local/free), OpenRoutermix and match per role
29
+ - **Git integration** — auto-branch per session, auto-commit after approval, safe rollback
30
+ - **Crash recovery** — full state persisted in SQLite; `orka resume` picks up exactly where it left off
31
+ - **Cost tracking** — real-time token usage and estimated cost per agent
32
+ - **Plugin system** — extend with custom roles, providers, and hooks
33
+ - **MCP server** — expose Orka as an MCP tool for use inside Claude, Cursor, and other AI editors
33
34
 
34
- ## Instalasi
35
+ ## Installation
35
36
 
36
37
  ```bash
37
38
  npm install -g orka-cli
38
39
  ```
39
40
 
40
- Atau run tanpa install:
41
- ```bash
42
- npx orka-cli init
43
- ```
44
-
45
- **Prasyarat:** Node.js v20+, minimal satu LLM provider (API key atau Ollama)
41
+ **Requirements:** Node.js v20+, at least one LLM provider (API key or local Ollama)
46
42
 
47
43
  ## Quickstart
48
44
 
49
45
  ```bash
50
- # Bootstrap config awal
51
- orka init --profile ollama
52
-
53
- # Mode core (default): goal -> scout -> coordinator -> builder/reviewer
54
- orka run "buat CRUD endpoint untuk /api/products"
55
-
56
- # Mode manual: pakai target file eksplisit untuk single-task run
57
- orka run "buat CRUD endpoint untuk /api/products" --files src/api/products.ts
46
+ # 1. Initialize config in your project
47
+ cd your-project
48
+ orka init
58
49
 
59
- # Rollback ke base commit session terakhir
60
- orka rollback
50
+ # 2. Add your API key
51
+ orka login --provider claude
61
52
 
62
- # Lihat status implementasi yang sudah tersedia
63
- orka status
53
+ # 3. Run your first session
54
+ orka run "add input validation to all API endpoints"
64
55
  ```
65
56
 
66
- ## Konfigurasi
57
+ ## Configuration
67
58
 
68
- `orka init` akan generate `orka.config.yaml` di root project. Edit manual jika perlu:
59
+ `orka init` generates `orka.config.yaml` in your project root:
69
60
 
70
61
  ```yaml
71
62
  providers:
72
63
  claude:
73
- apiKey: ${ANTHROPIC_API_KEY} # dari environment variable
64
+ apiKey: ${ANTHROPIC_API_KEY} # reads from environment variable
74
65
  ollama:
75
66
  baseUrl: http://localhost:11434
76
67
 
77
68
  swarm:
78
- builders: 2 # jumlah Builder agent paralel
69
+ builders: 2 # number of parallel Builder agents
70
+ review: true # enable Reviewer agent
71
+ maxReviewRetries: 3
79
72
 
80
73
  roles:
81
74
  coordinator: { provider: claude, model: claude-sonnet-4-20250514 }
@@ -84,14 +77,20 @@ roles:
84
77
  reviewer: { provider: claude, model: claude-sonnet-4-20250514 }
85
78
 
86
79
  git:
87
- auto_branch: true
88
- auto_merge: true
89
- commit_prefix: "[orka]"
90
- push: false # tidak pernah push tanpa izin user
91
- conflict_resolution: prompt # prompt | auto | manual
80
+ autoBranch: true
81
+ autoMerge: true
82
+ commitPrefix: "[orka]"
83
+ push: false # never pushes without explicit confirmation
84
+ conflictResolution: prompt # prompt | auto | manual
85
+
86
+ tester:
87
+ enabled: false # set true to enable self-healing test loop
88
+ command: "npm test"
89
+ timeout: 60000
90
+ maxRetries: 3
92
91
  ```
93
92
 
94
- ### Setup Hemat (semua Ollama, gratis)
93
+ ### Budget Setup (fully local, free)
95
94
 
96
95
  ```yaml
97
96
  roles:
@@ -101,7 +100,7 @@ roles:
101
100
  reviewer: { provider: ollama, model: llama3 }
102
101
  ```
103
102
 
104
- ### Setup Quality (cloud untuk Coordinator & Reviewer)
103
+ ### Quality Setup (cloud for planning and review)
105
104
 
106
105
  ```yaml
107
106
  roles:
@@ -111,97 +110,167 @@ roles:
111
110
  reviewer: { provider: claude, model: claude-sonnet-4-20250514 }
112
111
  ```
113
112
 
113
+ ## Self-Healing Test Loop
114
+
115
+ Enable `tester.enabled: true` to have Orka automatically run your test suite after each build:
116
+
117
+ ```yaml
118
+ tester:
119
+ enabled: true
120
+ command: "npm test"
121
+ timeout: 60000
122
+ maxRetries: 3
123
+ ```
124
+
125
+ **Pipeline:**
126
+ ```
127
+ Builder writes code → TesterAgent runs tests → pass: send to Reviewer
128
+ → fail: Builder retries with test output
129
+ ```
130
+
114
131
  ## Rules System
115
132
 
116
- Buat `orka.rules.md` di root project untuk mengatur perilaku semua agent:
133
+ Create `orka.rules.md` in your project root to guide all agents:
117
134
 
118
135
  ```markdown
119
136
  ## Code Style
120
- - Gunakan Bahasa Indonesia untuk error messages
121
- - Naming: camelCase untuk functions, PascalCase untuk types
137
+ - Use TypeScript strict mode
138
+ - Prefer named exports over default exports
139
+ - All functions must have explicit return types
122
140
 
123
141
  ## Architecture
124
- - Semua API routes di src/app/api/
125
- - Pakai Zod untuk validation, bukan manual type checking
142
+ - API routes go in src/app/api/
143
+ - Use Zod for validation, not manual type checking
144
+ - No direct database calls outside of repository files
126
145
  ```
127
146
 
128
- Global rules (berlaku semua project): `~/.orka/rules.md`
147
+ Global rules (applied to all projects): `~/.orka/rules.md`
129
148
 
130
- ## Commands
149
+ ## All Commands
131
150
 
151
+ ### Session Management
132
152
  ```bash
133
- orka init # generate config dari preset
134
- orka init --wizard # setup wizard interaktif
135
- orka init --profile ollama # local-first preset (tanpa Claude)
136
- orka run "goal" # auto-planning orchestration flow
137
- orka run "goal" --files src/app.ts # manual single-task run
138
- orka run "goal" --no-git # nonaktifkan session branch + auto-commit
139
- orka status # tampilkan status board session terakhir
140
- orka status --ink # status board interaktif via Ink
141
- orka status --watch # status board live refresh (text)
142
- orka board # tampilkan session board terakhir
143
- orka board --watch # board mode live refresh
144
- orka board --ink # board interaktif berbasis Ink
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
153
+ orka run "goal" # start an orchestration session
154
+ orka run "goal" --files src/app.ts # single-task run targeting specific files
155
+ orka run "goal" --no-git # disable session branch and auto-commit
156
+ orka run "goal" --builders 4 # use 4 parallel Builder agents
157
+ orka run "goal" --provider claude # override all roles to one provider
158
+ orka run "goal" --dry-run # preview plan without calling any LLM
159
+ orka run "goal" --mock # use mock provider (no API calls, for testing)
160
+ orka pause # pause all agents gracefully
161
+ orka resume # resume from pause or crash
162
+ orka rollback # rollback last session branch to base commit
162
163
  ```
163
164
 
164
- ## Git Flow
165
+ ### Monitoring
166
+ ```bash
167
+ orka status # show last session status board
168
+ orka status --watch # live-refresh status board
169
+ orka status --ink # interactive Ink TUI board
170
+ orka board # alias for status
171
+ orka logs # show event log for last session
172
+ orka logs --session session-123 # filter to a specific session
173
+ orka logs --type task:completed # filter by message type
174
+ orka cost # show token usage and cost summary
175
+ ```
176
+
177
+ ### Provider & Credentials
178
+ ```bash
179
+ orka login --provider claude # save Claude API key
180
+ orka login --provider openai # save OpenAI API key
181
+ orka login --provider gemini # save Gemini API key
182
+ orka login --provider ollama # configure Ollama base URL
183
+ orka logout --provider claude # remove saved credential
184
+ orka whoami # show credential status for all providers
185
+ orka models --provider claude # list available models from provider
186
+ ```
165
187
 
166
- Orka tidak pernah mengubah branch aktif kamu secara langsung:
188
+ ### Project Setup
189
+ ```bash
190
+ orka init # generate config from default preset
191
+ orka init --profile ollama # local-first preset (no cloud API needed)
192
+ orka init --wizard # interactive setup wizard
193
+ orka init --force # overwrite existing config
194
+ ```
167
195
 
196
+ ### Git Conflict Resolution
197
+ ```bash
198
+ orka fix # resolve git conflicts using LLM
199
+ orka fix --strategy ours # keep current branch version
200
+ orka fix --strategy theirs # keep incoming branch version
168
201
  ```
169
- main (branch kamu)
170
-
171
- └── orka/session-<timestamp> ← session branch
172
- ├── orka/task-auth-schemas ← per-task branch (builder-1)
173
- ├── orka/task-auth-service ← per-task branch (builder-2)
174
- └── orka/task-api-routes ← per-task branch (builder-2)
202
+
203
+ ### Rules & Memory
204
+ ```bash
205
+ orka rules show # show active project and global rules
206
+ orka rules edit # open project rules in $EDITOR
207
+ orka memory show # show memory entries
208
+ orka memory add "always use pnpm" # add a memory entry
209
+ orka memory clear # clear all memory entries
175
210
  ```
176
211
 
177
- Setelah semua task approved, Orka tanya: `Merge ke main? [Y/n]`
212
+ ### Plugins
213
+ ```bash
214
+ orka plugin add my-plugin # install plugin from npm
215
+ orka plugin add ./local-plugin # install local plugin
216
+ orka plugin list # list installed plugins
217
+ orka plugin remove my-plugin # uninstall plugin
218
+ ```
178
219
 
179
- **Safety rules:**
180
- - Tidak pernah force push
181
- - Tidak pernah push ke remote tanpa konfirmasi
182
- - Merge conflict → pause + notifikasi, tidak auto-resolve diam-diam
220
+ ### MCP Server
221
+ ```bash
222
+ orka mcp-server # start as MCP server (stdio transport)
223
+ ```
183
224
 
184
- ## Dokumentasi
225
+ ## Git Flow
185
226
 
186
- - [Design Spec](docs/superpowers/specs/2026-03-11-orka-design.md) arsitektur lengkap
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
227
+ Orka never touches your active branch directly:
191
228
 
192
- ## Roadmap
229
+ ```
230
+ main (your branch)
231
+
232
+ └── orka/session-<timestamp> ← session branch (auto-created)
233
+ ├── task-1: auth types ← builder-1 works here
234
+ ├── task-2: auth service ← builder-2 works here
235
+ └── task-3: API routes ← builder-2 works here
236
+ ```
193
237
 
194
- | Versi | Fitur |
195
- |-------|-------|
196
- | **v1.0** | Core orchestration, 4 roles, Claude + Ollama, TUI, git integration, rules, resume |
197
- | **v1.1** | OpenAI + Gemini, smart context management, memory auto-learning, `--dry-run` |
198
- | **v1.2** | Plugin system (custom roles, providers, hooks) |
199
- | **v2.0** | Desktop app (Electron/Tauri) |
200
- | **v3.0** | Web dashboard + managed cloud service |
238
+ After all tasks are approved, Orka auto-commits to the session branch. You decide when to merge.
239
+
240
+ **Safety guarantees:**
241
+ - Never force pushes
242
+ - Never pushes to remote without explicit confirmation (`push: false` by default)
243
+ - Merge conflicts session pauses and notifies you, never silently auto-resolves
244
+
245
+ ## Supported Providers
246
+
247
+ | Provider | Notes |
248
+ |----------|-------|
249
+ | **Claude** | Best quality for planning and review |
250
+ | **OpenAI** | GPT-4o, o1, and variants |
251
+ | **Gemini** | Gemini 2.0 Flash, 1.5 Pro |
252
+ | **Ollama** | Free, runs locally — llama3, deepseek-coder-v2, qwen2.5-coder |
253
+ | **OpenRouter** | Access any model via OpenRouter |
254
+ | **Zai / GLM** | GLM-4 and variants |
255
+
256
+ ## MCP Integration
257
+
258
+ Use Orka as an MCP tool inside Claude Desktop, Cursor, or any MCP-compatible editor:
259
+
260
+ ```json
261
+ {
262
+ "mcpServers": {
263
+ "orka": {
264
+ "command": "orka",
265
+ "args": ["mcp-server"]
266
+ }
267
+ }
268
+ }
269
+ ```
201
270
 
202
271
  ## Contributing
203
272
 
204
- Lihat [CONTRIBUTING.md](CONTRIBUTING.md).
273
+ See [CONTRIBUTING.md](CONTRIBUTING.md).
205
274
 
206
275
  ## License
207
276
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orka-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Multi-agent orchestration CLI",
5
5
  "type": "module",
6
6
  "bin": {