kino-cli 0.1.4 → 0.1.5

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,15 +1,447 @@
1
1
  # kino-cli
2
2
 
3
- kino learns a codebase and its tools, then works as one of the team's developers by running processes
4
- (ticket to PR, review loops, and more). It includes **kino-code**, a coding agent that runs on any model.
3
+ kino works in your team's repository as one of its developers. It learns the codebase and the tools around it,
4
+ answers questions about it, writes and fixes code, and runs the team's documented processes, such as ticket to
5
+ pull request or working through review comments. It runs on the model you choose, and it asks before anything
6
+ leaves your machine.
7
+
8
+ This guide covers everything, start to finish:
9
+
10
+ 1. [Install](#1-install)
11
+ 2. [First start: choosing a model](#2-first-start-choosing-a-model)
12
+ 3. [The console](#3-the-console)
13
+ 4. [Approvals and modes](#4-approvals-and-modes)
14
+ 5. [Console commands and keys](#5-console-commands-and-keys)
15
+ 6. [kino-code without the console](#6-kino-code-without-the-console)
16
+ 7. [Setting kino up for a team repo](#7-setting-kino-up-for-a-team-repo)
17
+ 8. [Processes](#8-processes)
18
+ 9. [Connecting your tools](#9-connecting-your-tools)
19
+ 10. [Knowledge](#10-knowledge)
20
+ 11. [Who writes the code](#11-who-writes-the-code)
21
+ 12. [Safety](#12-safety)
22
+ 13. [Configuration reference](#13-configuration-reference)
23
+ 14. [Updating, uninstalling, troubleshooting](#14-updating-uninstalling-troubleshooting)
24
+
25
+ ---
26
+
27
+ ## 1. Install
28
+
29
+ ```bash
30
+ npm i -g kino-cli # Node 18 or newer
31
+ brew install dogukangun/tap/kino-cli # or Homebrew (macOS, Linux)
32
+ npx kino-cli # or try it without installing
33
+ ```
34
+
35
+ Check it with `kino --version`.
36
+
37
+ kino ships compiled for macOS (Apple silicon and Intel), Linux (x64 and arm64) and Windows (x64). It runs through
38
+ [uv](https://docs.astral.sh/uv), which fetches Python 3.12 and kino's libraries on the first run and caches them,
39
+ so the first start takes a little longer. If uv is missing, the npm package installs it. Set
40
+ `KINO_NO_UV_INSTALL=1` to stop that, or `KINO_UV=/path/to/uv` to use a specific uv.
41
+
42
+ ## 2. First start: choosing a model
43
+
44
+ kino needs a language model. Open it in any folder:
45
+
46
+ ```bash
47
+ cd ~/code/my-project
48
+ kino
49
+ ```
50
+
51
+ The first time, kino looks at what this machine can already use and offers it:
52
+
53
+ ```
54
+ ╭─ Choose a model ─────────────────────────────────────────╮
55
+ │ kino needs a model to work. Found on this machine: │
56
+ │ Saved for every folder; /model changes it. │
57
+ │ │
58
+ │ 1. Claude Sonnet 5.5, with your Claude Code login │
59
+ │ 2. Claude Opus 5.5, with your Claude Code login │
60
+ │ 3. Another model: type provider:model │
61
+ ╰──────────────────────────────────────────────────────────╯
62
+ choose 1-3 or type an option:
63
+ ```
64
+
65
+ What it looks for:
66
+
67
+ | Found | Offered as |
68
+ |---|---|
69
+ | Claude Code installed and logged in | Claude models on your Claude Code login: `claude-code:<model>` (no API key needed) |
70
+ | Claude Code installed, logged out | "Log in to Claude Code now", which opens Claude Code's own sign-in |
71
+ | `ANTHROPIC_API_KEY` | Claude models on that key: `anthropic:<model>` |
72
+ | `OPENAI_API_KEY`, `GEMINI_API_KEY` or `GOOGLE_API_KEY` | that provider; you type the model id |
73
+ | Ollama running locally | its installed models |
74
+
75
+ The choice is saved for every folder, in `~/.config/kino/settings.json` (`%APPDATA%\kino\settings.json` on
76
+ Windows). Change it any time:
77
+
78
+ ```bash
79
+ kino model # what kino uses now, and what this machine can run
80
+ kino model claude-code:claude-opus-5-5 # save another one
81
+ ```
82
+
83
+ In the console, `/model` opens the same picker.
84
+
85
+ **Model names** are `provider:model`:
86
+ - `claude-code:<id>`: your Claude Code login;
87
+ - `anthropic:<id>`, `openai:<id>`, `google-gla:<id>`: an API key in the environment;
88
+ - `ollama:<id>`: a local model;
89
+ - any OpenAI-compatible endpoint, configured in the workspace (see [13](#13-configuration-reference)).
90
+
91
+ **Which model is used**, first match wins:
92
+ 1. `--model` on the command line, or `/model` in the console;
93
+ 2. `models.default` in the repository's `.kino/config.yaml`;
94
+ 3. the `KINO_MODEL` environment variable;
95
+ 4. the saved choice;
96
+ 5. the first model found on this machine. kino prints which one it took.
97
+
98
+ ## 3. The console
99
+
100
+ `kino` with no command opens the console in the current folder. Type what you want in plain words and press
101
+ Enter.
102
+
103
+ **Ask about the code:**
104
+
105
+ ```
106
+ › Where is the cart total computed, and what does it do with discounts?
107
+ ```
108
+
109
+ **Give it a task:**
110
+
111
+ ```
112
+ › Cart totals ignore item quantity. Fix total() and run the tests.
113
+ ```
114
+
115
+ While it works you see each step as it happens:
116
+
117
+ ```
118
+ ● do_task · worker
119
+ ⎿ search(pattern="def total", glob="*.py")
120
+ ✓ 84 chars
121
+ ⎿ read_file(path="src/shop/cart.py")
122
+ ✓ 14 lines
123
+ ⎿ edit_file(path="src/shop/cart.py", old="sum(item.price for item in items)", new="sum(item.price * i…
124
+ ```
125
+
126
+ Before a file changes you see the change and decide:
127
+
128
+ ```
129
+ ╭─ edit src/shop/cart.py? ─────────────────────────────────╮
130
+ │ - subtotal = sum(item.price for item in items) │
131
+ │ + subtotal = sum(item.price * item.qty for item in items)
132
+ ╰──────────────────────────────────────────────────────────╯
133
+ a = apply every edit for the rest of this session
134
+ Apply this edit? [y/N/a]
135
+ ```
136
+
137
+ It then runs the tests and reports what it changed and how it checked, ending with `✓ done`.
138
+
139
+ **It remembers the conversation.** Each new message knows the earlier ones, how they ended and which files they
140
+ changed, so "now add a test for it" works. `/clear` starts over. `kino -c` reopens the last conversation, and
141
+ continues a run that was waiting or had failed.
142
+
143
+ **Attach files** with `@`: `explain @src/api/routes.py` (Tab completes paths). **Several lines:** Alt-Enter,
144
+ Ctrl-J, or a `\` at the end of a line; pasting several lines also works.
145
+
146
+ **The bar at the bottom** shows the model, the approval mode, and the tokens and requests used so far.
147
+
148
+ **Stop and leave:**
149
+ - Esc or Ctrl-C while kino works stops it. The run is kept, and `/resume` continues it.
150
+ - Ctrl-C on a line you are typing clears the line.
151
+ - To leave: type `exit` or `quit`, press Ctrl-D, or press Ctrl-C twice on an empty line.
152
+
153
+ ## 4. Approvals and modes
154
+
155
+ - **Reading** files and searching runs without asking.
156
+ - **Changing a file** shows the change first and asks `Apply this edit? [y/N/a]`. If you refuse, the file stays
157
+ as it was and kino is told.
158
+ - **Anything that leaves your machine** is asked one call at a time: `git push`, opening or commenting on a pull
159
+ request, writing to a ticket or an API. It asks `Allow this one call? [y/N/a]`.
160
+ - **`a`** allows that one kind of call for the rest of this console session only: one command (such as
161
+ `git push`), one API operation, or, for edits, every edit. `/permissions` shows what you allowed, and
162
+ `/permissions revoke <n|all>` takes it back. Nothing is remembered after you leave.
163
+
164
+ Modes, changed with `/mode`:
165
+
166
+ | Mode | File changes | Outward actions |
167
+ |---|---|---|
168
+ | `ask` (default) | shown and asked | asked |
169
+ | `auto-edit` | shown and applied | asked |
170
+ | `read-only` | refused | refused |
171
+
172
+ Some things are never done, whatever you answer: see [Safety](#12-safety).
173
+
174
+ ## 5. Console commands and keys
175
+
176
+ | Command | Does |
177
+ |---|---|
178
+ | `/help` | list the commands |
179
+ | `/model [provider:model]` | open the model picker, or switch to that model |
180
+ | `/mode [ask\|auto-edit\|read-only]` | show or set how changes are approved |
181
+ | `/permissions [revoke <n\|all>]` | what you allowed this session; take it back |
182
+ | `/diff` | `git diff` of what changed |
183
+ | `/cost` | requests, tool calls and tokens used this session |
184
+ | `/clear` | start a new conversation and clear the screen |
185
+ | `/process <name> [key=value…]` | run one of the documented processes |
186
+ | `/processes` | list the processes |
187
+ | `/runs` | list runs and their status |
188
+ | `/resume [id] [node=value…]` | continue a waiting or stopped run, answering its question |
189
+ | `/ask <query>` | search what kino knows about this repo and team |
190
+ | `/exit`, `/quit` | leave |
191
+
192
+ | Key | Does |
193
+ |---|---|
194
+ | Enter | send |
195
+ | Alt-Enter, Ctrl-J, `\` at line end | new line |
196
+ | Tab | complete a command, a process name, or a path after `@` |
197
+ | ↑ / ↓ | earlier messages |
198
+ | Esc | stop the current run |
199
+ | Ctrl-C | stop the run; clear the line; twice on an empty line to leave |
200
+ | Ctrl-D | leave |
201
+
202
+ The console needs a terminal. In a pipe, a script or CI, use the commands in the next sections.
203
+
204
+ ## 6. kino-code without the console
205
+
206
+ kino-code is kino's coding agent. `kino code` gives it one task, lets it work, and exits:
207
+
208
+ ```bash
209
+ kino code -p "fix the off-by-one in pagination and add a test"
210
+ kino code -p "…" --cwd ~/code/api --model anthropic:<id> --verbose
211
+ echo "add a --dry-run flag" | kino code
212
+ ```
213
+
214
+ Nobody is there to ask, so edits are made directly (review them with `git diff`), and anything outward, such as
215
+ push, pull requests or API writes, is refused.
216
+
217
+ | Option | Meaning |
218
+ |---|---|
219
+ | `-p, --print <task>` | the task (read from stdin when left out) |
220
+ | `--cwd <path>` | the repository to work in (default: here) |
221
+ | `--model <provider:model>` | the model (default as in [2](#2-first-start-choosing-a-model)) |
222
+ | `--verbose` | show the steps and tool calls as they happen (on stderr) |
223
+ | `--output-format text\|json` | JSON: `result`, `is_error`, `num_turns`, `duration_ms`, `model`, `usage`, `todos` |
224
+ | `--add-dir <path>` | another folder it may read but not change (repeatable) |
225
+ | `--max-turns <n>` | most model requests before it gives up (default 200) |
226
+ | `--memory-floor <pct>` | tests and builds wait while free memory is below this (default 35; `0` turns it off) |
227
+ | `--allow-outward` | let it commit, push its branch and open a PR when the task asks; for sandboxes and CI only |
228
+
229
+ What kino-code does on its own: it reads before it edits, searches with glob and grep (ripgrep when installed),
230
+ runs the repository's own test and lint commands, keeps a to-do list for longer work, and can hand a wide
231
+ investigation to a read-only helper. It follows `AGENTS.md`, `KINO.md` or `CLAUDE.md` when the repository has one.
232
+
233
+ ## 7. Setting kino up for a team repo
234
+
235
+ The console works in any folder straight away. To let kino work like a team member, set it up once in the
236
+ repository:
237
+
238
+ ```bash
239
+ cd ~/code/team-repo
240
+ kino init
241
+ ```
242
+
243
+ The setup asks:
244
+ - **the model** kino's agents use;
245
+ - **who writes code**: kino-code, or the Claude Code CLI (see [11](#11-who-writes-the-code));
246
+ - **which repositories to learn**: this one, plus GitHub or GitLab URLs or local paths (remote ones are cloned);
247
+ - **who kino works as**: the commit name and email;
248
+ - **your tools**: GitHub (`gh`), Jira, Linear, ClickUp or GitHub Issues, and the review bot;
249
+ - **your working style**, and which processes it may run.
250
+
251
+ Then it **learns each repository**. It scans the stack, the build, test and run commands for each part, the CI,
252
+ the conventions in the git history, the docs and the tools in use. Then it reads the code and writes a profile:
253
+ architecture, commands, conventions, gotchas.
254
+
255
+ Unattended, for scripts:
256
+
257
+ ```bash
258
+ kino init --yes --llm claude-code --model claude-sonnet-5-5 --coding-agent kino-code \
259
+ --repo https://github.com/acme/web --repo ~/code/api
260
+ ```
261
+
262
+ Later:
263
+
264
+ ```bash
265
+ kino learn https://gitlab.com/acme/infra # add a repository
266
+ kino relearn # learn them all again (values you set by hand are kept)
267
+ ```
268
+
269
+ What it writes:
270
+ - `.kino/config.yaml`, `.kino/knowledge/` and `.kino/processes/`: **commit these**, so the team shares one setup;
271
+ - `.kino/runs/` and connection state: local to your machine, already in `.kino/.gitignore`.
272
+
273
+ ## 8. Processes
274
+
275
+ A process is a documented way of working, drawn as a BPMN diagram, that kino carries out step by step. The
276
+ diagram decides the path: branches, loops, parallel work, waiting for a person. A step agent does each activity.
277
+ Each run is saved after every step, so it can wait for an answer, stop, and continue later.
278
+
279
+ Included:
280
+
281
+ | Process | Does |
282
+ |---|---|
283
+ | `ticket-to-pr` | a ticket to a pull request: worktree and branch, the change in the repo's style, local checks, the PR description |
284
+ | `review-bot-loop` | asks the review bot, then fixes or replies to its comments, round after round, with CI checked |
285
+ | `human-review-response` | finds people's review feedback, fixes it and replies, branch by branch |
286
+ | `review-others-prs` | reviews teammates' pull requests line by line, with real QA |
287
+ | `qa-evidence` | real QA of a feature (UI, API), with its own test data, and the QA comment |
288
+ | `sprint-ticket-sweep` | goes through your sprint's tickets one at a time, skipping the exceptions you name |
289
+ | `stacked-epic-delivery` | an epic as a stack of branches, one per ticket, then merged in order |
290
+ | `ticket-status-and-links` | links and closing comments on tickets; moves status only once the work is reviewed |
291
+ | `data-migration-runbook` | a one-off data migration: check, throttled and resumable migrate, verify |
292
+ | `customer-announcement` | a feature announcement email, per language |
293
+ | `client-demo-video` | records a product demo video |
294
+
295
+ ```bash
296
+ kino processes # list them
297
+ kino show-process ticket-to-pr # what it does, step by step
298
+ kino start ticket-to-pr --input ticket=ABC-123 # run one
299
+ kino runs # runs and their status
300
+ kino resume <run-id> --answer approve=yes # answer a waiting step
301
+ kino run "Sweep my sprint tickets except anything about billing" # a free-form task
302
+ ```
303
+
304
+ In the console: `/process ticket-to-pr ticket=ABC-123`, `/runs`, `/resume`.
305
+
306
+ **Your own processes:**
307
+ - `kino draft-process "Expenses over 500 need a manager's OK before payment"`: an agent drafts the diagram. It is
308
+ checked until it runs, then shown to you before it is saved;
309
+ - `kino import-bpmn ./expense.bpmn`: use a diagram drawn in bpmn.io or Camunda Modeler, with its own conditions.
310
+
311
+ ## 9. Connecting your tools
312
+
313
+ kino reaches your tools through the connections you already have.
314
+
315
+ **From Claude Code.** If you connected MCP servers in Claude Code (`claude mcp add …`), `kino connect` lists them
316
+ and lets you pick which ones kino uses and for what: tickets, code hosting, docs. Servers from Claude Code
317
+ plugins are included.
318
+
319
+ ```bash
320
+ kino connect
321
+ ```
322
+
323
+ **GitHub** through the `gh` CLI you are logged into (the token stays with gh):
324
+
325
+ ```bash
326
+ kino connect --gh-cli --setting org=YourOrg
327
+ ```
328
+
329
+ **Any tool with an API**, from its OpenAPI or GraphQL description, or a built-in profile:
330
+
331
+ ```bash
332
+ kino connect billing --spec https://billing.example.com/openapi.json --auth env:BILLING_TOKEN
333
+ kino connect jira --profile jira --base-url https://your-site.atlassian.net \
334
+ --auth env:JIRA_API_TOKEN --username env:JIRA_EMAIL
335
+ kino connect billing --find-spec billing-vendor.com # look up a vendor's published API
336
+ ```
337
+
338
+ Each connection gets its own agent. Reads run; **every write is confirmed, call by call**. Secrets are given as
339
+ references (`env:VAR`, `keychain:item`). They are read when a call is made and never stored in config, prompts or
340
+ logs.
341
+
342
+ Tools that only authorize through OAuth inside Claude Code, such as claude.ai connectors or ClickUp's official
343
+ server, cannot be reached from outside Claude Code. Connect those through their API instead.
344
+
345
+ ## 10. Knowledge
346
+
347
+ kino searches what it knows before it works: the repository profiles, the process documents, and anything you
348
+ add.
349
+
350
+ ```bash
351
+ kino add-docs ./handbook # a file, a folder or a URL
352
+ kino ask "how do we run the api tests" # search it yourself (in the console: /ask)
353
+ ```
354
+
355
+ Notes that belong to you rather than the team can stay outside the repository, in your own config:
356
+
357
+ ```yaml
358
+ knowledge:
359
+ - {kind: memory, path: ~/notes/agent-memory} # one fact per file
360
+ - {kind: markdown, path: ~/notes/handoff.md, stale: true}
361
+ ```
362
+
363
+ Optionally, kino can also keep a **domain specialist**: it studies your product's rules from the code and docs,
364
+ checks what it learned, and answers the other agents with sources. It is off by default; see `kino domain --help`.
365
+
366
+ ## 11. Who writes the code
367
+
368
+ In processes, the coding steps are done by the agent set in `coding_agent.kind`:
369
+
370
+ | | kino-code (default) | claude-code |
371
+ |---|---|---|
372
+ | What | kino's own coding agent | the Claude Code CLI, `claude -p` |
373
+ | Models | any model kino supports, including your Claude Code login | Claude |
374
+ | Needs | a model | `claude`, installed and logged in |
375
+
376
+ ```yaml
377
+ coding_agent:
378
+ kind: kino-code
379
+ model: anthropic:<id> # optional; default: the workspace model
380
+ ```
381
+
382
+ Either way, the coder only edits files and runs the repository's commands. Pushing, pull requests, tickets and
383
+ API calls stay with kino's own steps, behind its confirmations.
384
+
385
+ ## 12. Safety
386
+
387
+ - **Outward actions are confirmed one call at a time**: push, pull requests, comments, ticket and API writes. With
388
+ nobody at the terminal they are refused, or the run waits until someone answers.
389
+ - **Never done, whatever you answer**: force-push, `git reset --hard`, `git stash`, merging pull requests,
390
+ admin overrides, co-author trailers.
391
+ - **Files** can only change inside the folder kino works in.
392
+ - **Heavy commands** (tests, builds, containers, browsers) wait while free memory is below the floor (35% by
393
+ default; `policy.min_free_memory_pct`).
394
+ - **Secrets** are references, resolved per request and kept out of config, prompts and logs. Auth headers are
395
+ removed from request logs.
396
+ - **Allow and deny lists** in the config narrow what may be asked at all. A denied call never reaches the tool.
397
+ - kino reports honestly: what it changed, how it checked, and what it did not do.
398
+
399
+ ## 13. Configuration reference
400
+
401
+ The workspace config is `.kino/config.yaml` in the repository; `kino init` writes it.
402
+
403
+ ```yaml
404
+ models:
405
+ default: claude-code:claude-sonnet-5-5
406
+ per_agent: # optional: another model for one kind of agent
407
+ reviewer: anthropic:<id>
408
+ # an OpenAI-compatible endpoint (vLLM, LM Studio, a gateway):
409
+ # default: {provider: openai-compatible, model: <id>, base_url: http://localhost:8000/v1, api_key_env: MY_KEY}
410
+
411
+ coding_agent:
412
+ kind: kino-code # or claude-code
413
+ model: anthropic:<id> # optional
414
+
415
+ policy:
416
+ min_free_memory_pct: 35
417
+
418
+ knowledge:
419
+ - {kind: markdown, path: docs/handbook.md}
420
+ ```
421
+
422
+ | Environment variable | Meaning |
423
+ |---|---|
424
+ | `KINO_MODEL` | the model, when the config sets none |
425
+ | `KINO_SETTINGS` | another settings file than `~/.config/kino/settings.json` |
426
+ | `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY` | provider keys |
427
+ | `OLLAMA_HOST` | where Ollama runs (default `http://localhost:11434`) |
428
+ | `KINO_UV`, `KINO_NO_UV_INSTALL` | which uv the npm package uses; don't install uv |
429
+
430
+ All commands: `kino --help`, and `kino <command> --help` for each one.
431
+
432
+ ## 14. Updating, uninstalling, troubleshooting
5
433
 
6
434
  ```bash
7
- npx kino-cli # open the kino shell in this folder
8
- npx kino-cli init # set kino up for this repository
9
- npx kino-cli code -p "fix the off-by-one in pagination and add a test"
10
- npm i -g kino-cli # then just: kino
435
+ npm i -g kino-cli@latest # or: brew upgrade kino-cli
436
+ kino --version
437
+ npm rm -g kino-cli # or: brew uninstall kino-cli
11
438
  ```
12
439
 
13
- This package carries kino compiled for macOS, Linux and Windows and runs it with [uv](https://docs.astral.sh/uv),
14
- which fetches Python 3.12 and kino's dependencies on the first run and caches them. If uv is missing it is installed
15
- for you (set `KINO_NO_UV_INSTALL=1` to refuse, or `KINO_UV=/path/to/uv` to pick one). Node 18+.
440
+ | Problem | Fix |
441
+ |---|---|
442
+ | "kino needs a model" | Log in to Claude Code (`claude auth login`), set an API key, or start Ollama, then run `kino` or `kino model`. |
443
+ | The model picker doesn't list Claude Code | Check that `claude` is on your PATH and that `claude auth status` says you are logged in. |
444
+ | The first start is slow | uv is fetching Python and kino's libraries, once. Later starts are fast. |
445
+ | Tests "wait for memory" | Free some memory, or lower `policy.min_free_memory_pct` (`--memory-floor` for `kino code`). |
446
+ | A run stopped or failed | `kino runs`, then `kino resume <id>` (in the console: `/resume`). |
447
+ | The console prints help and exits | It needs a terminal. In scripts use `kino code -p`, `kino run` or `kino start`. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kino-cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "kino: an agent that learns your codebase and tools, then works as one of the team's developers. Includes kino-code, a coding agent on any model.",
5
5
  "bin": {
6
6
  "kino": "bin/kino.js"