kanban-cli
CLI entry point for the kanban workspace. Parses commands with clap, loads a CliContext wrapping KanbanContext, and emits JSON to stdout.
Usage
File selection priority (TUI launches the choose-storage dialog when none of these is set):
- Positional
FILEargument KANBAN_FILEenvironment variable- Config file
storage_location
All commands output JSON to stdout. Errors are written to stderr.
Command Reference
board
column
card
# CRUD
|||done
# Movement & archiving
# Sprint
# Git
# Bulk operations
Card identifier resolution: <ID_OR_IDENTIFIER> accepts:
- A full UUID:
550e8400-e29b-41d4-a716-446655440000 - A prefix+number identifier:
KAN-5 - If ambiguous, the command prints all matching cards and exits with error
sprint
relation
Manage parent / child relationships between cards. All four subcommands
accept UUIDs or short identifiers (e.g. KAN-5). Cross-board parent /
child relations are permitted.
add and remove are atomic: the entire multi-child batch is committed
or rolled back as a single transaction. A mid-list failure (cycle,
self-reference, duplicate, unknown card) leaves both in-memory and
on-disk state unchanged. Error messages name the offending parent and
child via the shared messages::* helpers (e.g.
"cycle detected: making KAN-5 a parent of KAN-7 would create a cycle").
--sort accepts card-number / priority / points / created-at / updated-at / status / position. --order accepts asc / desc. Default:
--sort card-number --order asc.
init
Create a board file and an initial board, then exit without opening the TUI.
FILE— target file path (default: uses KANBAN_FILE env var, then config storage_location, then boards.json)--board— name of the first board to create. Omit to create an empty file.
Examples:
KANBAN_FILE=work.json
Top-level commands
|||
migrate moves all data from one storage backend to another:
SOURCE— path to the source fileBACKEND— target backend:jsonorsqlite-o, --output— output path (default: source filename with the new backend's extension)--source-backend— override auto-detection of the source format
# JSON → SQLite
# SQLite → JSON with explicit output path
# Source format cannot be detected from extension
Output Format
All commands emit JSON to stdout:
[
{
}
{
}
Bulk operations emit a BatchOperationResult:
Shell Completions
Environment Variables
| Variable | Description |
|---|---|
KANBAN_FILE |
Default data file path |
EDITOR |
External editor for description editing (TUI) |
Dependencies
| Crate | Purpose |
|---|---|
kanban-service |
KanbanContext, all domain operations |
kanban-tui |
TUI launch |
clap |
CLI argument parsing |
tokio |
Async runtime |
serde_json |
JSON output formatting |
tracing |
Structured logging |