____ __
/ __ \___ / /__ ____ _____ _
/ / / / _ \/ / _ \/ __ `/ __ `/
/ /_/ / __/ / __/ /_/ / /_/ /
/_____/\___/_/\___/\__, /\__,_/
/____/
Task infrastructure for AI agents
delega-cli
CLI for the Delega task API. Manage tasks, agents, and delegations from your terminal.
Installation
npm install -g @delega-dev/cli
Quick Start
The fastest way to get started — one command handles signup, verification, and your first task:
npx @delega-dev/cli init
The interactive wizard walks you through:
- Hosted — sign up with your email, verify, get your API key
- Self-hosted — spin up a Docker instance and bootstrap your first agent
Either path ends with a working API key, a demo task, and ready-to-paste MCP config.
Already have an account?
delega login
delega tasks create "Review pull request #42" --priority 1
delega tasks list
delega tasks complete <task-id>
Commands
Getting Started
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 delegate <task-id> <agent-id>
delega tasks delegate <task-id> <agent-id> --content "subtask description"
Agents
delega agents list
delega agents create <name>
delega agents create <name> --display-name "Friendly Name"
delega agents rotate <id>
Stats
delega stats
Global Options
--json
--api-url <url>
--version
--help
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_API_URL | API base URL (overrides config file) |
Environment variables take precedence over the config file.
Hosted vs Self-Hosted
The CLI defaults to the hosted API at https://api.delega.dev/v1.
For self-hosted deployments:
export DELEGA_API_URL="http://localhost:18890"
export DELEGA_API_URL="https://delega.yourcompany.com/api"
Bare localhost URLs automatically use the self-hosted /api namespace. For remote self-hosted instances, 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