@ekravo/cli 0.0.0-stage → 0.1.107

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 CHANGED
@@ -1,3 +1,650 @@
1
- # Temporary Holding Version
1
+ # Ekravo
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Ekravo is a coding agent CLI for the terminal. It's a fork of the open-source `ache` CLI ([getache/ache](https://github.com/getache/ache), Apache 2.0), built on the same [pi-mono](https://github.com/badlogic/pi-mono) coding agent SDK, adapted to run against [ekravo.com](https://ekravo.com) as its LLM provider and extended with:
4
+
5
+ - A **Read / Plan / Edit / Auto** permission model (`Shift+Tab` cycles between them)
6
+ - **Persistent, cross-session project memory** in `ekravo.md` + `.ekravo/` (`/init` to scaffold, `/memory` to inspect)
7
+ - An Ekravo LLM provider alongside the upstream provider, so both can be configured at once during the transition
8
+
9
+ Everything the upstream CLI already does well — the terminal UI, sessions, MCP support, skills, subagents, LSP integration, Ferment project workflows — is unchanged and reused as-is. See [NOTICE](NOTICE) for full attribution; Ekravo does not claim the upstream project's original code as its own and is not affiliated with CAST AI Group, Inc.
10
+
11
+ ## Quick start
12
+
13
+ This repository does not have packaged releases yet — build and run it from source.
14
+
15
+ ```bash
16
+ git clone https://github.com/EOSKILLZ/ACHECLI.git
17
+ cd ACHECLI
18
+ corepack enable
19
+ pnpm install
20
+ node ./scripts/copy-resources.js --dev
21
+ ```
22
+
23
+ Configure your API key and launch:
24
+
25
+ ```bash
26
+ pnpm run dev setup # one-time interactive setup (Ekravo API key)
27
+ pnpm run dev # launch the coding agent
28
+ ```
29
+
30
+ Or build a standalone binary (see [Development](#development) below):
31
+
32
+ ```bash
33
+ pnpm run build:binary
34
+ ./dist/bin/ekravo
35
+ ```
36
+
37
+ Once installed globally (`npm link` or similar), `ekravo` is the command name.
38
+
39
+ Run `pnpm run dev -- --help` to see all available subcommands and flags.
40
+
41
+ ## Models
42
+
43
+ ### Model selection
44
+
45
+ The supported model list is fetched at startup from the ekravo metadata service. Use `/model` or `ctrl+p` in the interactive CLI to switch between available models.
46
+
47
+ Ekravo operates in one of two modes:
48
+
49
+ | Mode | Status line indicator | Behavior |
50
+ |------|-----------------|----------|
51
+ | **Multi-model** | `multi-model (orchestrator-id)` | The orchestrator delegates each task to the model assigned for that role |
52
+ | **Single-model** | model name | All work runs on the selected model directly |
53
+
54
+ Use `ctrl+p` to cycle through models. The last entry in the cycle is `multi-model`. You can also open the `/model` picker and select a specific model or `multi-model` from the list.
55
+
56
+ In single-model mode the orchestration system prompt (environment, tools, research rules, guidelines, phase tagging) stays active, but task classification and delegation are disabled. The subagent tool remains available if you explicitly ask the agent to delegate.
57
+
58
+ ### Model roles
59
+
60
+ In multi-model mode, each task type is handled by a specific role. Each role can have one model or a **pool of candidates** — the orchestrator reads model tier and description and picks the best fit for each task.
61
+
62
+ Use `/multi-model` in the interactive CLI to toggle models on/off per role, or edit `~/.config/ekravo/harness/settings.json` directly:
63
+
64
+ ```json
65
+ {
66
+ "modelRoles": {
67
+ "orchestrator": "ekravo-dev/kimi-k2.6",
68
+ "builder": ["ekravo-dev/minimax-m2.7", "anthropic/claude-sonnet-4-5"],
69
+ "reviewer": "anthropic/claude-sonnet-4-5",
70
+ "explorer": "ekravo-dev/nemotron-3-ultra-fp4"
71
+ }
72
+ }
73
+ ```
74
+
75
+ | Role | Default | Description |
76
+ |------|---------|-------------|
77
+ | **orchestrator** | `kimi-k2.6` | Runs the main loop, classifies tasks, delegates work. Single model. |
78
+ | **planner** | `kimi-k2.6` | Designs the approach, writes specs. When same as orchestrator, planning is done in-process. |
79
+ | **builder** | `kimi-k2.6`, `minimax-m2.7` | Code implementation. For complex tasks the orchestrator may pick a heavier model from the pool. |
80
+ | **reviewer** | `kimi-k2.6`, `minimax-m2.7` | Code review. Orchestrator picks the strongest by tier for initial review. |
81
+ | **explorer** | `nemotron-3-ultra-fp4` | Codebase exploration — navigating files, reading code, tracing architecture. |
82
+ | **researcher** | `kimi-k2.6` | Research beyond the codebase — web search, documentation lookup, external sources. |
83
+
84
+ Defaults are hardcoded in `DEFAULT_MODEL_ROLES`. Roles accept any `provider/model-id` string or an array of strings. Only non-default values need to be specified; missing keys fall back to defaults.
85
+
86
+ #### How delegation works
87
+
88
+ The orchestrator receives explicit per-phase directives generated from the role configuration. For each pipeline phase (plan, build, review, explore, research), the system prompt tells the orchestrator exactly what to do:
89
+
90
+ - **Roles it owns** (its model ID appears in the role pool): "DO perform this work yourself."
91
+ - **Roles it does not own**: "DO NOT perform this work yourself. Delegate to Agent(type: X, model: Y)." — with the concrete model IDs from the pool.
92
+ - **Review is always delegated**, even when the orchestrator has the reviewer role, to ensure independence via a fresh context.
93
+
94
+ When a role pool has multiple models, the orchestrator picks the lightest-tier model that fits the task and escalates to heavy-tier only for complex work (concurrency, algorithms) or as a retry after a standard-tier model has failed.
95
+
96
+ Built-in models (ekravo-dev) have tier and description baked in. External models need metadata — see below.
97
+
98
+ #### Model metadata
99
+
100
+ External models (Anthropic, OpenAI, or any non-builtin provider) have no built-in tier or description. Without metadata, they default to `standard` tier, `vision: false`, and an auto-generated description based on their assigned roles. To give the orchestrator better routing information, add a `modelMetadata` section to `settings.json`:
101
+
102
+ ```json
103
+ {
104
+ "modelRoles": {
105
+ "builder": ["ekravo-dev/minimax-m2.7", "anthropic/claude-sonnet-4-5"],
106
+ "reviewer": "anthropic/claude-sonnet-4-5"
107
+ },
108
+ "modelMetadata": {
109
+ "anthropic/claude-sonnet-4-5": {
110
+ "tier": "heavy",
111
+ "description": "Strong general-purpose model — use for complex builds and thorough reviews."
112
+ }
113
+ }
114
+ }
115
+ ```
116
+
117
+ | Field | Default | Description |
118
+ |-------|---------|-------------|
119
+ | `tier` | `standard` | `light`, `standard`, or `heavy`. Used for complexity-based routing. |
120
+ | `description` | Auto-generated | Shown to the orchestrator so it can match model strengths to task requirements. |
121
+ | `vision` | `false` | Whether the model supports image input. |
122
+
123
+ With the metadata above, the orchestrator will use minimax for simple build chunks and Claude for complex ones. Without it, both models look like standard-tier to the orchestrator and selection is arbitrary.
124
+
125
+ Metadata can also be managed interactively via `/multi-model` → "Edit model metadata" — this is the only in-app path for configuring or overriding metadata, so model selection stays uninterrupted. Custom overrides can be reset to defaults from the same menu. Metadata for builtin models can be overridden the same way.
126
+
127
+ #### Completion token limits
128
+
129
+ Ekravo omits Pi's estimated `max_completion_tokens` and `max_tokens` fields from requests to managed Ekravo providers. The gateway determines how much output fits using the model's actual tokenizer; output-budget enforcement belongs at the gateway rather than in Pi's approximate client-side context calculation.
130
+
131
+ ### Phase tracking
132
+
133
+ Ekravo tags every LLM request with a `phase:{name}` label for usage analytics and cost attribution. The orchestrator sets the phase as work progresses and it is displayed in the status line.
134
+
135
+ | Phase | Description |
136
+ |-------|-------------|
137
+ | `explore` | Navigating the codebase, reading files to understand structure |
138
+ | `plan` | Designing, breaking down tasks, writing specs |
139
+ | `build` | Writing, modifying, or refactoring code |
140
+ | `review` | Analyzing output, verifying correctness |
141
+ | `research` | Investigating documentation, researching issues |
142
+
143
+ Subagents inherit the current phase from the orchestrator but cannot change it.
144
+
145
+ ## Permission modes
146
+
147
+ `Shift+Tab` cycles through four modes:
148
+
149
+ | Mode | Behavior |
150
+ |------|----------|
151
+ | **Read** | Inspect and explain only -- no file modifications, no writes |
152
+ | **Plan** | Plan and ask questions -- no implementation, same read-only tool restriction as Read plus the structured planning workflow (`<!-- PLAN_COMPLETE -->` menu, optional hand-off to a Ferment) |
153
+ | **Edit** | Modify files, asks for approval before each change (this is the `default` mode internally) |
154
+ | **Auto** | Runs freely; a classifier still gates high-risk actions |
155
+
156
+ A fifth mode, **YOLO**, skips every permission check with no classifier. It's deliberately excluded from the `Shift+Tab` cycle -- select it explicitly via `/permissions mode yolo`, `--yolo`, or `--dangerously-skip-permissions` when you actually want it.
157
+
158
+ ## Project memory
159
+
160
+ Ekravo adds persistent, cross-session project memory on top of the upstream CLI's existing session/Ferment persistence:
161
+
162
+ ```
163
+ ekravo.md -- concise, always-visible project overview
164
+ .ekravo/
165
+ ├── architecture.md -- technical structure, important systems
166
+ ├── decisions.md -- architectural decisions and reasoning
167
+ ├── changelog.md -- completed implementations, newest first
168
+ ├── tasks.md -- current, future, and unfinished work
169
+ └── known-issues.md -- unresolved bugs, limitations, risks
170
+ ```
171
+
172
+ `ekravo.md` is injected into the system prompt like `AGENTS.md`/`CLAUDE.md`. The `.ekravo/*.md` files are not force-injected -- the agent reads them on demand via the standard Read tool, guided by a standing system-prompt note that appears whenever `.ekravo/` exists in the project.
173
+
174
+ | Command | Description |
175
+ |---------|--------------|
176
+ | `/init` | Scaffold `ekravo.md` and any missing `.ekravo/*.md` files. Never overwrites an existing file. |
177
+ | `/memory` | Show which memory files exist, with a short excerpt of each. |
178
+
179
+ The status line shows scaffold progress as `Memory N/6` when pinned (on by default).
180
+
181
+ **Updates aren't just a polite suggestion.** If a turn writes or edits files outside `.ekravo/` and the model
182
+ then stops normally without having touched `.ekravo/*.md` itself, it gets nudged once to consider updating
183
+ memory before moving on -- capped at a few nudges per session so a genuinely-not-memory-worthy change
184
+ doesn't get nagged forever. This mirrors the upstream CLI's existing plan-mode stop-nudge pattern.
185
+
186
+ ## Tags
187
+
188
+ Ekravo supports tagging LLM requests for usage tracking and cost attribution. Tags are included with every request and displayed in the status line, grouped by key with color coding.
189
+
190
+ ### Commands
191
+
192
+ | Command | Description |
193
+ |---------|-------------|
194
+ | `/tags` | List all active tags |
195
+ | `/tags add key:value ...` | Add one or more tags (e.g., `/tags add project:myapp team:backend`) |
196
+ | `/tags remove tag ...` | Remove one or more user-defined tags |
197
+ | `/tags clear` | Remove all user-defined tags |
198
+
199
+ ### Tag format
200
+
201
+ Tags use `key:value` format. Key and value must start and end with alphanumeric characters (middle characters may include `-`, `_`, `.`), each 64 characters max, 10 tags total.
202
+
203
+ ### Static tags
204
+
205
+ Set via the `EKRAVO_TAGS` environment variable (comma-separated). Static tags are read-only within the session and shown with a `[static]` marker.
206
+
207
+ ```bash
208
+ export EKRAVO_TAGS="team:backend,project:api"
209
+ ```
210
+
211
+ ### Auto-tags
212
+
213
+ Two tags are added automatically to every request and do not count toward the 10 tag limit:
214
+
215
+ - `model:{model_id}` -- the model handling the request
216
+ - `phase:{phase}` -- the current work phase
217
+
218
+ ### Persistence
219
+
220
+ User-defined tags (added via `/tags add`) are persisted to `~/.config/ekravo/tags.json` and survive across sessions. Static tags from `EKRAVO_TAGS` must be set each session.
221
+
222
+ ## Ferment -- cross-session project management
223
+
224
+ Ferment is Ekravo's progressive-refinement project mode for multi-session work. Instead of starting from scratch each chat, Ferment persists a structured plan (goal, phases, steps) as a JSON state file.
225
+
226
+ ### Quick start
227
+
228
+ ```bash
229
+ ekravo --ferment "Build Tetris"
230
+ ```
231
+
232
+ Or inside an active session:
233
+
234
+ ```
235
+ /ferment new "Build Tetris" # create a ferment
236
+ /ferment auto # keep going until done or blocked
237
+ ```
238
+
239
+ ### Concepts
240
+
241
+ - **Ferment** -- the top-level project (e.g. "Build Tetris", "Auth rewrite")
242
+ - **Phase** -- a milestone within the project (e.g. "Canvas & Grid", "Movement")
243
+ - **Step** -- a single executable task within a phase (e.g. "Create index.html")
244
+ - **Decision** -- an architectural choice recorded for posterity
245
+ - **Memory** -- a gotcha, convention, or pattern encountered during work
246
+
247
+ ### State machine
248
+
249
+ All lifecycle transitions are validated by a deterministic finite state machine that enforces valid state changes and prevents illegal operations (e.g. completing a step before it starts, skipping an already-completed phase).
250
+
251
+ ```
252
+ draft -> planned -> running -> [paused] -> complete
253
+ ```
254
+
255
+ 1. **draft** -- created via `/ferment new`, agent collects goal and phases conversationally
256
+ 2. **planned** -- `scope_ferment` sets goal, criteria, constraints, phase breakdown
257
+ 3. **running** -- `activate_ferment_phase` starts a phase, agent executes steps
258
+ 4. **paused** -- user intervention required, or paused with `/ferment pause`
259
+ 5. **complete** -- all phases terminal
260
+
261
+ ### Continuation policy
262
+
263
+ Controls whether the active ferment advances across phase boundaries.
264
+
265
+ | Policy | Behavior | Command |
266
+ |--------|----------|---------|
267
+ | **manual** | Ask before moving to the next phase | `/ferment manual` |
268
+ | **automated** | Keep going until complete, blocked, paused, or user input is needed | `/ferment auto` |
269
+
270
+ Pause/resume is separate: `/ferment pause` stops the ferment, `/ferment resume` continues it using the current policy. `/ferment exit` leaves Ferment mode without deleting or abandoning the ferment; planned/running work is paused first, active Ferment UI/tools are cleared, and you can later select it from `/ferment list` or `/ferment switch`.
271
+
272
+ ### Commands
273
+
274
+ | Command | Description |
275
+ |---------|-------------|
276
+ | `/ferment` | Start a new ferment via prompt |
277
+ | `/ferment new "Name"` | Create new ferment |
278
+ | `/ferment switch <id>` | Resume by ID prefix or name |
279
+ | `/ferment delete <id>` | Delete permanently |
280
+ | `/ferment export` | Export stats to JSON |
281
+ | `/ferment progress` | Open phase/step navigator overlay |
282
+ | `/ferment manual` | Set manual continuation policy |
283
+ | `/ferment auto` | Set automated continuation policy |
284
+ | `/ferment pause` | Pause the active ferment lifecycle |
285
+ | `/ferment resume` | Resume the active ferment lifecycle |
286
+ | `/ferment exit` | Leave Ferment mode without deleting the ferment |
287
+
288
+ ### Recovery
289
+
290
+ Every session writes a `ferment_reference` entry in the session log. On next start, the harness reads this entry and resumes from the exact state.
291
+
292
+ ```bash
293
+ # Day 1
294
+ $ ekravo --ferment "Build Tetris"
295
+ # ... agent works, crashes, terminal closes ...
296
+
297
+ # Day 2
298
+ $ ekravo --ferment "Build Tetris"
299
+ # -> Rehydrates state, continues Phase 2 exactly where it left off
300
+ ```
301
+
302
+ ### Where state lives
303
+
304
+ ```
305
+ .ekravo/
306
+ ferments/
307
+ <uuid>.json -- snapshot (machine-readable plan state)
308
+ <uuid>.events.jsonl -- append-only audit log of every transition
309
+ sessions/
310
+ <timestamp>.jsonl -- chat history + tool calls
311
+ ```
312
+
313
+ Every mutation is persisted as an append-only event with pre/post state hashes, enabling full auditability. Stats (phase/step counts, timing, model usage, grade distributions) are computed on demand from the snapshot and exported via `/ferment export`.
314
+
315
+ For full documentation see `docs/ferment.md` and `docs/ferment-storage-schema.md`.
316
+
317
+ ## LSP Integration
318
+
319
+ ekravo ships with built-in Language Server Protocol (LSP) support, giving the agent type-aware code intelligence. The extension loads by default — no configuration required.
320
+
321
+ ### Supported languages
322
+
323
+ | Language | Server | Install |
324
+ |---|---|---|
325
+ | TypeScript / JavaScript | `typescript-language-server` | `npm i -g typescript-language-server typescript` |
326
+ | Go | `gopls` | `go install golang.org/x/tools/gopls@latest` |
327
+
328
+ Servers are auto-detected via `which` on `PATH`. If a server binary is not found, the corresponding tools are silently unavailable.
329
+
330
+ ### Tools
331
+
332
+ | Tool | Description |
333
+ |---|---|
334
+ | `lsp_diagnostics` | Get type errors, warnings, and linter diagnostics for a file |
335
+ | `lsp_hover` | Get type information and documentation for a symbol at a position |
336
+ | `lsp_definition` | Navigate to the definition of a symbol (supports `typeDefinition` and `implementation` variants) |
337
+ | `lsp_references` | Find all references to a symbol across the codebase |
338
+ | `lsp_rename` | Atomically rename a symbol across all files |
339
+
340
+ The agent is prompted to prefer LSP tools over text-based alternatives (e.g., `lsp_definition` over `grep` for navigating to definitions). File changes made via `edit`, `write`, or `read` are automatically synced to the language server.
341
+
342
+ ### Status bar
343
+
344
+ When LSP servers are active, the status bar shows the server name(s) and current diagnostic error count (e.g., `LSP: typescript-language-server (3 diags)`).
345
+
346
+ ## Remote Sessions
347
+
348
+ Hand off an in-progress session to a cloud sandbox with `/teleport` — the agent keeps running when you close your laptop, switch machines, or hand off to a teammate. Resume from the CLI, the Ekravo console, or VS Code.
349
+
350
+ > **Requires Ekravo CLI v0.1.52+.** Check with `ekravo --version`, update with `ekravo update`. Not available on Windows.
351
+
352
+ ```bash
353
+ /teleport
354
+ ```
355
+ ### Commands
356
+
357
+ | Command | Description |
358
+ |---------|-------------|
359
+ | `/teleport [name] [flags]` | Rsync working tree to a cloud sandbox and foreground it |
360
+ | `/remote-sessions` | Browse all workspaces and sessions; reattach with Enter |
361
+ | `/sync up\|down --workspace <name> --source <path> --target <path>` | Push or pull files without restarting the session |
362
+ | `/terminal [name-or-id]` | Open a raw SSH shell on the sandbox |
363
+
364
+
365
+ ### `/teleport` flags
366
+
367
+ | Flag | Description |
368
+ |------|-------------|
369
+ | `--workspace <id\|name>` | Reuse an existing workspace instead of creating a new one |
370
+ | `--git-repo <url>` | Clone from a git URL instead of rsyncing local files |
371
+ | `--branch <branch>` | Branch to check out after cloning (requires `--git-repo`) |
372
+ | `--allow-dirty` | Proceed with uncommitted changes |
373
+ | `--force` | Override the 5 GB workspace size limit |
374
+ | `--no-git-token` | Skip git credentials prompt |
375
+ | `--skip-session` | Start remote agent fresh (don't upload current session history) |
376
+
377
+
378
+ Once teleported, you're in the **PTY overlay** — a fullscreen tabbed terminal. Use `Ctrl+B c` / `n` / `p` to open and switch tabs. Press `Ctrl+D` to drop back to local ekravo; the sandbox and agent keep running.
379
+
380
+ For full documentation see [docs.ekravo.com/docs/coding-remote-sessions](https://docs.ekravo.com/docs/coding-remote-sessions).
381
+
382
+ ## Configuration
383
+
384
+ ### Authentication
385
+
386
+ The Ekravo API key is resolved in this order:
387
+
388
+ 1. `EKRAVO_API_KEY` environment variable (takes precedence)
389
+ 2. `~/.config/ekravo/config.json` field `api_key`
390
+
391
+ The upstream provider key is resolved independently, so both can be configured at once:
392
+
393
+ 1. `EKRAVO_API_KEY` environment variable (takes precedence)
394
+ 2. `~/.config/ekravo/config.json` field `ekravoApiKey`
395
+
396
+ Run `ekravo setup` for an interactive first-time configuration, which now offers an optional upstream-key step alongside the Ekravo one.
397
+
398
+ **Usage and cost:** The CLI preserves model IDs exactly as returned by the catalog; it does not rewrite provider IDs or infer transport slugs. Requests authenticated with an Ekravo subscription/API key are billed according to the associated Ekravo account and plan. ACHECLI does not add a separate per-token markup or determine plan entitlements; consult the account's current billing terms for subscription limits, credits, and API usage charges.
399
+
400
+ ### Agent config
401
+
402
+ Ekravo stores its configuration (settings, sessions, models) under:
403
+
404
+ ```
405
+ ~/.config/ekravo/harness/
406
+ ```
407
+
408
+ ### Context files
409
+
410
+ You can provide custom instructions that are injected into the system prompt on every session. Ekravo discovers two kinds of context files:
411
+
412
+ **Global** — applied to every session, regardless of project:
413
+
414
+ ```
415
+ ~/.config/ekravo/harness/AGENTS.md
416
+ ```
417
+
418
+ Place rules that apply everywhere (e.g., your name, code style preferences, or global tool defaults) in this file. It is loaded before any project-level files.
419
+
420
+ **Project-level** — applied when working in a specific directory tree. Ekravo walks from the working directory up to the filesystem root and collects one context file per directory:
421
+
422
+ ```
423
+ AGENTS.md
424
+ CLAUDE.md
425
+ ```
426
+
427
+ Per directory, `AGENTS.md` takes priority over `CLAUDE.md`. A `.local.md` variant (e.g. `AGENTS.local.md`) is appended to its primary file for user-specific, gitignored overrides.
428
+
429
+ When both global and project files exist, global instructions appear first in the prompt, followed by ancestor directories, and finally the working directory. This means project-level rules can refine or override global ones.
430
+
431
+ ### Packages
432
+
433
+ Ekravo supports native Pi packages. `ekravo install npm:<package>` installs a package only for Ekravo, while `pi install npm:<package>` keeps the package owned by the original Pi harness. Ekravo can also load original Pi packages through the **Pi package lookup** resource, so both CLIs can use Pi packages without sharing Ekravo's install scope.
434
+
435
+ If the same package is installed in both places, the Ekravo install wins. Disable original Pi package lookup with:
436
+
437
+ ```bash
438
+ ekravo resources disable extensions.pi-package-lookup
439
+ ```
440
+
441
+ Update packages with:
442
+
443
+ ```bash
444
+ ekravo update # update installed packages, then Ekravo itself
445
+ ekravo update --extensions # update installed packages only
446
+ ekravo update context-mode # update one package by source or display name
447
+ ekravo update self # update Ekravo itself only
448
+ ekravo update v1.2.3 # install a specific Ekravo release (downgrades work too)
449
+ ekravo update v1.2.3-rc.1 # install a release candidate
450
+ ekravo update --canary # install the latest canary build from master
451
+ ```
452
+
453
+ ### HTTP proxy
454
+
455
+ Ekravo respects `HTTP_PROXY` / `HTTPS_PROXY` environment variables for network requests.
456
+
457
+ ### Token optimization (RTK)
458
+
459
+ Ekravo installs [RTK](https://github.com/rtk-ai/rtk) during setup and keeps the `rtk` command available on startup. When enabled, ekravo rewrites bash tool calls through `rtk rewrite` before execution. This compresses command output (git, cargo, npm, docker, etc.) by 60-90%, reducing LLM context usage.
460
+
461
+ Before every bash tool execution, ekravo calls `rtk rewrite "<command>"`. If RTK returns a rewritten command (e.g. `git status` becomes `rtk git status`), the rewritten version is executed instead.
462
+
463
+ ```bash
464
+ brew install rtk # macOS / Linux
465
+ ```
466
+
467
+ RTK rewrite is managed from resources:
468
+
469
+ ```bash
470
+ ekravo resources disable hooks.rtk-rewrite
471
+ ekravo resources enable hooks.rtk-rewrite
472
+ ```
473
+
474
+ ### Hooks
475
+
476
+ Users can add custom Bash hooks to rewrite or block shell commands before they run. Global hooks live in `~/.config/ekravo/harness/hooks/bash/`; project hooks live in `.ekravo/hooks/bash/` and default to disabled until enabled from `/resources` or `ekravo resources enable ...`.
477
+
478
+ See `docs/hooks.md` for the hook protocol and examples.
479
+
480
+ ### Migrating from another coding agent
481
+
482
+ On first run, ekravo looks for an existing **Claude Code**, **OpenCode**, or **Cursor** installation and offers to migrate its MCP servers. If anything is migratable you will see a one-shot prompt:
483
+
484
+ ```
485
+ + Claude Code + OpenCode + Cursor configuration found
486
+ |
487
+ | MCP servers: filesystem, github, ripgrep
488
+ | Claude Code skills: 4 in ~/.claude/skills
489
+ | OpenCode skills: 2 in ~/.config/opencode/skills
490
+ | Cursor skills: 3 in ~/.cursor/skills
491
+ |
492
+ * Migrate MCP servers to Ekravo?
493
+ | * Migrate now
494
+ | * Skip this time
495
+ | * Never ask again
496
+ ```
497
+
498
+ Discovered MCP servers are merged into `~/.config/ekravo/harness/mcp.json`. Existing Ekravo entries always win on name collisions, so re-running the migration is safe.
499
+
500
+ The prompt is only shown when something is actually worth migrating. If neither agent is installed or both are empty, the wizard skips silently.
501
+
502
+ #### Sources scanned
503
+
504
+ | Agent | Config files (read in order, results merged) | Skills directory |
505
+ |---|---|---|
506
+ | Claude Code | `~/.claude.json` (top-level `mcpServers` + per-project `projects[*].mcpServers`) | `~/.claude/skills/` |
507
+ | OpenCode | `$OPENCODE_CONFIG`, then `~/.config/opencode/opencode.json`, `opencode.jsonc`, `config.json`, `~/.opencode.json` | `~/.config/opencode/skills/` |
508
+ | Cursor | `~/.cursor/mcp.json`, then `~/.config/cursor/mcp.json` | `.cursor/skills/`, then `~/.cursor/skills/` |
509
+
510
+ For OpenCode, both the modern (`mcp` block) and legacy Go-binary (`mcpServers` block) schemas are supported. Servers with `enabled: false` are skipped. For Cursor, servers with `disabled: true` are skipped.
511
+
512
+ #### Conflict resolution
513
+
514
+ When the same MCP server name appears in multiple sources:
515
+
516
+ 1. **Within one agent**: earlier files win; project-level entries win over top-level (Claude Code); modern `mcp` block wins over legacy `mcpServers` (OpenCode); `~/.cursor/mcp.json` wins over `~/.config/cursor/mcp.json` (Cursor).
517
+ 2. **Across agents**: Claude Code wins over OpenCode, which wins over Cursor.
518
+ 3. **Against existing Ekravo config**: your entries in `~/.config/ekravo/harness/mcp.json` always win.
519
+
520
+ #### "Never ask again"
521
+
522
+ Stored in `~/.config/ekravo/config.json` (`migrationState: "skip-forever"`). Delete that field to re-trigger the prompt. Adding support for another agent is a small change -- drop a new definition into `src/agent-discovery/agents/` and append it to the registry.
523
+
524
+ ## Development
525
+
526
+ ### Prerequisites
527
+
528
+ - Node.js 22 (LTS)
529
+ - [Bun](https://bun.sh/) (dev server and binary compilation)
530
+ - [corepack](https://nodejs.org/api/corepack.html) enabled (`corepack enable`)
531
+ - pnpm (installed automatically via corepack)
532
+
533
+ ### Quick setup
534
+
535
+ ```bash
536
+ ./scripts/dev-startup.sh
537
+ ```
538
+
539
+ This script checks and installs node, pnpm, and bun if missing, initializes git submodules, runs `pnpm install`, copies resources, and starts the harness with `pnpm run dev`.
540
+
541
+ ### Manual setup
542
+
543
+ ```bash
544
+ git clone https://github.com/EOSKILLZ/ACHECLI.git
545
+ cd ACHECLI
546
+ # Currently a no-op (no submodules after superpowers removal); kept for future use
547
+ git submodule update --init --recursive
548
+ corepack enable
549
+ pnpm install
550
+ ```
551
+
552
+ ### Commands
553
+
554
+ | Command | Description |
555
+ |---------|-------------|
556
+ | `pnpm run build` | Compile TypeScript to `dist/` and copy theme assets |
557
+ | `pnpm run dev` | Run the CLI locally via Bun |
558
+ | `pnpm run check` | Biome lint + TypeScript type check |
559
+ | `pnpm run lint` | Biome lint only |
560
+ | `pnpm run lint:fix` | Biome lint with auto-fix |
561
+ | `pnpm run test` | Run tests with vitest |
562
+ | `pnpm run test:smoke` | End-to-end smoke tests |
563
+
564
+ ### Running locally
565
+
566
+ Propagate resources before first run:
567
+
568
+ ```bash
569
+ node ./scripts/copy-resources.js --dev
570
+ ```
571
+
572
+ Run the CLI directly via Bun:
573
+
574
+ ```bash
575
+ pnpm run dev
576
+ ```
577
+
578
+ Or build a standalone binary:
579
+
580
+ ```bash
581
+ pnpm run build:binary
582
+ ./dist/bin/ekravo
583
+ ```
584
+
585
+ ### Project structure
586
+
587
+ ```
588
+ src/
589
+ entry.ts -- Entry point
590
+ cli.ts -- CLI logic & harness initialization
591
+ cli-args.ts -- Argument parsing
592
+ config.ts -- Auth & config loading
593
+ models.ts -- Model metadata fetching & registration
594
+ setup-wizard.ts -- First-run wizard
595
+ commands/ -- CLI subcommands (setup, login, config, update, ...)
596
+ extensions/ -- Agent extensions
597
+ agents/ -- Subagent system (personas, manager, memory)
598
+ orchestration/ -- Task classification, model registry, delegation
599
+ ferment/ -- Ferment lifecycle tools & UI
600
+ mcp-adapter/ -- MCP server integration
601
+ permissions/ -- Tool auth flows
602
+ behaviours/ -- Contextual prompt behaviours
603
+ web-fetch/ -- Web content fetching
604
+ web-search/ -- Web search
605
+ lsp/ -- Language Server Protocol
606
+ login/ -- OAuth flows
607
+ onboarding/ -- Session mode startup wizard
608
+ ferment/ -- Ferment state machine, event store, stats
609
+ modes/
610
+ interactive/ -- TUI harness
611
+ acp/ -- JSON-RPC over stdio (IDE integration)
612
+ teleport/ -- Remote session multiplexing
613
+ agent-discovery/ -- Detection & migration of other coding agents
614
+ config/ -- Config loading & merging
615
+ auth/ -- API key management
616
+ utils/ -- Shared helpers
617
+ ```
618
+
619
+ ## Benchmarking
620
+
621
+ The `benchmark/` directory contains tools for smoke-testing ekravo sessions and auditing their quality.
622
+
623
+ - **Manual benchmarks** (`benchmark/manual/`) -- run predefined tasks against different models and compare results. See `benchmark/manual/README.md`.
624
+ - **Terminal-bench-2** (`benchmark/terminal-bench-2/`) -- run the [terminal-bench](https://www.harborframework.com/) suite (89 tasks) against ekravo inside Docker containers. See `benchmark/terminal-bench-2/README.md`.
625
+ - **Session audit** (`benchmark/audit-session/`) -- audit a completed session for phase discipline, code quality, architecture, testing, model alignment, and cost efficiency. See `benchmark/audit-session/README.md`.
626
+
627
+ ## Release
628
+
629
+ `pnpm run build:binary` compiles a standalone binary with `bun build --compile` (no runtime required on the
630
+ user's machine) and produces `dist/bin/ekravo`.
631
+
632
+ Supported platforms:
633
+
634
+ - macOS (amd64, arm64)
635
+ - Linux (amd64, arm64)
636
+ - Windows (amd64)
637
+
638
+ `.github/workflows/release.yml`, `scripts/install.sh`, and `scripts/install.ps1` are adapted for this fork:
639
+ GitHub Actions builds and uploads the `ekravo` binary, release assets follow `ekravo_{os}_{arch}.tar.gz`
640
+ (macOS/Linux) / `ekravo_windows_amd64.zip` naming with a `checksums.txt` (SHA256), and the install scripts pull
641
+ from `EOSKILLZ/ACHECLI` releases by default. **Homebrew publishing was removed, not reworked** -- the upstream
642
+ release pipeline pushed formula updates to `getache/homebrew-tap`, a repository this fork has no
643
+ access to, and no Ekravo-owned tap exists yet (see `.ekravo/decisions.md` for how to reinstate it later). Nothing
644
+ in this pipeline has actually been run yet -- no tag has been pushed and no release has been cut.
645
+
646
+ Windows build and local VM testing notes live in [`docs/windows/README.md`](docs/windows/README.md).
647
+
648
+ ## License
649
+
650
+ [Apache License 2.0](LICENSE) -- see [CONTRIBUTING.md](CONTRIBUTING.md) for the CLA and contributor guidelines.