Skip to main content

CLI Reference

The Grackle CLI (@grackle-ai/cli) is the primary interface for managing environments, sessions, tasks, and configuration.

Connection

The CLI connects to the Grackle server via gRPC. Configuration:

SettingDefaultEnvironment Variable
Server URLhttp://127.0.0.1:7434GRACKLE_URL
API key~/.grackle/api-keyGRACKLE_API_KEY
Home directory~/.grackleGRACKLE_HOME

Server

grackle serve

Start the Grackle server (gRPC + Web UI + WebSocket + MCP).

FlagDefaultDescription
--port7434gRPC server port
--web-port3000Web UI port
--mcp-port7435MCP server port
--powerline-port7433Local PowerLine port
--allow-networkoffBind to 0.0.0.0 for LAN access

grackle pair

Generate a pairing code for web UI authentication. Prints the code, a URL, and a QR code. Codes expire after 5 minutes.

Environments

grackle env list

List all environments with ID, type, status, and bootstrap state.

grackle env add <name>

Register a new environment.

FlagDescription
--dockerDocker adapter
--sshSSH adapter
--localLocal adapter
--codespaceGitHub Codespace adapter
--image <image>Docker image
--repo <repo>Git repo to clone (Docker)
--volume <v>Volume mount — host:container[:ro] (repeatable)
--gpu [gpus]GPU passthrough (Docker)
--host <host>SSH hostname (required for SSH)
--user <user>SSH user
--ssh-port <port>SSH port (default: 22)
--identity-file <path>SSH private key path
--codespace-name <name>Codespace name (required for Codespace)
--port <port>PowerLine port (Local)

grackle env provision <id>

Bootstrap and connect an environment. Streams progress.

grackle env wake <id>

Reconnect a stopped environment (same as provision).

grackle env stop <id>

Gracefully disconnect an environment.

grackle env destroy <id>

Stop and tear down environment resources.

grackle env remove <id>

Unregister an environment from Grackle.

Sessions

grackle spawn <env-id> <prompt>

Start a new agent session and stream its output.

FlagDescription
--max-turns <n>Maximum agent turns
--persona <id>Persona to use

grackle attach <session-id>

Attach to a running session. Interactive — prompts for input when the session is waiting. Ctrl+C to detach.

grackle resume <session-id>

Resume a completed or interrupted session.

grackle send-input <session-id> <text>

Send text input to a session waiting for input.

grackle kill <session-id>

Terminate a running session.

grackle status

List active sessions.

FlagDescription
--env <id>Filter by environment
--allInclude completed sessions

Projects

grackle project list

List all active projects.

grackle project create <name>

FlagDescription
--repo <url>Repository URL
--env <id>Default environment
--desc <text>Description
--no-worktreesDisable worktree isolation
--working-directory <path>Working directory / repo root on the environment

grackle project get <id>

Show full project details.

grackle project update <id>

Update project properties. Same flags as create (all optional).

grackle project archive <id>

Archive a project.

Tasks

grackle task list [project-id]

FlagDescription
--search <query>Filter by title/description
--status <status>Filter by status

grackle task create <title>

FlagDescription
--project <id>Project to create in
--desc <text>Description
--depends-on <ids>Comma-separated dependency task IDs

grackle task show <task-id>

Display full task details.

grackle task update <task-id>

FlagDescription
--title <text>New title
--desc <text>New description
--status <status>New status
--depends-on <ids>Dependency task IDs
--session <id>Bind an existing session to this task

grackle task start <task-id>

Start a task by spawning an agent session.

FlagDescription
--persona <id>Persona override
--env <id>Environment override
--notes <text>Feedback for retry attempts

grackle task complete <task-id>

Mark a task as complete.

grackle task resume <task-id>

Resume the latest session for a task.

grackle task delete <task-id>

Delete a task (kills active sessions first).

Personas

grackle persona list

List all personas.

grackle persona create <name>

FlagDescription
--prompt <text>System prompt (inline)
--prompt-file <path>System prompt from file
--desc <text>Description
--runtime <runtime>Runtime (claude-code, copilot, codex)
--model <model>Model (sonnet, gpt-4o, o3, etc.)
--max-turns <n>Maximum turns

grackle persona show <id>

Display full persona details including system prompt.

grackle persona edit <id>

Update persona properties. Same flags as create (all optional).

grackle persona delete <id>

Delete a persona.

Findings

grackle finding list <project-id>

FlagDescription
--category <cat>Filter by category
--tag <tag>Filter by tag
--limit <n>Max results (default: 20)

grackle finding post <project-id> <title>

FlagDescription
--category <cat>Category (default: general)
--content <text>Finding content
--tags <tags>Comma-separated tags

Tokens

grackle token set <name>

FlagDescription
--file <path>Read value from file
--env <var>Read value from environment variable
--type <type>Token type: env_var or file
--env-var <name>Env var name on PowerLine (default: NAME_TOKEN)
--file-path <path>File path on PowerLine

If no source flag is given, prompts for the value interactively.

grackle token list

List tokens (values are never displayed).

grackle token delete <name>

Delete a token.

Credential Providers

grackle credential-provider list

Show current provider configuration.

grackle credential-provider set <provider> <value>

ProviderValid values
claudeoff, subscription, api_key
githuboff, on
copilotoff, on
codexoff, on

Configuration

grackle config get <key>

Read a setting value.

grackle config set <key> <value>

Set a setting value.

Session Logs

grackle logs <session-id>

FlagDescription
--transcriptShow markdown transcript instead of raw events
--tailFollow live events

Session IDs support prefix matching.