Skip to content
CLI Reference

CLI Reference

The klt command-line interface provides full task management from the terminal.

Project commands

klt init

Initialize a new project in the current directory. Creates .tasks/ with a SQLite database.

klt init
klt init --name "My Project"

klt project list

List all registered projects.

klt project list

klt project stats

Show task statistics for the current project.

klt project stats
klt project stats my-project    # specific project by slug

Task commands

klt add

Create a new task. Type is detected from flags or title prefix.

klt add "Implement auth"                    # task (default)
klt add --bug "Login broken"                # bug
klt add --feature "Dark mode"               # feature
klt add --hotfix "Fix crash on start"       # hotfix

# Auto-detection from title prefix (prefix is stripped)
klt add "BUG: Login broken"                 # bug
klt add "FEAT: Dark mode"                   # feature
klt add "FEATURE: Dark mode"                # feature
klt add "HOTFIX: Fix crash"                 # hotfix
klt add "TODO: Refactor auth module"        # task

Flags:

FlagDescription
--bugCreate as bug
--featureCreate as feature
--hotfixCreate as hotfix
--description, -dTask description
--priority, -pPriority (0 = default, higher = more important)

klt list

List tasks with optional filters.

klt list                          # all tasks
klt list --status todo            # only todo
klt list --status doing           # only in progress
klt list --type bug               # only bugs
klt list --status todo --type bug # combined filters

Flags:

FlagDescription
--statusFilter by status: todo, doing, done
--typeFilter by type: task, bug, feature, hotfix
--allInclude all statuses

klt show

Show detailed information about a task.

klt show 42

klt done

Mark a task as completed.

klt done 42

klt update

Update task fields.

klt update 42 --title "New title"
klt update 42 --status doing
klt update 42 --priority 5
klt update 42 --description "Updated description"

Flags:

FlagDescription
--titleNew title
--description, -dNew description
--statusNew status: todo, doing, done
--priority, -pNew priority

klt delete

Permanently delete a task.

klt delete 42

klt advance

Advance a task to the next phase in its workflow.

klt advance 42

See workflows.md for details on phase-based workflows.

klt archive / unarchive

Archive a completed task (removes from active views) or restore it.

klt archive 42
klt unarchive 42

Search and suggestions

klt suggest

Scan project source code for TODO, FIXME, HACK, and XXX comments. Suggests new tasks and checks for duplicates against existing tasks.

klt suggest

Respects .gitignore — only scans tracked and untracked non-ignored files.

Import / Export

klt export

Export tasks from the current project.

klt export                    # JSON to stdout
klt export --format markdown  # Markdown to stdout
klt export > tasks.json       # save to file

klt import

Import tasks from a file.

klt import tasks.json
klt import tasks.md --format markdown

Server commands

klt serve

Start the HTTP server with Web UI and REST API.

klt serve                        # localhost:7842
klt serve --port 8080            # custom port
klt serve --host 0.0.0.0        # bind to all interfaces (for Docker)

klt mcp

Start the MCP server (stdio transport) for AI assistant integration.

klt mcp

This is typically not run directly — it’s configured as an MCP server in Claude Desktop, Cursor, or VS Code. See mcp-usage.md.

User management

klt user add

Create a new user. Enables HTTP Basic Auth on the server.

klt user add tomas
# Password for tomas: ****

klt user list

List registered users.

klt user list

See authentication.md for details.

Utility

klt backup

Backup the current project’s database.

klt backup

klt version

Show the klt version.

klt version