CLI Reference
Complete command reference for the loop CLI tool. Install, configure, and use the Loop CLI to manage issues, signals, triage, templates, dispatch, and system health.
CLI Reference
The loop CLI provides full command-line access to the Loop API. It is a thin HTTP client built on the @dork-labs/loop-sdk that covers authentication, issue management, signal submission, triage, prompt templates, dispatch, projects, goals, labels, and system health.
Installation
# Install globally
npm install -g @dork-labs/loop-cli
# Or run directly with npx
npx @dork-labs/loop-cli --helpAuthentication
The recommended way to authenticate is with the interactive login command:
loop auth loginThis prompts for your API URL and API key, validates them, and saves them to ~/.loop/config.json. See Auth for details.
Alternatively, configure manually:
loop config set url https://api.looped.me
loop config set token loop_your_api_key_hereConfiguration is stored in ~/.loop/config.json with restricted file permissions (0600).
Config commands
| Command | Description |
|---|---|
loop config set <key> <value> | Set url or token |
loop config get <key> | Print a config value |
loop config list | Print all config (token masked) |
Resolution order
Configuration values resolve in this order (highest priority first):
- CLI flags (
--api-url,--token) - Environment variables (
LOOP_API_URL,LOOP_API_TOKEN) - Config file (
~/.loop/config.json)
Global options
Every command supports these flags:
| Flag | Description |
|---|---|
--json | Output raw JSON instead of formatted tables |
--plain | Output tab-separated values (no colors) |
--api-url <url> | Override API URL for this invocation |
--token <token> | Override auth token for this invocation |
--version | Print CLI version |
--help | Show help for a command |
Commands
| Command | Description |
|---|---|
loop auth login | Authenticate with the Loop API |
loop auth logout | Clear stored credentials |
loop auth status | Show authentication state |
loop issues list | List issues with filters |
loop issues view <id> | Show full issue detail |
loop issues create <title> | Create a new issue |
loop issues start <id> | Start working on an issue |
loop issues done <id> | Mark an issue as complete |
loop comments add <id> <body> | Add a comment to an issue |
loop signals ingest <message> | Submit a manual signal |
loop triage | View the triage queue |
loop triage accept <id> | Accept a triage issue |
loop triage decline <id> | Decline a triage issue |
loop templates list | List prompt templates |
loop templates show <id> | Show template details |
loop templates promote <id> <versionId> | Promote a version to active |
loop next | Claim the next highest-priority issue |
loop dispatch queue | Preview the dispatch queue |
loop dashboard | Show system health overview |
loop projects list | List projects |
loop goals list | List goals with progress |
loop labels list | List labels |
loop labels create | Create a label |
loop labels delete <id> | Delete a label |
loop completions [shell] | Output shell completion scripts |
Interactive vs non-interactive
The CLI detects whether it is running in a terminal (TTY) or a piped/CI environment and adjusts its behavior accordingly.
| Context | Behavior |
|---|---|
| TTY (terminal) | Colored output, interactive prompts, spinners |
| Piped / CI | Plain JSON-safe output, no prompts (uses defaults), no spinners |
Environment variables
| Variable | Description |
|---|---|
LOOP_API_URL | API base URL |
LOOP_API_TOKEN | Bearer token for authentication |
Using environment variables is recommended for CI pipelines to avoid exposing tokens in shell history.