LoopLoop

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 --help

Authentication

The recommended way to authenticate is with the interactive login command:

loop auth login

This 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_here

Configuration is stored in ~/.loop/config.json with restricted file permissions (0600).

Config commands

CommandDescription
loop config set <key> <value>Set url or token
loop config get <key>Print a config value
loop config listPrint all config (token masked)

Resolution order

Configuration values resolve in this order (highest priority first):

  1. CLI flags (--api-url, --token)
  2. Environment variables (LOOP_API_URL, LOOP_API_TOKEN)
  3. Config file (~/.loop/config.json)

Global options

Every command supports these flags:

FlagDescription
--jsonOutput raw JSON instead of formatted tables
--plainOutput tab-separated values (no colors)
--api-url <url>Override API URL for this invocation
--token <token>Override auth token for this invocation
--versionPrint CLI version
--helpShow help for a command

Commands

CommandDescription
loop auth loginAuthenticate with the Loop API
loop auth logoutClear stored credentials
loop auth statusShow authentication state
loop issues listList 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 triageView the triage queue
loop triage accept <id>Accept a triage issue
loop triage decline <id>Decline a triage issue
loop templates listList prompt templates
loop templates show <id>Show template details
loop templates promote <id> <versionId>Promote a version to active
loop nextClaim the next highest-priority issue
loop dispatch queuePreview the dispatch queue
loop dashboardShow system health overview
loop projects listList projects
loop goals listList goals with progress
loop labels listList labels
loop labels createCreate 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.

ContextBehavior
TTY (terminal)Colored output, interactive prompts, spinners
Piped / CIPlain JSON-safe output, no prompts (uses defaults), no spinners

Environment variables

VariableDescription
LOOP_API_URLAPI base URL
LOOP_API_TOKENBearer token for authentication

Using environment variables is recommended for CI pipelines to avoid exposing tokens in shell history.