| name | tasks-cli |
| description | Operate the tasks-cli Node.js CLI against the Projects & Tasks API (projects, tasks, kanban). Use when the user asks to run CLI commands, manage projects/tasks from the terminal, use `tasks` binary, or work in the `cli/` package of this repo. |
tasks-cli
CLI in cli/ (Node.js, JavaScript, Commander). Talks to FastAPI at http://localhost:8000.
Prerequisites
- API running:
docker compose up -d from repo root
- CLI deps:
cd cli && npm install
- Prefer global binary after
npm link in cli/; otherwise run from repo root:
node cli/bin/tasks.js <command>
Equivalent if linked: tasks <command>
Agent rules
- Prefer the CLI over raw
curl for project/task CRUD in this repo.
- Ensure API is up (
tasks health) before mutating data.
- Use
--json when you need to parse output programmatically.
- Status values only:
todo | in_progress | done
- Default API URL:
http://localhost:8000 (override with --api or TASKS_API_URL)
- Do not invent commands; if unsure, run
tasks --help or tasks <group> --help
Commands
Health
tasks health
Projects
tasks projects list
tasks projects get <id>
tasks projects create -n "Name" [-d "Description"]
tasks projects update <id> [-n "Name"] [-d "Description"]
tasks projects delete <id>
Tasks
tasks tasks list <projectId>
tasks tasks get <id>
tasks tasks create <projectId> -t "Title" [-d "Desc"] [-s todo]
tasks tasks update <id> [-t "Title"] [-d "Desc"] [-s in_progress]
tasks tasks move <id> -s <status> [-p 0]
tasks tasks delete <id>
Kanban (terminal board)
tasks kanban <projectId>
Global options
tasks --api http://localhost:8000 --json <command>
Common workflows
Bootstrap a project with tasks
tasks health
tasks projects create -n "Demo" -d "From CLI" --json
tasks tasks create <projectId> -t "First task"
tasks tasks create <projectId> -t "Second" -s in_progress
tasks kanban <projectId>
Move a card on the board
tasks tasks move <taskId> -s done -p 0
tasks kanban <projectId>
Scriptable listing
tasks --json projects list
tasks --json tasks list <projectId>
Package layout
- Entry:
cli/bin/tasks.js
- Logic:
cli/src/index.js
- HTTP client:
cli/src/api.js
- Output formatters:
cli/src/format.js
- Human docs:
cli/README.md
Realtime note
Mutations via CLI emit SSE events (/api/events). The web frontend refreshes automatically when connected; no extra CLI step needed.