kanbaroo 0.2.2__py3-none-any.whl

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.
kanbaroo/__init__.py ADDED
@@ -0,0 +1,18 @@
1
+ """
2
+ Kanbaroo: a kanban-style issue tracker.
3
+
4
+ This is the top-level meta-package. Install the optional ``all`` extra
5
+ for everything::
6
+
7
+ pip install kanbaroo[all]
8
+
9
+ Or install individual sub-packages directly::
10
+
11
+ pip install kanbaroo-core
12
+ pip install kanbaroo-api
13
+ pip install kanbaroo-tui
14
+ pip install kanbaroo-cli
15
+ pip install kanbaroo-mcp
16
+ """
17
+
18
+ __version__ = "0.2.2"
@@ -0,0 +1,240 @@
1
+ Metadata-Version: 2.4
2
+ Name: kanbaroo
3
+ Version: 0.2.2
4
+ Summary: A kanban-style issue tracker with TUI, REST + WebSocket API, CLI, and MCP server. Meta-package.
5
+ Project-URL: Repository, https://github.com/areese801/kanbaroo
6
+ Project-URL: Issues, https://github.com/areese801/kanbaroo/issues
7
+ Author: Adam Reese
8
+ License: MIT
9
+ License-File: LICENSE
10
+ Keywords: issue-tracker,kanban,mcp,tui
11
+ Requires-Python: >=3.12
12
+ Provides-Extra: all
13
+ Requires-Dist: kanbaroo-api[web]; extra == 'all'
14
+ Requires-Dist: kanbaroo-cli; extra == 'all'
15
+ Requires-Dist: kanbaroo-core; extra == 'all'
16
+ Requires-Dist: kanbaroo-mcp; extra == 'all'
17
+ Requires-Dist: kanbaroo-tui; extra == 'all'
18
+ Description-Content-Type: text/markdown
19
+
20
+ # Kanbaroo
21
+
22
+ A kanban-style issue tracker with a TUI, REST + WebSocket API, CLI, and MCP server. Designed to be useful standalone, and to integrate with [trusty-cage](https://pypi.org/project/trusty-cage/) for AI-driven workflows.
23
+
24
+ **Status:** Phase 2 complete. Single-user, terminal + web + AI.
25
+
26
+ ## What it does
27
+
28
+ Kanbaroo exposes the same data through five surfaces:
29
+
30
+ - **TUI** (Textual) for terminal-centric humans: workspace list, kanban board, story detail, fuzzy search, audit feed.
31
+ - **Web UI** (React SPA, served by the API at `/ui`): workspace list, kanban board with drag-to-transition, story detail, comments, tags, live WebSocket updates, keyboard shortcuts.
32
+ - **CLI** (Typer + Rich): scriptable access to every resource, JSON output for pipelines.
33
+ - **REST + WebSocket API** (FastAPI): the source of truth. WebSocket feeds live change events; REST is always authoritative.
34
+ - **MCP server**: lets AI agents (outer Claude in particular) read and write the board through the Model Context Protocol.
35
+
36
+ The data model is intentionally Jira-shaped but simpler. Workspaces contain optional Epics which contain Stories. Stories carry comments, tags, typed linkages, priority, and a standard kanban lifecycle. Every mutation is attributed to a `human`, `claude`, or `system` actor and recorded in an immutable audit log.
37
+
38
+ ## Architecture
39
+
40
+ ```mermaid
41
+ flowchart TB
42
+ subgraph clients["Clients"]
43
+ TUI["TUI<br/>(Textual)"]
44
+ CLI["CLI<br/>(Typer + Rich)"]
45
+ MCP["MCP Server<br/>(mcp SDK)"]
46
+ WEB["Web UI<br/>(React SPA)"]
47
+ end
48
+
49
+ subgraph server["Kanbaroo Server"]
50
+ REST["FastAPI<br/>REST endpoints"]
51
+ WS["WebSocket<br/>event stream"]
52
+ CORE["kanbaroo-core<br/>(business logic)"]
53
+ end
54
+
55
+ subgraph storage["Storage"]
56
+ DB[("SQLite (local)<br/>Postgres (cloud)")]
57
+ end
58
+
59
+ subgraph external["External Consumers"]
60
+ DUCK["DuckDB / Snowflake<br/>(read-only)"]
61
+ GHA["GitHub Actions<br/>(read-only scripts)"]
62
+ end
63
+
64
+ TUI -->|HTTP + WS| REST
65
+ TUI -->|HTTP + WS| WS
66
+ CLI -->|HTTP| REST
67
+ MCP -->|HTTP| REST
68
+ WEB -->|HTTP + WS| REST
69
+
70
+ REST --> CORE
71
+ WS --> CORE
72
+ CORE --> DB
73
+
74
+ DB -.->|direct read| DUCK
75
+ DB -.->|direct read| GHA
76
+
77
+ style DUCK stroke-dasharray: 5 5
78
+ style GHA stroke-dasharray: 5 5
79
+ ```
80
+
81
+ ## Installation
82
+
83
+ Requires Python 3.12 or newer.
84
+
85
+ ```bash
86
+ # Everything (server + TUI + CLI + MCP)
87
+ pip install 'kanbaroo[all]'
88
+
89
+ # Or pick and choose:
90
+ pip install kanbaroo-api # Just the server (no web UI)
91
+ pip install 'kanbaroo-api[web]' # Server + bundled web UI at /ui
92
+ pip install kanbaroo-cli # CLI only (pulls in core)
93
+ pip install kanbaroo-tui # TUI only
94
+ pip install kanbaroo-mcp # MCP server only
95
+ ```
96
+
97
+ Contributors working from a checkout should use the [uv](https://docs.astral.sh/uv/) workspace instead:
98
+
99
+ ```bash
100
+ uv sync --all-packages --dev
101
+ ```
102
+
103
+ ## Quickstart
104
+
105
+ For a human walking up cold, all the way from install to a running board:
106
+
107
+ ```bash
108
+ # 1. Install
109
+ pip install 'kanbaroo[all]'
110
+
111
+ # 2. Initialise config dir, apply migrations, mint your first token
112
+ kb init
113
+
114
+ # 3. Start the server (docker compose under the hood)
115
+ kb server start
116
+
117
+ # 4. Create your first workspace
118
+ kb workspace create --key KAN --name "My Work"
119
+
120
+ # 5. File a story
121
+ kb story create --workspace KAN --title "First task"
122
+
123
+ # 6. In another terminal, open the TUI on the board
124
+ kanbaroo-tui
125
+ ```
126
+
127
+ Press `?` on any TUI screen for the keybinding cheatsheet. Press `/` from the workspace list or board for fuzzy search. `a` opens the global audit feed.
128
+
129
+ ## Configuration
130
+
131
+ Kanbaroo reads settings from `$KANBAROO_CONFIG_DIR/config.toml` (default `~/.kanbaroo/config.toml`), which `kb init` creates for you. Environment variables override the TOML values when set.
132
+
133
+ | Variable | Consumed by | Default / note |
134
+ |----------|-------------|----------------|
135
+ | `KANBAROO_DATABASE_URL` | core, api, `kb init`, `kb backup` | Required for the API to start. Docker supplies `sqlite:////data/kanbaroo.db` inside the container. |
136
+ | `KANBAROO_API_URL` | cli, tui, mcp | Overrides `api_url` in `config.toml`. Example: `http://localhost:8080`. |
137
+ | `KANBAROO_TOKEN` | cli, tui | Bearer token for API auth. Overrides `token` in `config.toml`. |
138
+ | `KANBAROO_MCP_TOKEN` | mcp | MCP-specific token; falls back to `KANBAROO_TOKEN`. |
139
+ | `KANBAROO_CONFIG_DIR` | cli, tui, mcp, `kb init` | Override for the config directory. Default: `~/.kanbaroo`. |
140
+ | `KANBAROO_WORKSPACE` | cli | Default workspace key so you can omit `--workspace` on every command. Example: `KAN`. |
141
+ | `KANBAROO_API_HOST` | api server | Uvicorn bind host. Default: `0.0.0.0`. |
142
+ | `KANBAROO_API_PORT` | api server | Uvicorn bind port. Default: `8080`. |
143
+ | `KANBAROO_COMPOSE_FILE` | `kb server` | Path to a non-default `docker-compose.yml` (useful for CI). |
144
+ | `KANBAROO_MCP_LOG_LEVEL` | mcp | `INFO` by default; `DEBUG` for verbose MCP logs. |
145
+
146
+ ## Web UI
147
+
148
+ The `kanbaroo-web` package ships a Vite + React SPA that `kanbaroo-api` serves at `/ui`. Once the API is running, visit `http://localhost:8080/ui` in a browser.
149
+
150
+ ### First-boot inside the container
151
+
152
+ `kb server start` runs `docker compose up -d`; the API runs inside the `kanbaroo-api` container with its SQLite DB on a named volume. The volume is blank on first boot, so migrations and the initial token have to happen inside the container:
153
+
154
+ ```bash
155
+ # Bring the stack up
156
+ kb server start
157
+
158
+ # Apply migrations
159
+ docker compose exec -e KANBAROO_DATABASE_URL="sqlite:////data/kanbaroo.db" \
160
+ kanbaroo-api \
161
+ uv run --no-dev alembic -c /app/packages/kanbaroo-core/alembic.ini upgrade head
162
+
163
+ # Mint the first token (print it once; save it)
164
+ docker compose exec -e KANBAROO_DATABASE_URL="sqlite:////data/kanbaroo.db" \
165
+ kanbaroo-api \
166
+ uv run --no-dev kb init
167
+ ```
168
+
169
+ Copy the `kbr_` token that `kb init` prints and paste it into the `/ui` login form. The token is stored in browser `localStorage` under `kanbaroo.token`; press "Log out" to clear it.
170
+
171
+ You can also mint additional tokens later with `kb token create --actor-type human --actor-id you --name "web"` (inside the container, same `docker compose exec` wrapper).
172
+
173
+ Shipped in v0.2.0:
174
+
175
+ - Workspace list with inline create.
176
+ - Kanban board with drag-to-transition, illegal-move rejection, optimistic updates.
177
+ - Story detail: markdown description, metadata, comments (with one-level replies), tags, audit trail.
178
+ - Live updates via the existing `/api/v1/events` WebSocket.
179
+ - Story creation modal (`n` on the board).
180
+ - In-board search (`/` on the board; matches on human id prefix and title substring).
181
+ - Keyboard shortcuts: `n` new story, `/` search, `e` edit story, `?` shortcut help, `Escape` close modal / clear search / exit edit mode.
182
+
183
+ The release wheel auto-includes the built bundle, so `pipx install --include-deps 'kanbaroo[all]'` picks up the UI. Node 20+ is only required at build time for maintainers publishing a new release.
184
+
185
+ ### Developing the web UI
186
+
187
+ ```bash
188
+ make web-build # Build the SPA into packages/kanbaroo-web/src/kanbaroo_web/dist/
189
+ make web-dev # Vite dev server on :5173, proxies /api and /api/v1/events to :8080
190
+ make web-test # vitest, single-shot
191
+ ```
192
+
193
+ ## MCP setup
194
+
195
+ Let an AI agent drive Kanbaroo through the Model Context Protocol. The MCP server is a thin translator between the MCP tool protocol and the Kanbaroo REST API; every mutation routes through the API and is attributed to the MCP token's actor.
196
+
197
+ First create a dedicated `claude`-typed token so AI mutations are audited correctly:
198
+
199
+ ```bash
200
+ kb token create --actor-type claude --actor-id outer-claude --name "claude"
201
+ ```
202
+
203
+ Copy the plaintext that `kb token create` prints into `KANBAROO_MCP_TOKEN` in your shell, then add this to Claude's `mcpServers` block:
204
+
205
+ ```json
206
+ {
207
+ "mcpServers": {
208
+ "kanbaroo": {
209
+ "command": "kanbaroo-mcp",
210
+ "args": ["--api-url", "http://localhost:8080", "--token-env", "KANBAROO_MCP_TOKEN"]
211
+ }
212
+ }
213
+ }
214
+ ```
215
+
216
+ See [`docs/mcp-setup.md`](docs/mcp-setup.md) for the full walkthrough, the smoke test, and the tool reference.
217
+
218
+ ## Docs
219
+
220
+ - [`docs/spec.md`](docs/spec.md): authoritative design intent. Start here if you want the why.
221
+ - [`docs/api-reference.md`](docs/api-reference.md): generated REST API reference.
222
+ - [`docs/mcp-setup.md`](docs/mcp-setup.md): MCP setup guide for AI agents.
223
+ - [`docs/future-skill-draft.md`](docs/future-skill-draft.md): draft workflow skill for AI agents using Kanbaroo via MCP.
224
+ - [`CLAUDE.md`](CLAUDE.md): guidance for Claude Code when working in this repo.
225
+ - [`CHANGELOG.md`](CHANGELOG.md): release notes.
226
+
227
+ ## Development
228
+
229
+ This is a uv workspace monorepo with six packages in `packages/` (`kanbaroo-core`, `-api`, `-cli`, `-tui`, `-mcp`, `-web`) and a top-level meta-package with an `[all]` extra. Before committing anything:
230
+
231
+ ```bash
232
+ uv run ruff format .
233
+ uv run ruff check --fix .
234
+ uv run mypy packages/
235
+ uv run pytest
236
+ ```
237
+
238
+ ## License
239
+
240
+ MIT. See [`LICENSE`](./LICENSE).
@@ -0,0 +1,5 @@
1
+ kanbaroo/__init__.py,sha256=GYiopcWFA3mOYg5KviA1ufxRYa0sA4-ZSYzq6z5i08w,385
2
+ kanbaroo-0.2.2.dist-info/METADATA,sha256=LoUpYtJG16ZJcFLUwp6MOXMR9VUXbep0O45SWbrq4EU,9568
3
+ kanbaroo-0.2.2.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
4
+ kanbaroo-0.2.2.dist-info/licenses/LICENSE,sha256=D1Bibmq70Wc-4YvvSql38PWwyJP4gtAXrkNUfqjgRAk,1067
5
+ kanbaroo-0.2.2.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Adam Reese
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.