How zaloog/kanban-tui works
Purpose and entry points
kanban-tui is a Python terminal Kanban/task manager built on Textual. It supports an interactive TUI, automation-oriented CLI commands, optional browser serving, and an optional local MCP server. The application bootstrap is src/kanban_tui/app.py; command surfaces are organized in src/kanban_tui/cli/, notably general_commands.py and mcp_commands.py.
Application shell and presentation
The Textual app owns screen navigation, keyboard/mouse interactions, backend selection, and lifecycle. Board and overview views are distinct presentation stages, while modal screens capture mutations such as task, board, category, authentication, and settings edits.
Paths: src/kanban_tui/app.py, src/kanban_tui/screens/board_screen.py, src/kanban_tui/screens/overview_screen.py.
Domain model and workflow rules
Core entities are boards, columns, tasks, categories, and audit events. Boards define workflow columns and special reset/start/finish columns; task movement and dependency constraints are domain-level behavior. SQLite persists task dependency edges and audit history.
Paths: src/kanban_tui/classes/board.py, src/kanban_tui/classes/task.py, src/kanban_tui/classes/column.py.
Backend abstraction and selection boundary
All interfaces operate through a backend layer rather than directly against storage or remote systems. The base/auth modules define the common boundary; backend implementations provide different capability sets. This isolates TUI and CLI behavior from SQLite persistence, Jira synchronization/querying, and Claude task-file ingestion.
Paths: src/kanban_tui/backends/base.py, src/kanban_tui/backends/auth.py, src/kanban_tui/backends/__init__.py.
Local persistence and migrations
SQLite is the default, full-featured backend. Its database layer owns schema initialization and version migration; the backend maps application operations to database operations. Persistent locations are configured through XDG-oriented settings, separating user configuration from data/database storage.
Paths: src/kanban_tui/backends/sqlite/database.py, src/kanban_tui/backends/sqlite/backend.py, src/kanban_tui/backends/sqlite/migrations/migration_v0_19_0.sql.
External backend integrations
The Jira backend authenticates to a Jira instance and obtains tasks via its API/JQL; Jira transitions define columns. The Claude backend reads task JSON under the user’s Claude task directory and organizes boards by session ID. These are read/remote-system boundaries with more limited feature support than SQLite.
Paths: src/kanban_tui/backends/jira/backend.py, src/kanban_tui/backends/jira/jira_api.py, src/kanban_tui/backends/claude/backend.py.
Automation interfaces and flow
CLI command groups perform task, board, column, category, demo, skills, and general operations through the same application/backend concepts. MCP optionally exposes the task/board/column CLI capabilities to agent clients via pycli-mcp; skill-file management supports agent discovery. Typical flow is command or UI event → backend operation → model/persistence or external backend → refreshed screen/widget state.
Paths: src/kanban_tui/cli/task_commands.py, src/kanban_tui/cli/board_commands.py, src/kanban_tui/skills.py.
Runtime and infrastructure
Primary runtime is Python with Textual; styling is TCSS. Optional textual-serve enables web delivery, while plotext/textual-plotext power overview charts. Configuration uses pydantic-settings and XDG base directories. Development automation is GitHub Actions CI and Docker Compose is present for local infrastructure.
Paths: src/kanban_tui/assets/style.tcss, src/kanban_tui/config.py, .github/workflows/ci.yaml.
Main entry points: base.py Backend abstraction · app.py Textual TUI shell · board.py Kanban domain · backend.py SQLite backend
Components 20
User & automation
- Textual TUI shell · Owns navigation, input, backend selection, and lifecycle.
src/kanban_tui/app.py - Board view
src/kanban_tui/screens/board_screen.py - Overview view · Presents board overview and charts.
src/kanban_tui/screens/overview_screen.py - Automation CLI · Task, board, column, category, demo, skills, and general operations.
src/kanban_tui/cli/task_commands.py - MCP server commands · Optionally exposes CLI task, board, and column capabilities.
src/kanban_tui/cli/mcp_commands.py - Skill-file management
src/kanban_tui/skills.py
Application core
- Backend abstraction · Common interface and authentication boundary for all clients.
src/kanban_tui/backends/base.py - Backend selection
src/kanban_tui/backends/__init__.py - Kanban domain · Boards, columns, tasks, categories, workflow movement, and dependencies.
src/kanban_tui/classes/board.py - Task model · Encodes task behavior and dependency constraints.
src/kanban_tui/classes/task.py - Column model · Defines workflow column semantics.
src/kanban_tui/classes/column.py
Backend implementations
- SQLite backend · Maps application operations to local database operations.
src/kanban_tui/backends/sqlite/backend.py - SQLite database layer · Owns schema initialization, migrations, dependencies, and audit history.
src/kanban_tui/backends/sqlite/database.py - Schema migration
src/kanban_tui/backends/sqlite/migrations/migration_v0_19_0.sql - Jira backend · Provides limited-feature Jira task and transition access.
src/kanban_tui/backends/jira/backend.py - Jira API / JQL · Authenticates and queries Jira; transitions become columns.
src/kanban_tui/backends/jira/jira_api.py - Claude task backend · Reads Claude task JSON and groups boards by session ID.
src/kanban_tui/backends/claude/backend.py
Runtime & delivery
- XDG settings · Separates user configuration from data and database locations.
src/kanban_tui/config.py - TCSS styling
src/kanban_tui/assets/style.tcss - GitHub Actions CI
.github/workflows/ci.yaml
Connections 23
- Textual TUI shell → Board view: navigates to
- Textual TUI shell → Overview view: navigates to
- Textual TUI shell → Backend selection: selects backend
- Textual TUI shell → TCSS styling: loads
- Board view → Backend abstraction: reads and mutates through
- Overview view → Backend abstraction: reads through
- Automation CLI → Backend abstraction: operates through
- MCP server commands → Automation CLI: exposes capabilities from
- Skill-file management → MCP server commands: supports agent discovery
- Backend selection → Backend abstraction: provides implementations for
- Backend abstraction → SQLite backend: implemented by
- Backend abstraction → Jira backend: implemented by
- Backend abstraction → Claude task backend: implemented by
- SQLite backend → Kanban domain: maps operations to
- SQLite backend → SQLite database layer: persists via
- SQLite database layer → Schema migration: applies
- SQLite backend → XDG settings: uses data location
- Kanban domain → Task model: includes
- Kanban domain → Column model: includes
- Jira backend → Jira API / JQL: queries through
- Jira backend → Kanban domain: maps remote tasks to
- Claude task backend → Kanban domain: maps task JSON to
- Textual TUI shell → XDG settings: loads settings