Self-hosted, sharable kanban for humans and agents. One 4.7 MB binary, 5 MB of RAM, 10 to 60 tokens per agent reply, starts in 3 ms, zero setup.
Rust ai-agentsclaude-codeclicodexcoding-agentskanbanlocal-firstmcpmcp-servermodel-context-protocolproductivityproject-managementraspberry-pirustself-hostedsqlitetask-manager
Add a guide and a shorter README
emanuele-em5a6642b73ee6
diff --git a/README.md b/README.mdindex 8bcc5bf..abb30ae 100644--- a/README.md+++ b/README.md@@ -1,150 +1,61 @@-# Kanzo+<p align="center">+ <picture>+ <source media="(prefers-color-scheme: dark)" srcset="docs/img/kanzo-dark.jpg">+ <img alt="kanzo: a tiny kanban board for you and your coding agents" src="docs/img/kanzo-light.jpg">+ </picture>+</p>-A local kanban board for you and your coding agents.+<p align="center">+ <a href="https://github.com/emanuele-em/kanzo/actions/workflows/ci.yml"><img src="https://github.com/emanuele-em/kanzo/actions/workflows/ci.yml/badge.svg" alt="CI"></a>+ <img src="https://img.shields.io/badge/rust-1.89+-orange?logo=rust" alt="Rust 1.89+">+</p>-One small program serves the board in your browser and an MCP server for agents like Claude Code and Codex. Everything lives in one folder you can copy, or sync between laptops through a private GitHub repo.+Kanzo is one small program. It shows a kanban board in your browser, and it is an MCP server, so Claude Code, Codex and other agents work on the same tasks you see. Everything is in one folder.-- **Minimal:** projects, tasks, four columns, Markdown descriptions and comments.-- **One binary,** about 5 MB, with SQLite built in. No runtime, no Docker, no npm.-- **MCP first:** agents can do everything you can do on the board.-- **Multi-project:** one board for all your projects. Link a project to a GitHub repo and agents working in that repo find it on their own.+<picture>+ <source media="(prefers-color-scheme: dark)" srcset="docs/img/board-dark.jpg">+ <img alt="The Kanzo board: a project with todo, doing, review and done columns" src="docs/img/board-light.jpg">+</picture>-## Install+## Why Kanzo-```sh-brew install emanuele-em/tap/kanzo-```--Or use the one-line installer from the [latest release](https://github.com/emanuele-em/kanzo/releases/latest), or build from source with `cargo install --path .`.--## Use it--```sh-kanzo-```--The board opens at http://localhost:4242. The first run creates `~/kanzo`.--Press `n` to add a task and `/` to search. Search matches every word you type against task ids, titles, descriptions and project names.--To keep the board running in the background and start it at login:--```sh-kanzo service install # kanzo service uninstall to remove it-```--### Connect your agents+- **Simple.** Projects, tasks, four columns, Markdown and comments. Nothing to configure.+- **Light.** One 4 MB file with SQLite inside. No Docker, no Node, no database server. It runs on a Raspberry Pi Zero.+- **Made for agents.** Agents can do everything you can do on the board, and they find the right project from the repo they work in.+- **Yours.** The board is one folder: copy it, back it up, or sync it through a private git repo.-Do this once per machine.+## Get started```sh-claude mcp add kanzo --scope user -- kanzo mcp # Claude Code-codex mcp add kanzo -- kanzo mcp # Codex-```--Any other MCP client works too: the command is `kanzo` with the argument `mcp`. GUI apps such as Raycast may not see Homebrew's `PATH`, so give them the full path from `which kanzo`.--**Over HTTP.** Clients that can't start a local program can use the running board instead, at `http://localhost:4242/mcp`:+curl -LsSf https://github.com/emanuele-em/kanzo/releases/latest/download/kanzo-installer.sh | sh-```sh-claude mcp add --transport http kanzo http://localhost:4242/mcp+kanzo # the board, at http://localhost:4242+claude mcp add kanzo --scope user -- kanzo mcp # connect Claude Code+codex mcp add kanzo -- kanzo mcp # connect Codex```-Over HTTP Kanzo can't see which folder the agent works in, so the agent has to name the project. The endpoint answers only on localhost; turn it off with `mcp_http = false` in `config.toml`.--Then ask your agent things like *"take the next task from kanzo and do it"*, or *"add a kanzo task for the flaky login test"*.--### Tools agents get--| Tool | Does |-| --- | --- |-| `list_projects` | Lists projects with open task counts |-| `create_project` | Adds a project, optionally linked to a GitHub repo |-| `list_tasks` | Lists tasks one per line; done tasks are left out unless asked for |-| `get_task` | Shows a task with its description and comments |-| `create_task` | Adds a task to `todo` |-| `update_task` | Changes title, description or status |-| `add_comment` | Adds a comment, signed with the agent's name |-| `next_task` | Takes the top `todo` task and moves it to `doing` |-| `delete_task` | Deletes a task and its comments |--Tasks are written `api#12`. When an agent leaves out the project, Kanzo reads the git remote of the folder the agent works in and picks the project linked to that repo. If no project matches, the tool says so and lists the projects to choose from.+Then ask your agent: *"take the next task from kanzo and do it."* It moves the card to `doing` and comments as it works.-## The data folder+<picture>+ <source media="(prefers-color-scheme: dark)" srcset="docs/img/task-dark.jpg">+ <img alt="A task open on the board, with a description and comments from Claude Code" src="docs/img/task-light.jpg">+</picture>-Everything is in `~/kanzo`. Use another folder with `--home <dir>` or `KANZO_HOME`.+## Light by design-| File | Holds |+| What | Measured || --- | --- |-| `kanzo.db` | The board (SQLite) |-| `config.toml` | Port and columns |-| `.gitignore` | Keeps SQLite's temporary files and local files out of git |--`config.toml`:--```toml-port = 4242-statuses = ["todo", "doing", "review", "done"]-mcp_http = true-```--New tasks go in the first column; tasks in the last one count as done.--### Export--Read the board without Kanzo, or keep a plain-text copy:--```sh-kanzo export # Markdown, to the terminal-kanzo export -f json -o board.json # JSON, to a file-kanzo export -p api # one project-```--## Sync between laptops+| Program size | 4.3 MB, SQLite included |+| Memory when idle | about 5 MB |+| Threads when idle | 1 |+| Ready after launch | 4 ms for the board, 10 ms for `kanzo mcp` |+| Loading a board of 2,000 tasks | 3 ms |+| Checking for changes, every 2 s | under 1 ms, and no disk writes |-The data folder can be a private GitHub repo. `kanzo sync` commits the board and pulls or pushes it.+Measured on an Apple M4. In a Linux container limited to 64 MB of memory and half a CPU, the ARM64 build idles at 3.5 MB.-1. Once, on the first laptop:- ```sh- cd ~/kanzo && git init && gh repo create kanzo-data --private --source . --push- ```-2. On the second laptop, the first time: `git clone` that repo into `~/kanzo`.-3. Run `kanzo sync` on the laptop you are leaving, and again on the one you sit down at.+It runs on macOS 10.12 or later, and on any 64-bit or ARM Linux, from a Raspberry Pi Zero to a Pi 5. The board works in browsers back to Safari 13.1, Chrome 80 and Firefox 78.-Sync is safe while the board and agents are running: it waits for their writes to finish, and they pick up a pulled board on their next action.+## Learn more-A database file can't be merged. If both laptops changed the board since the last sync, `kanzo sync` stops and asks which one to keep:--```sh-kanzo sync --keep-local # overwrite GitHub with this laptop's board-kanzo sync --keep-remote # take GitHub's board; this laptop's is kept in kanzo.db.bak-```--**Without GitHub:** stop `kanzo`, copy `~/kanzo` to the other Mac, done.--## Development--```sh-cargo test # store, config, export and service tests-cargo run # the board, with data in ~/kanzo-cargo run -- --home /tmp/k --port 4300 # a throwaway board-```--The code is small on purpose:--| File | Does |-| --- | --- |-| `src/main.rs` | Command line |-| `src/home.rs` | Data folder and `config.toml` |-| `src/schema.sql` | The database schema |-| `src/store.rs` | All SQL |-| `src/mcp.rs` | The MCP tools, over stdio and HTTP (`rmcp`, pinned on purpose: it still changes often) |-| `src/web.rs` | The board's HTTP API, and `/mcp` |-| `src/index.html` | The whole board UI: plain HTML, CSS and JavaScript, built into the binary |-| `src/sync.rs` | `kanzo sync` |-| `src/export.rs` | `kanzo export` |-| `src/service.rs` | `kanzo service` |--Every operation opens its own short-lived SQLite connection, in WAL mode with a 5-second busy timeout, so the board and any number of agents can write at once. The board polls a change counter every 2 seconds, which database triggers bump on every write.--Releases are built by [cargo-dist](https://github.com/axodotdev/cargo-dist): push a tag like `v0.1.0` and GitHub Actions builds both Mac binaries, the installer and the Homebrew formula.+The [guide](docs/guide.md) covers running Kanzo in the background, opening it from other devices, MCP over HTTP, syncing between laptops, export and settings.diff --git a/docs/guide.md b/docs/guide.mdnew file mode 100644index 0000000..a62c7c7--- /dev/null+++ b/docs/guide.md@@ -0,0 +1,169 @@+# Kanzo guide++Everything about Kanzo beyond the [README](../README.md): installing, running it in the background, agents, the data folder, sync, and how it stays light.++## Install++Use the one-line installer from the [latest release](https://github.com/emanuele-em/kanzo/releases/latest), or build from source with `cargo install --path .`.++Releases include:++| Build | Runs on |+| --- | --- |+| `aarch64-apple-darwin` | Apple Silicon Macs, macOS 11 or later |+| `x86_64-apple-darwin` | Intel Macs, macOS 10.12 Sierra or later |+| `x86_64-unknown-linux-musl` | 64-bit PCs with any Linux |+| `aarch64-unknown-linux-musl` | Raspberry Pi 3, 4 and 5 with a 64-bit OS, and other ARM64 boards |+| `armv7-unknown-linux-musleabihf` | Raspberry Pi 2 and 3 with a 32-bit OS |+| `arm-unknown-linux-musleabihf` | Raspberry Pi Zero and 1 (ARMv6) |++The Linux builds are static, so they work on any distribution, however old its C library.++## Use it++```sh+kanzo+```++The board opens at http://localhost:4242. The first run creates `~/kanzo`.++Press `n` to add a task and `/` to search. Search matches every word you type against task ids, titles, descriptions and project names.++To keep the board running in the background and start it at login:++```sh+kanzo service install # kanzo service uninstall to remove it+```++This is a LaunchAgent on macOS and a systemd user service on Linux. On a board with no screen, run `sudo loginctl enable-linger $USER` once so it starts at boot without anyone logging in.++The board works in browsers back to Safari 13.1, Chrome 80 and Firefox 78.++### Use it from another device++On a Raspberry Pi with no screen, set `listen = "0.0.0.0"` in `config.toml`, then open `http://<pi-name>.local:4242` from your laptop. Kanzo has no logins, so only do this on a network you trust: anyone who can reach the port can read and change the board.++### Connect your agents++Do this once per machine.++```sh+claude mcp add kanzo --scope user -- kanzo mcp # Claude Code+codex mcp add kanzo -- kanzo mcp # Codex+```++Any other MCP client works too: the command is `kanzo` with the argument `mcp`. GUI apps such as Raycast may not see your shell's `PATH`, so give them the full path from `which kanzo`.++**Over HTTP.** Clients that can't start a local program can use the running board instead, at `http://localhost:4242/mcp`:++```sh+claude mcp add --transport http kanzo http://localhost:4242/mcp+```++Over HTTP Kanzo can't see which folder the agent works in, so the agent has to name the project. The endpoint is reachable wherever the board is (see `listen`); turn it off with `mcp_http = false` in `config.toml`.++Then ask your agent things like *"take the next task from kanzo and do it"*, or *"add a kanzo task for the flaky login test"*.++### Tools agents get++| Tool | Does |+| --- | --- |+| `list_projects` | Lists projects with open task counts |+| `create_project` | Adds a project, optionally linked to a GitHub repo |+| `list_tasks` | Lists tasks one per line; done tasks are left out unless asked for |+| `get_task` | Shows a task with its description and comments |+| `create_task` | Adds a task to `todo` |+| `update_task` | Changes title, description or status |+| `add_comment` | Adds a comment, signed with the agent's name |+| `next_task` | Takes the top `todo` task and moves it to `doing` |+| `delete_task` | Deletes a task and its comments |++Tasks are written `api#12`. When an agent leaves out the project, Kanzo reads the git remote of the folder the agent works in and picks the project linked to that repo. If no project matches, the tool says so and lists the projects to choose from.++## The data folder++Everything is in `~/kanzo`. Use another folder with `--home <dir>` or `KANZO_HOME`.++| File | Holds |+| --- | --- |+| `kanzo.db` | The board (SQLite) |+| `config.toml` | Port, address, columns |+| `.gitignore` | Keeps SQLite's temporary files and local files out of git |++`config.toml`:++```toml+port = 4242+listen = "127.0.0.1" # "0.0.0.0" to open the board from other devices+statuses = ["todo", "doing", "review", "done"]+mcp_http = true+```++New tasks go in the first column; tasks in the last one count as done.++### Export++Read the board without Kanzo, or keep a plain-text copy:++```sh+kanzo export # Markdown, to the terminal+kanzo export -f json -o board.json # JSON, to a file+kanzo export -p api # one project+```++## Sync between laptops++The data folder can be a private GitHub repo. `kanzo sync` commits the board and pulls or pushes it.++1. Once, on the first laptop:+ ```sh+ cd ~/kanzo && git init && gh repo create kanzo-data --private --source . --push+ ```+2. On the second laptop, the first time: `git clone` that repo into `~/kanzo`.+3. Run `kanzo sync` on the laptop you are leaving, and again on the one you sit down at.++Sync is safe while the board and agents are running: it waits for their writes to finish, and they pick up a pulled board on their next action.++A database file can't be merged. If both laptops changed the board since the last sync, `kanzo sync` stops and asks which one to keep:++```sh+kanzo sync --keep-local # overwrite GitHub with this laptop's board+kanzo sync --keep-remote # take GitHub's board; this laptop's is kept in kanzo.db.bak+```++**Without GitHub:** stop `kanzo`, copy `~/kanzo` to the other Mac, done.++## Development++```sh+cargo test # store, config, export, web and service tests+cargo run # the board, with data in ~/kanzo+cargo run -- --home /tmp/k --port 4300 # a throwaway board+```++The code is small on purpose:++| File | Does |+| --- | --- |+| `src/main.rs` | Command line |+| `src/home.rs` | Data folder and `config.toml` |+| `src/schema.sql` | The database schema |+| `src/store.rs` | All SQL |+| `src/mcp.rs` | The MCP tools, over stdio and HTTP (`rmcp`, pinned on purpose: it still changes often) |+| `src/web.rs` | The board's HTTP API, and `/mcp` |+| `src/index.html`, `src/app.js`, `src/logo.png` | The board UI: plain HTML, CSS and JavaScript, built into the binary |+| `src/sync.rs` | `kanzo sync` |+| `src/export.rs` | `kanzo export` |+| `src/service.rs` | `kanzo service` |++### How it stays light++- **One thread** runs the server; database work goes to at most 8 helper threads, which exit when idle.+- **One short SQLite connection per operation,** with a 5-second busy timeout, so the board and any number of agents can write at once, and `kanzo sync` can safely swap the file between operations. The database uses a rollback journal instead of WAL, because with short connections WAL created and deleted two files on every request. Now a read touches no extra files, and each operation is about 3 times faster.+- **Cheap polling:** the board asks for a change token every 2 seconds, only while its tab is visible, and waits for each answer before asking again. Database triggers bump the token on every write.+- **Small pages:** the done column draws its newest 50 cards until you ask for more.+- **Release profile:** `opt-level = "s"` with full LTO measured 30% smaller than the default at the same speed.++Measured on a 64-bit ARM Linux container limited to 64 MB of memory and half a CPU: 3.5 MB of memory and one thread when idle, 4.3 MB after 200 tasks.++Releases are built by [cargo-dist](https://github.com/axodotdev/cargo-dist): push a tag like `v0.1.0` and GitHub Actions builds every target above and the installer. CI runs `cargo fmt`, `clippy` and the tests on Linux and macOS for every push.diff --git a/docs/img/board-dark.jpg b/docs/img/board-dark.jpgnew file mode 100644index 0000000..76f22e0Binary files /dev/null and b/docs/img/board-dark.jpg differdiff --git a/docs/img/board-light.jpg b/docs/img/board-light.jpgnew file mode 100644index 0000000..fa16308Binary files /dev/null and b/docs/img/board-light.jpg differdiff --git a/docs/img/kanzo-dark.jpg b/docs/img/kanzo-dark.jpgnew file mode 100644index 0000000..62218ccBinary files /dev/null and b/docs/img/kanzo-dark.jpg differdiff --git a/docs/img/kanzo-light.jpg b/docs/img/kanzo-light.jpgnew file mode 100644index 0000000..7c037c8Binary files /dev/null and b/docs/img/kanzo-light.jpg differdiff --git a/docs/img/social-preview.png b/docs/img/social-preview.pngnew file mode 100644index 0000000..1490780Binary files /dev/null and b/docs/img/social-preview.png differdiff --git a/docs/img/task-dark.jpg b/docs/img/task-dark.jpgnew file mode 100644index 0000000..cf1cb2eBinary files /dev/null and b/docs/img/task-dark.jpg differdiff --git a/docs/img/task-light.jpg b/docs/img/task-light.jpgnew file mode 100644index 0000000..f0d479aBinary files /dev/null and b/docs/img/task-light.jpg differ