@kata-sh/cli 0.2.0 → 0.2.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 +220 -207
- package/package.json +3 -2
- package/pkg/CHANGELOG.md +25 -0
package/README.md
CHANGED
|
@@ -1,166 +1,250 @@
|
|
|
1
1
|
# Kata CLI
|
|
2
2
|
|
|
3
|
-
A terminal coding agent
|
|
3
|
+
A terminal coding agent that decomposes projects into milestones, slices, and tasks — then executes them autonomously with structured planning, verification, and fresh context windows.
|
|
4
|
+
|
|
5
|
+
Built on [pi](https://github.com/badlogic/pi-mono) (`@mariozechner/pi-coding-agent`).
|
|
4
6
|
|
|
5
7
|
## Quick Start
|
|
6
8
|
|
|
7
9
|
```bash
|
|
8
|
-
|
|
9
|
-
bun install
|
|
10
|
-
cd apps/cli
|
|
11
|
-
npx tsc
|
|
12
|
-
npm run copy-themes
|
|
13
|
-
node dist/loader.js
|
|
10
|
+
npx @kata-sh/cli
|
|
14
11
|
```
|
|
15
12
|
|
|
16
|
-
|
|
13
|
+
Or install globally:
|
|
17
14
|
|
|
18
15
|
```bash
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
npm install -g @kata-sh/cli
|
|
17
|
+
kata-cli
|
|
21
18
|
```
|
|
22
19
|
|
|
23
|
-
|
|
20
|
+
On first launch, Kata will prompt you to authenticate with an AI provider.
|
|
24
21
|
|
|
25
|
-
|
|
22
|
+
## Getting Started
|
|
23
|
+
|
|
24
|
+
### 1. Start Kata
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx @kata-sh/cli
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### 2. Log in to a provider
|
|
26
31
|
|
|
27
32
|
```
|
|
28
|
-
|
|
29
|
-
src/
|
|
30
|
-
loader.ts — Entry point: sets KATA_* env vars, imports cli.ts
|
|
31
|
-
cli.ts — Calls createAgentSession() + InteractiveMode
|
|
32
|
-
app-paths.ts — ~/.kata-cli/ path constants
|
|
33
|
-
resource-loader.ts — Syncs bundled resources to ~/.kata-cli/agent/
|
|
34
|
-
wizard.ts — First-run setup, env key hydration
|
|
35
|
-
resources/
|
|
36
|
-
KATA-WORKFLOW.md — The Kata planning methodology
|
|
37
|
-
AGENTS.md — System prompt instructions (synced to agent dir)
|
|
38
|
-
agents/ — Agent templates (worker, scout, researcher)
|
|
39
|
-
extensions/ — Bundled extensions (see below)
|
|
40
|
-
skills/ — Bundled skills
|
|
41
|
-
pkg/
|
|
42
|
-
package.json — piConfig shim (name: "kata", configDir: ".kata-cli")
|
|
43
|
-
dist/ — Theme assets copied from pi-coding-agent
|
|
33
|
+
/login
|
|
44
34
|
```
|
|
45
35
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
1. `loader.ts` sets `PI_PACKAGE_DIR` to `pkg/` so pi reads Kata's branding config
|
|
49
|
-
2. `loader.ts` sets `KATA_CODING_AGENT_DIR` so pi uses `~/.kata-cli/agent/` instead of `~/.pi/agent/`
|
|
50
|
-
3. `loader.ts` injects `--mcp-config ~/.kata-cli/agent/mcp.json` into `process.argv` for the MCP adapter
|
|
51
|
-
4. `resource-loader.ts` syncs bundled extensions, agents, skills, and `AGENTS.md` to `~/.kata-cli/agent/` on every launch
|
|
52
|
-
5. `resource-loader.ts` scaffolds a starter `mcp.json` on first launch (never overwrites existing config)
|
|
53
|
-
6. `cli.ts` seeds `npm:pi-mcp-adapter` into settings so pi auto-installs it
|
|
54
|
-
7. `cli.ts` injects the `mcp-config` flag into the extension runtime (required because Kata bypasses pi's `main()` and its two-pass argv parsing)
|
|
55
|
-
8. `cli.ts` calls `createAgentSession()` + `InteractiveMode` — pi handles everything from there
|
|
56
|
-
|
|
57
|
-
## Bundled Extensions
|
|
58
|
-
|
|
59
|
-
| Extension | Description |
|
|
60
|
-
|-----------|-------------|
|
|
61
|
-
| `kata/` | Main extension: `/kata` command, auto-mode, planning, state management |
|
|
62
|
-
| `browser-tools/` | Playwright-based browser automation |
|
|
63
|
-
| `subagent/` | Spawns child Kata processes for parallel work |
|
|
64
|
-
| `slash-commands/` | `/kata-run` and other slash commands |
|
|
65
|
-
| `bg-shell/` | Background shell execution |
|
|
66
|
-
| `context7/` | Context7 library documentation lookup |
|
|
67
|
-
| `search-the-web/` | Web search via Brave API |
|
|
68
|
-
| `mac-tools/` | macOS-specific utilities |
|
|
69
|
-
| `shared/` | Shared UI components (library, not an entry point) |
|
|
36
|
+
This opens an interactive prompt to authenticate with Anthropic, OpenAI, Google, or any supported provider. You can also set an API key directly:
|
|
70
37
|
|
|
71
|
-
|
|
38
|
+
```bash
|
|
39
|
+
ANTHROPIC_API_KEY=sk-ant-... npx @kata-sh/cli
|
|
40
|
+
```
|
|
72
41
|
|
|
73
|
-
|
|
42
|
+
### 3. Select a model
|
|
74
43
|
|
|
75
|
-
|
|
44
|
+
```
|
|
45
|
+
/model
|
|
46
|
+
```
|
|
76
47
|
|
|
77
|
-
|
|
48
|
+
Pick from available models across your authenticated providers.
|
|
78
49
|
|
|
79
|
-
|
|
80
|
-
2. **Config path injection**: `loader.ts` pushes `--mcp-config` into `process.argv` and `cli.ts` sets the flag on `runtime.flagValues` — both are needed because the adapter reads the config path at two different points in its lifecycle.
|
|
81
|
-
3. **Config scaffolding**: `resource-loader.ts` creates a starter `~/.kata-cli/agent/mcp.json` on first launch. Never overwrites existing config.
|
|
50
|
+
### 4. Start working
|
|
82
51
|
|
|
83
|
-
|
|
52
|
+
Tell Kata what you want to build. Kata has three modes of operation:
|
|
84
53
|
|
|
85
|
-
|
|
54
|
+
**Step mode** — `/kata` — human in the loop (recommended for new or risk-averse users). Kata proposes each step, you approve or redirect.
|
|
55
|
+
|
|
56
|
+
**Autonomous mode** — `/kata auto` — researches, plans, executes, verifies, commits, and advances through every slice until the milestone is complete.
|
|
57
|
+
|
|
58
|
+
**Steering mode** — two terminals for supervised autonomy:
|
|
86
59
|
|
|
87
|
-
```json
|
|
88
|
-
{
|
|
89
|
-
"settings": {
|
|
90
|
-
"toolPrefix": "server",
|
|
91
|
-
"idleTimeout": 10
|
|
92
|
-
},
|
|
93
|
-
"mcpServers": {}
|
|
94
|
-
}
|
|
95
60
|
```
|
|
61
|
+
# Terminal 1: autonomous execution
|
|
62
|
+
/kata auto
|
|
96
63
|
|
|
97
|
-
|
|
64
|
+
# Terminal 2: observe and steer
|
|
65
|
+
/kata status — check progress
|
|
66
|
+
/kata discuss — discuss decisions
|
|
67
|
+
/kata queue — manage upcoming work
|
|
98
68
|
|
|
99
|
-
|
|
69
|
+
# When you need to interrupt and redirect:
|
|
70
|
+
# Terminal 1:
|
|
71
|
+
/kata stop
|
|
72
|
+
```
|
|
100
73
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
}
|
|
74
|
+
## How It Works
|
|
75
|
+
|
|
76
|
+
Kata breaks work into three levels:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
Milestone → a shippable version (4–10 slices)
|
|
80
|
+
Slice → one demoable vertical capability (1–7 tasks)
|
|
81
|
+
Task → one context-window-sized unit of work
|
|
111
82
|
```
|
|
112
83
|
|
|
113
|
-
|
|
84
|
+
Each slice flows through phases automatically:
|
|
114
85
|
|
|
115
|
-
|
|
116
|
-
```
|
|
117
|
-
mcp({ connect: "linear" })
|
|
118
|
-
```
|
|
119
|
-
2. Authorize in the browser when prompted by Linear.
|
|
120
|
-
3. Use tools:
|
|
121
|
-
```
|
|
122
|
-
mcp({ server: "linear" }) — list all Linear tools
|
|
123
|
-
mcp({ search: "issues" }) — search for issue-related tools
|
|
124
|
-
mcp({ tool: "linear_list_teams" }) — call a tool
|
|
125
|
-
```
|
|
86
|
+
**Research** → **Plan** → **Execute** (per task) → **Complete** → **Reassess** → **Next Slice**
|
|
126
87
|
|
|
127
|
-
|
|
88
|
+
- **Research** scouts the codebase and relevant docs
|
|
89
|
+
- **Plan** decomposes the slice into tasks with must-haves — mechanically verifiable outcomes
|
|
90
|
+
- **Execute** runs each task in a fresh context window with only the relevant files pre-loaded
|
|
91
|
+
- **Complete** writes the summary, UAT script, marks the roadmap, and commits
|
|
92
|
+
- **Reassess** checks if the roadmap still makes sense given what was learned
|
|
128
93
|
|
|
129
|
-
|
|
94
|
+
All planning state lives in `.kata/` at the project root — human-readable markdown files that track milestones, slices, tasks, decisions, and progress.
|
|
130
95
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
96
|
+
## Commands
|
|
97
|
+
|
|
98
|
+
### Kata workflow
|
|
99
|
+
|
|
100
|
+
| Command | Description |
|
|
101
|
+
|---------|-------------|
|
|
102
|
+
| `/kata` | Contextual wizard — suggests next step based on project state |
|
|
103
|
+
| `/kata auto` | Start autonomous mode |
|
|
104
|
+
| `/kata stop` | Stop auto-mode after current task |
|
|
105
|
+
| `/kata status` | Progress dashboard |
|
|
106
|
+
| `/kata queue` | View/manage milestone queue |
|
|
107
|
+
| `/kata discuss` | Discuss gray areas before planning |
|
|
108
|
+
| `/kata prefs` | Manage preferences (global/project) |
|
|
109
|
+
| `/kata doctor` | Diagnose and fix project state |
|
|
110
|
+
| `/audit` | Audit the codebase against a goal, writes report to `.kata/audits/` |
|
|
111
|
+
|
|
112
|
+
### Session & model
|
|
113
|
+
|
|
114
|
+
| Command | Description |
|
|
115
|
+
|---------|-------------|
|
|
116
|
+
| `/login` | Authenticate with an AI provider (OAuth) |
|
|
117
|
+
| `/model` | Select a model |
|
|
118
|
+
| `/scoped-models` | Enable/disable models for `Ctrl+P` cycling |
|
|
119
|
+
| `/new` | Start a new session |
|
|
120
|
+
| `/resume` | Resume a previous session |
|
|
121
|
+
| `/compact` | Manually compact the session context |
|
|
122
|
+
| `/fork` | Create a new fork from a previous message |
|
|
123
|
+
| `/tree` | Navigate session tree (switch branches) |
|
|
124
|
+
| `/session` | Show session info and stats |
|
|
125
|
+
|
|
126
|
+
### Utilities
|
|
127
|
+
|
|
128
|
+
| Command | Description |
|
|
129
|
+
|---------|-------------|
|
|
130
|
+
| `/mcp` | Show MCP server status and tools |
|
|
131
|
+
| `/gh` | GitHub helper — issues, PRs, labels, milestones, status |
|
|
132
|
+
| `/subagent` | List available subagents |
|
|
133
|
+
| `/export` | Export session to HTML file |
|
|
134
|
+
| `/share` | Share session as a secret GitHub gist |
|
|
135
|
+
| `/copy` | Copy last agent message to clipboard |
|
|
136
|
+
| `/hotkeys` | Show all keyboard shortcuts |
|
|
137
|
+
| `/create-extension` | Scaffold a new extension with interview-driven setup |
|
|
138
|
+
| `/create-slash-command` | Generate a new slash command from a plain-English description |
|
|
139
|
+
|
|
140
|
+
## Preferences
|
|
141
|
+
|
|
142
|
+
Kata preferences live in `~/.kata-cli/preferences.md` (global) or `.kata-cli/preferences.md` (project-local). Manage with `/kata prefs`.
|
|
143
|
+
|
|
144
|
+
```yaml
|
|
145
|
+
---
|
|
146
|
+
version: 1
|
|
147
|
+
models:
|
|
148
|
+
research: claude-sonnet-4-6
|
|
149
|
+
planning: claude-opus-4-6
|
|
150
|
+
execution: claude-sonnet-4-6
|
|
151
|
+
completion: claude-sonnet-4-6
|
|
152
|
+
skill_discovery: suggest
|
|
153
|
+
auto_supervisor:
|
|
154
|
+
soft_timeout_minutes: 20
|
|
155
|
+
idle_timeout_minutes: 10
|
|
156
|
+
hard_timeout_minutes: 30
|
|
157
|
+
budget_ceiling: 50.00
|
|
158
|
+
---
|
|
143
159
|
```
|
|
144
160
|
|
|
145
|
-
|
|
161
|
+
| Setting | What it controls |
|
|
162
|
+
|---------|-----------------|
|
|
163
|
+
| `models.*` | Per-phase model selection (Opus for planning, Sonnet for execution, etc.) |
|
|
164
|
+
| `skill_discovery` | `auto` / `suggest` / `off` — how Kata finds and applies skills |
|
|
165
|
+
| `auto_supervisor.*` | Timeout thresholds for auto-mode supervision |
|
|
166
|
+
| `budget_ceiling` | USD ceiling — auto mode pauses when reached |
|
|
167
|
+
| `uat_dispatch` | Enable automatic UAT runs after slice completion |
|
|
168
|
+
| `always_use_skills` | Skills to always load when relevant |
|
|
169
|
+
| `skill_rules` | Situational rules for skill routing |
|
|
170
|
+
|
|
171
|
+
## Project State
|
|
146
172
|
|
|
147
|
-
|
|
173
|
+
Kata stores all planning artifacts in `.kata/` at the project root:
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
.kata/
|
|
177
|
+
STATE.md — Quick-glance dashboard
|
|
178
|
+
PROJECT.md — What the project is (living doc)
|
|
179
|
+
DECISIONS.md — Append-only architecture decisions
|
|
180
|
+
REQUIREMENTS.md — Requirements tracking
|
|
181
|
+
milestones/
|
|
182
|
+
M001/
|
|
183
|
+
M001-ROADMAP.md — Slices with risk levels and dependencies
|
|
184
|
+
M001-SUMMARY.md — Milestone rollup
|
|
185
|
+
slices/
|
|
186
|
+
S01/
|
|
187
|
+
S01-PLAN.md — Tasks with must-haves and estimates
|
|
188
|
+
S01-SUMMARY.md — What was built, what changed
|
|
189
|
+
tasks/
|
|
190
|
+
T01-PLAN.md — Steps, verification, files touched
|
|
191
|
+
T01-SUMMARY.md
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Everything is markdown. You can read it, edit it, or use it as context for other tools.
|
|
195
|
+
|
|
196
|
+
## Bundled Tools
|
|
197
|
+
|
|
198
|
+
Kata comes with extensions for:
|
|
199
|
+
|
|
200
|
+
- **Browser automation** — Playwright-based interaction with web pages
|
|
201
|
+
- **Subagents** — Spawn parallel Kata processes for independent tasks
|
|
202
|
+
- **Background shell** — Long-running processes (servers, watchers, builds)
|
|
203
|
+
- **Web search** — Brave Search API for current external facts
|
|
204
|
+
- **Library docs** — Context7 for up-to-date framework/library documentation
|
|
205
|
+
- **macOS tools** — Native app automation via Accessibility APIs
|
|
206
|
+
- **MCP servers** — Connect to any [Model Context Protocol](https://modelcontextprotocol.io/) server
|
|
207
|
+
|
|
208
|
+
## Bundled Agents
|
|
209
|
+
|
|
210
|
+
Three specialized subagents for delegated work:
|
|
211
|
+
|
|
212
|
+
| Agent | Role |
|
|
213
|
+
|-------|------|
|
|
214
|
+
| **Scout** | Fast codebase recon — returns compressed context for handoff |
|
|
215
|
+
| **Researcher** | Web research — finds and synthesizes current information |
|
|
216
|
+
| **Worker** | General-purpose execution in an isolated context window |
|
|
217
|
+
|
|
218
|
+
## MCP Support
|
|
219
|
+
|
|
220
|
+
Kata integrates with MCP servers via [`pi-mcp-adapter`](https://github.com/nicobailon/pi-mcp-adapter), auto-installed on first launch. Connect to Linear, Figma, or any MCP-compatible service.
|
|
221
|
+
|
|
222
|
+
### Adding a server
|
|
223
|
+
|
|
224
|
+
Edit `~/.kata-cli/agent/mcp.json`:
|
|
148
225
|
|
|
149
226
|
```json
|
|
150
227
|
{
|
|
151
228
|
"mcpServers": {
|
|
152
|
-
"
|
|
153
|
-
"
|
|
154
|
-
"
|
|
155
|
-
"bearerTokenEnv": "MY_API_KEY"
|
|
229
|
+
"linear": {
|
|
230
|
+
"command": "npx",
|
|
231
|
+
"args": ["-y", "mcp-remote", "https://mcp.linear.app/mcp"]
|
|
156
232
|
}
|
|
157
233
|
}
|
|
158
234
|
}
|
|
159
235
|
```
|
|
160
236
|
|
|
161
|
-
|
|
237
|
+
Restart Kata, then connect:
|
|
238
|
+
|
|
239
|
+
```
|
|
240
|
+
mcp({ connect: "linear" })
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
OAuth servers (Linear, etc.) open a browser window for authorization on first connect. Tokens are cached for subsequent sessions.
|
|
162
244
|
|
|
163
|
-
|
|
245
|
+
### Importing existing configs
|
|
246
|
+
|
|
247
|
+
Pull in MCP configs from other tools:
|
|
164
248
|
|
|
165
249
|
```json
|
|
166
250
|
{
|
|
@@ -171,121 +255,50 @@ Pull in your existing Claude Code, Cursor, or VS Code MCP configuration:
|
|
|
171
255
|
|
|
172
256
|
Supported: `cursor`, `claude-code`, `claude-desktop`, `vscode`, `windsurf`, `codex`.
|
|
173
257
|
|
|
174
|
-
###
|
|
175
|
-
|
|
176
|
-
| Mode | Behavior |
|
|
177
|
-
|------|----------|
|
|
178
|
-
| `lazy` (default) | Connect on first tool call. Disconnect after idle timeout. Cached metadata keeps search/list working offline. |
|
|
179
|
-
| `eager` | Connect at startup. No auto-reconnect on drop. |
|
|
180
|
-
| `keep-alive` | Connect at startup. Auto-reconnect via health checks. |
|
|
181
|
-
|
|
182
|
-
### Usage Reference
|
|
258
|
+
### Usage
|
|
183
259
|
|
|
184
260
|
| Command | Description |
|
|
185
261
|
|---------|-------------|
|
|
186
262
|
| `mcp({ })` | Show server status |
|
|
187
263
|
| `mcp({ server: "name" })` | List tools from a server |
|
|
188
|
-
| `mcp({ search: "query" })` | Search tools
|
|
189
|
-
| `mcp({
|
|
190
|
-
|
|
|
191
|
-
| `mcp({ connect: "name" })` | Force connect/reconnect a server |
|
|
192
|
-
| `/mcp` | Interactive panel (status, tools, reconnect) |
|
|
193
|
-
|
|
194
|
-
### Known Limitations
|
|
264
|
+
| `mcp({ search: "query" })` | Search tools across servers |
|
|
265
|
+
| `mcp({ tool: "name", args: '{}' })` | Call a tool |
|
|
266
|
+
| `/mcp` | Interactive panel |
|
|
195
267
|
|
|
196
|
-
|
|
197
|
-
- **Figma remote MCP** (`mcp.figma.com`): Blocks dynamic client registration — only whitelisted clients can connect via OAuth. Use Figma's desktop app local MCP server instead (`http://127.0.0.1:3845/mcp`), which requires Dev Mode (paid plan).
|
|
198
|
-
- **Metadata cache**: `pi-mcp-adapter` caches tool metadata to `~/.pi/agent/mcp-cache.json` (hardcoded path, doesn't affect functionality).
|
|
199
|
-
- **OAuth token storage**: `mcp-remote` stores tokens in `~/.mcp-auth/`, separate from Kata's config dir.
|
|
268
|
+
## Configuration
|
|
200
269
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
The main extension registers `/kata` with subcommands:
|
|
204
|
-
|
|
205
|
-
| Command | Description |
|
|
206
|
-
|---------|-------------|
|
|
207
|
-
| `/kata` | Contextual wizard — smart entry point based on project state |
|
|
208
|
-
| `/kata auto` | Start auto-mode (loops fresh sessions until milestone complete) |
|
|
209
|
-
| `/kata stop` | Stop auto-mode gracefully |
|
|
210
|
-
| `/kata status` | Progress dashboard |
|
|
211
|
-
| `/kata queue` | View/manage work queue |
|
|
212
|
-
| `/kata discuss` | Discuss gray areas before planning |
|
|
213
|
-
| `/kata prefs` | Manage preferences (global/project/status) |
|
|
214
|
-
| `/kata doctor` | Diagnose and fix project state |
|
|
215
|
-
|
|
216
|
-
### Project State
|
|
217
|
-
|
|
218
|
-
Kata stores planning state in `.kata/` at the project root:
|
|
219
|
-
|
|
220
|
-
```
|
|
221
|
-
.kata/
|
|
222
|
-
STATE.md — Dashboard (read first)
|
|
223
|
-
DECISIONS.md — Append-only decisions register
|
|
224
|
-
PROJECT.md — Project description
|
|
225
|
-
REQUIREMENTS.md — Requirements tracking
|
|
226
|
-
milestones/
|
|
227
|
-
M001/
|
|
228
|
-
M001-ROADMAP.md — Milestone plan with slices
|
|
229
|
-
slices/
|
|
230
|
-
S01/
|
|
231
|
-
S01-PLAN.md — Task decomposition
|
|
232
|
-
tasks/
|
|
233
|
-
T01-PLAN.md
|
|
234
|
-
T01-SUMMARY.md
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
## Config Directory
|
|
238
|
-
|
|
239
|
-
Kata uses `~/.kata-cli/` (not `~/.kata/`) to avoid collision with other Kata apps (desktop, etc.):
|
|
270
|
+
Kata stores config in `~/.kata-cli/`:
|
|
240
271
|
|
|
241
272
|
```
|
|
242
273
|
~/.kata-cli/
|
|
243
274
|
agent/
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
auth.json — API keys
|
|
250
|
-
settings.json — User settings (includes packages: ["npm:pi-mcp-adapter"])
|
|
251
|
-
models.json — Custom model definitions
|
|
275
|
+
mcp.json — MCP server configuration
|
|
276
|
+
auth.json — Provider API keys
|
|
277
|
+
settings.json — User settings
|
|
278
|
+
extensions/ — Bundled extensions (synced on launch)
|
|
279
|
+
skills/ — Bundled skills
|
|
252
280
|
sessions/ — Session history
|
|
253
|
-
preferences.md — Global
|
|
281
|
+
preferences.md — Global preferences
|
|
254
282
|
```
|
|
255
283
|
|
|
256
|
-
## Environment Variables
|
|
257
|
-
|
|
258
|
-
Set by `loader.ts` before pi starts:
|
|
259
|
-
|
|
260
|
-
| Variable | Purpose |
|
|
261
|
-
|----------|---------|
|
|
262
|
-
| `PI_PACKAGE_DIR` | Points to `pkg/` for Kata's piConfig |
|
|
263
|
-
| `KATA_CODING_AGENT_DIR` | Tells pi to use `~/.kata-cli/agent/` |
|
|
264
|
-
| `KATA_VERSION` | Package version for display |
|
|
265
|
-
| `KATA_BIN_PATH` | Absolute path to loader, used by subagent |
|
|
266
|
-
| `KATA_WORKFLOW_PATH` | Absolute path to bundled KATA-WORKFLOW.md |
|
|
267
|
-
| `KATA_BUNDLED_EXTENSION_PATHS` | Colon-joined extension entry points for subagent |
|
|
268
|
-
| `KATA_MCP_CONFIG_PATH` | Absolute path to `~/.kata-cli/agent/mcp.json` |
|
|
269
|
-
|
|
270
284
|
## Development
|
|
271
285
|
|
|
286
|
+
For contributing or running from source:
|
|
287
|
+
|
|
272
288
|
```bash
|
|
273
|
-
#
|
|
289
|
+
# From the monorepo root
|
|
290
|
+
bun install
|
|
291
|
+
cd apps/cli
|
|
274
292
|
npx tsc
|
|
275
|
-
|
|
276
|
-
# Copy theme assets (required once, or after pi-coding-agent updates)
|
|
277
293
|
npm run copy-themes
|
|
278
|
-
|
|
279
|
-
# Run
|
|
280
294
|
node dist/loader.js
|
|
281
|
-
|
|
282
|
-
# Test (37 tests: app smoke, resource sync, MCP integration, package validation)
|
|
283
|
-
npm test
|
|
284
295
|
```
|
|
285
296
|
|
|
286
|
-
|
|
297
|
+
Run tests:
|
|
287
298
|
|
|
288
|
-
|
|
299
|
+
```bash
|
|
300
|
+
cd apps/cli && npm test
|
|
301
|
+
```
|
|
289
302
|
|
|
290
303
|
## License
|
|
291
304
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kata-sh/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Kata CLI coding agent",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
"node": ">=20.6.0"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
|
-
"build": "tsc && npm run copy-themes",
|
|
32
|
+
"build": "tsc && npm run copy-themes && npm run copy-changelog",
|
|
33
|
+
"copy-changelog": "node -e \"require('fs').cpSync('CHANGELOG.md','pkg/CHANGELOG.md')\"",
|
|
33
34
|
"copy-themes": "node -e \"const{mkdirSync,cpSync}=require('fs');const{resolve}=require('path');const candidates=[resolve(__dirname,'node_modules/@mariozechner/pi-coding-agent/dist/modes/interactive/theme'),resolve(__dirname,'..','..','node_modules/@mariozechner/pi-coding-agent/dist/modes/interactive/theme')];const src=candidates.find(p=>{try{require('fs').statSync(p);return true}catch{return false}});if(!src)throw new Error('theme dir not found');mkdirSync('pkg/dist/modes/interactive/theme',{recursive:true});cpSync(src,'pkg/dist/modes/interactive/theme',{recursive:true})\"",
|
|
34
35
|
"test": "node --import ./src/resources/extensions/kata/tests/resolve-ts.mjs --experimental-strip-types --test 'src/resources/extensions/kata/tests/*.test.ts' 'src/resources/extensions/kata/tests/*.test.mjs' 'src/tests/*.test.ts'",
|
|
35
36
|
"dev": "tsc --watch",
|
package/pkg/CHANGELOG.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
- Fix `/changelog` command — symlink `pkg/CHANGELOG.md` so Kata can find it
|
|
6
|
+
- Rewrite README for consumers: quick start with `npx`, getting started flow, how it works, mode comparison, full command reference
|
|
7
|
+
|
|
8
|
+
## 0.2.0
|
|
9
|
+
|
|
10
|
+
- Add MCP (Model Context Protocol) support via `pi-mcp-adapter` — connect to any MCP server (Linear, Figma, custom tools) from Kata
|
|
11
|
+
- Auto-install `pi-mcp-adapter` on startup and scaffold starter `mcp.json` config
|
|
12
|
+
- Inject `mcp-config` flag into extension runtime for seamless MCP server discovery
|
|
13
|
+
- Fix inline `[]` and `{}` literal handling in preferences YAML parser
|
|
14
|
+
- Add comprehensive MCP documentation and setup guide to README
|
|
15
|
+
- Add MCP smoke tests to CI
|
|
16
|
+
- Install `pi-mcp-adapter` globally in CI for test coverage
|
|
17
|
+
|
|
18
|
+
## 0.1.2
|
|
19
|
+
|
|
20
|
+
- Fix `~/.kata/` paths to `~/.kata-cli/` to avoid collision with Kata Desktop config directory
|
|
21
|
+
|
|
22
|
+
## 0.1.1
|
|
23
|
+
|
|
24
|
+
- Rename `@kata/*` to `@kata-sh/*` npm scope
|
|
25
|
+
- Initial public release to npm
|