CLI

CLI Overview

Install and configure the command-line interface.

What is the Queue CLI?

The Queue CLI is your terminal interface to everything Queue can do. Spin up agents, inspect run traces, manage configs, trigger deployments, and automate workflows — without ever leaving your shell.

It is designed for developers who live in the terminal and want agent automation to fit naturally into existing workflows — CI pipelines, git hooks, Makefiles, and cron jobs included.

Installation

npm

npm install -g @queue/cli

Homebrew

brew install queue-dev/tap/queue

Confirm it worked with queue --version. If the command is not found, make sure npm’s global bin directory is on your PATH.

Authentication

Run queue login to open a browser-based sign-in flow. Your credentials are written to ~/.queue/config.yaml and used automatically on every subsequent command.

In headless environments — CI, Docker, or any context where a browser is not available — skip the interactive flow and set QUEUE_API_KEY as an environment variable instead. The CLI picks it up automatically.

Core commands

queue completion --shell zsh >> ~/.zshrc && source ~/.zshrc

The CLI is organized around a handful of top-level commands that cover the full agent lifecycle.

queue run

Start an agent run against a goal. Streams each reasoning step and tool call to your terminal in real time. Press Ctrl+C to cancel gracefully — Queue saves the partial trace before stopping.

queue trace

Inspect the full trace of any completed run: every model call, tool invocation, file change, and decision, with latency and token counts at each step. Use --verbose to see the raw prompt text the model received.

queue deploy

Publish your queue.yaml agent configs to a target environment. Once deployed, agents can be triggered remotely via the API, webhooks, or Slack — no local access required.

queue logs

Tail logs for any agent or run. Filter by agent name, time window, or exit status. Combine with --json to pipe structured output into your own tooling.

queue eval

Run a suite of evaluation goals against your agent and compare outcomes. Useful for catching regressions before deploying a config change to production.

Global flags

These flags work on every command and are evaluated before the command-specific logic runs.

  • --workspace <name> — target a specific workspace, overriding the default in config.yaml.

  • --api-key <key> — use a different API key for this command without changing your stored credentials.

  • --config <path> — load a custom config file instead of the default ~/.queue/config.yaml.

  • --json — emit raw JSON output. Ideal for scripting and piping into jq.

  • --quiet — suppress intermediate output and only print the final result.

  • --debug — print verbose internal output: raw HTTP requests, full prompt text, per-step token usage.

Shell tab completion

Enable tab completion for bash, zsh, or fish by running the completion command for your shell:

Once active, pressing Tab after queue auto-completes command names, flag names, agent names from your config, and even run IDs from recent history.

Getting help

Every command exposes a --help flag that prints a concise usage summary with all available options and examples. queue --help shows the top-level command list; queue run --help goes deeper into run-specific flags.

The CLI also detects typos and suggests the closest valid command — so queue rnu will suggest queue run rather than failing silently.

On this page

Create a free website with Framer, the website builder loved by startups, designers and agencies.