____ __
/ __ \___ / /__ ____ _____ _
/ / / / _ \/ / _ \/ __ `/ __ `/
/ /_/ / __/ / __/ /_/ / /_/ /
/_____/\___/_/\___/\__, /\__,_/
/____/
Task infrastructure for AI agents
delega-cli
Maintenance status: Delega’s public hosted service retired on July 28, 2026. This CLI remains public as a verifiable engineering artifact and for Ryan McMillan’s existing private deployment. New public accounts and hosted access are not available. See the case study.
CLI for the Delega task API. Manage tasks, agents, and delegations from your terminal.
Installation
npm install -g @delega-dev/cli
Existing owner credentials
delega login
delega tasks create "Review pull request #42" --priority 1
delega tasks list
delega tasks complete <task-id>
Commands
Historical setup command
delega init
Authentication
delega login
delega whoami
Tasks
delega tasks list
delega tasks list --completed
delega tasks list --limit 10
delega tasks create "content"
delega tasks create "content" --priority 1
delega tasks create "content" --labels "bug,urgent"
delega tasks create "content" --due "2026-03-15"
delega tasks show <id>
delega tasks complete <id>
delega tasks delete <id>
delega tasks assign <task-id> <agent-id>
delega tasks delegate <task-id> <agent-id> --content "subtask description"
delega tasks chain <id>
delega tasks set-context <id> --context '{"k":"v"}'
delega tasks set-context <id> --kv k=v
delega tasks dedup --content "proposed content"
delega tasks claim
delega tasks claim --project <id> --labels "backend,bug" --lease 600
delega tasks heartbeat <id>
delega tasks heartbeat <id> --lease 600
delega tasks release <id>
delega tasks state <id> waiting_input
Connect GitHub
delega github connect
delega github connect --no-open
Links repositories via the hosted GitHub App so commits/PRs that mention a task
(delega:#<task-id>, or Closes-Delega: #<task-id> to complete on merge) link
back to it. The repos you select are registered automatically — no installation
IDs to copy.
Repo Sync
delega sync init --repo owner/name
delega sync pull
delega sync status
delega sync push
delega sync push --no-auto-link
Recurring Tasks
delega recurring list
delega recurring create "Replace furnace filter" --rule monthly --anchor-day 1 --timezone America/Chicago
delega recurring create "Schedule review" --rule weekly --anchor-weekday 1 --interval 2
delega recurring update <id> --inactive
delega recurring update <id> --active --next-due-at 2026-07-01T14:00:00Z
delega recurring delete <id> --yes
Recurring rules support daily, weekly, monthly, and yearly. Use --no-skip-if-open on create, or --allow-overlap on update, when a template should spawn even if an earlier instance is still open.
Agents
delega agents list
delega agents create <name>
delega agents create <name> --display-name "Friendly Name"
delega agents create <name> --role coordinator
delega agents rotate <id>
delega agents role <id> coordinator
delega agents delete <id>
Roles: worker (own-task scope, default), coordinator (sees + can comment on all account tasks), admin (full account management).
Diagnostics & Account
delega status
delega stats
delega usage
delega reset
Global Options
--api-url <url>
--version
--help
Many resource commands also support --json for raw JSON output; check
delega <command> --help for command-specific flags.
Configuration
Non-secret CLI settings are stored in ~/.delega/config.json:
{
"api_url": "https://api.delega.dev"
}
delega login stores API keys in the OS credential store when one is available:
- macOS: Keychain
- Linux: libsecret keyring via
secret-tool
- Windows: DPAPI-protected user storage
Existing api_key entries in ~/.delega/config.json are still read for backward compatibility until the next successful delega login.
Environment Variables
DELEGA_API_KEY | API key (overrides secure storage and config) |
DELEGA_AGENT_KEY | Fallback API key for MCP/CLI shared environments |
DELEGA_API_URL | API base URL (overrides config file) |
Environment variables take precedence over the config file.
Custom API Endpoints
The CLI defaults to the Delega API at https://api.delega.dev/v1. To target a custom endpoint (advanced), set DELEGA_API_URL. Bare localhost URLs automatically use the /api namespace; remote custom endpoints should include /api explicitly.
Security Notes
delega login now hides API key input instead of echoing it back to the terminal.
delega login stores API keys in the OS credential store instead of plaintext config when secure storage is available.
~/.delega/config.json is written with owner-only permissions (0600), and the config directory is locked to 0700.
- Remote API URLs must use
https://; plain http:// is only accepted for localhost / 127.0.0.1.
- On servers that do not expose
/agent/me, delega login and delega whoami fall back to generic authentication checks instead of printing hosted account metadata.
License
MIT