The Flux CLI provides full task management from the terminal, with MCP parity.
# npm (recommended)
npm install -g flux-tasks
# From source
cd packages/cli && bun run build && bun link
# Via Docker
docker run -it --rm -v flux-data:/app/packages/data -e FLUX_DATA=/app/packages/data/flux.sqlite flux-mcp fluxThe CLI supports three storage modes:
flux init # Creates .flux/data.json
flux project list # Uses local dataFLUX_DATA=.flux/data.sqlite flux project listConnect to any Flux server (local or remote):
# Connect to hosted instance (with API key for writes)
flux init --server https://flux.example.com --api-key '$FLUX_API_KEY'
# Or local server (works keyless only if it runs with FLUX_ALLOW_ANONYMOUS=1)
flux init --server http://localhost:3000
# All commands now use the API
flux project list # → GET /api/projects
flux task create proj_abc "New task" # → POST /api/projects/proj_abc/tasksServer mode stores the URL in .flux/config.json. The CLI works identically regardless of mode - all commands are transparently routed to the configured backend.
Config supports $ENV_VAR expansion for secrets:
{
"server": "https://flux.example.com",
"apiKey": "$FLUX_API_KEY"
}flux init # Interactive setup (JSON storage)
flux init --sqlite # Use SQLite storage
flux init --server URL # Connect to server
flux init --server URL --api-key KEY # Server with auth (KEY can be $ENV_VAR)
flux init --git # Use git sync (default)
flux init --no-agents # Skip AGENTS.md updateConfig is stored in .flux/config.json and can be committed to share with your team.
flux project list # List all projects
flux project create <name> # Create project (private by default)
flux project create <name> --public # Create a publicly readable project
flux project update <id> --name <n> # Rename project
flux project delete <id> # Delete projectflux epic list <project> # List epics in project
flux epic create <project> <title> # Create epic
flux epic update <id> --title <t> # Update epic
flux epic update <id> --status done # Change status
flux epic delete <id> # Delete epicflux task list <project> # List tasks
flux task list <project> --epic <id> # Filter by epic
flux task list <project> --status todo # Filter by status
flux task create <project> <title> # Create task
flux task create <project> <title> -e <epic> -P 0 # With epic and priority
flux task update <id> --title <t> # Update title
flux task update <id> --status in_progress
flux task update <id> --epic <epic_id> # Assign to epic
flux task update <id> --note "context" # Add note
flux task start <id> # Mark in_progress
flux task done <id> # Mark done
flux task done <id> --note "completed" # Done with note
flux task delete <id> # Delete taskflux ready # Unblocked tasks in the default project, by priority
flux ready <project> # Unblocked tasks in a specific project
flux ready --all # Unblocked tasks across every project
flux ready --json # JSON output
flux show <id> # Show task details with commentsGit-based sync (for teams, JSON storage only):
flux pull # Pull from flux-data branch
flux push # Push to flux-data branch
flux push "commit message" # Push with custom messageNote: Git sync requires JSON storage. SQLite users should use export/import instead.
Export/Import:
flux export # Print JSON to stdout
flux export -o backup.json # Export to file
flux import backup.json # Import (replace)
flux import backup.json --merge # Import (merge)
cat data.json | flux import - # Import from stdinStart a local Flux server with Web UI + API:
flux serve # Uses config or defaults to .flux/data.json
flux serve -p 8080 # Custom port
flux serve --data path.json # Override with JSON file
flux serve --data path.sqlite # Override with SQLite fileReads .flux/config.json to determine storage backend. Serves both the web dashboard and REST API.
| Flag | Description |
|---|---|
--json |
Output as JSON |
--all |
Ready tasks across every project instead of the default one (ready) |
-P, --priority |
Priority: 0 (P0), 1 (P1), 2 (P2) |
-e, --epic |
Epic ID |
--note |
Add note/comment |
--status |
Filter or set status |
| Variable | Description |
|---|---|
FLUX_DIR |
Override .flux directory location |
FLUX_DATA |
Data file path (.sqlite/.db for SQLite) |
# Quick workflow
flux init
flux project create "My Project"
flux task create proj_abc "Fix login bug" -P 0
flux task start task_xyz
flux task done task_xyz --note "Fixed by adding null check"
# Agent workflow
flux ready --json | jq '.[0]' # Get next task
flux task start task_123
flux task done task_123
# Team sync
flux pull
flux task create proj_abc "New feature"
flux push "added new feature task"