Skip to main content
$ Command Line Interface

CLI Reference

Complete reference for all Snow-Flow CLI commands. Use these commands in your terminal alongside the TUI.

Quick Start

bash
# Install Snow-Flow globally
npm install -g snow-flow

# Start the TUI
snow-flow

# Or run a single command
snow-flow run "Create a new incident widget"

Commands

snow-flow Start the TUI (Terminal User Interface)
Usage: snow-flow [project]

Options

--model, -m Initial model to use
--prompt Initial prompt to send
--agent Initial agent mode
--continue, -c Continue the most recent session
--session, -s Resume a specific session
--port Port for the built-in server
--hostname Hostname to bind to
--mdns Enable mDNS discovery
--cors Enable CORS headers

Examples

snow-flowsnow-flow --model anthropic/claude-sonnet-4snow-flow --agent plansnow-flow --continue
snow-flow run Run a single prompt without TUI
Usage: snow-flow run [message..]

Options

--command Command to execute
--continue, -c Continue the most recent session
--session, -s Resume a specific session
--share Share session after completion
--model, -m Model to use
--agent Agent mode
--format Output format: default, json
--file, -f Read prompt from file
--title Set session title
--attach Attach file to the prompt
--port Port for the built-in server
--variant Agent variant to use

Examples

snow-flow run "Create a new incident widget"snow-flow run --model openai/gpt-4o "Explain this code"snow-flow run --continue "Follow up on last task"snow-flow run --format json "List all tables"
snow-flow serve Start the headless Snow-Flow server
Usage: snow-flow serve

Options

--port Port to listen on
--hostname Hostname to bind to
--mdns Enable mDNS discovery
--cors Enable CORS headers

Examples

snow-flow servesnow-flow serve --port 4096snow-flow serve --hostname 0.0.0.0 --cors
snow-flow web Start server and open web interface
Usage: snow-flow web

Options

--port Port to listen on
--hostname Hostname to bind to
--mdns Enable mDNS discovery
--cors Enable CORS headers

Examples

snow-flow websnow-flow web --port 8080
snow-flow attach Attach to a running Snow-Flow server
Usage: snow-flow attach <url>

Options

--dir Working directory override
--session, -s Resume a specific session

Examples

snow-flow attach http://localhost:4096
snow-flow session Manage conversation sessions
Usage: snow-flow session <action>

Subcommands

list List all sessions

Options

--max-count, -n Maximum number of results
--format Output format: table, json

Examples

snow-flow session listsnow-flow session list -n 10snow-flow session list --format json
snow-flow export Export a session conversation
Usage: snow-flow export [sessionID]

Examples

snow-flow exportsnow-flow export abc123
snow-flow import Import session data from JSON or share URL
Usage: snow-flow import <file>

Examples

snow-flow import session.jsonsnow-flow import https://share.snow-flow.dev/s/abc123
snow-flow auth Authentication and provider management
Usage: snow-flow auth <action>

Subcommands

login [url] Authenticate with providers and ServiceNow
logout Clear authentication tokens
list Show configured authentication (alias: ls)

Examples

snow-flow auth loginsnow-flow auth login https://dev12345.service-now.comsnow-flow auth listsnow-flow auth logout
snow-flow models List available AI models
Usage: snow-flow models [provider]

Options

--verbose Show detailed model information
--refresh Refresh cached model list

Examples

snow-flow modelssnow-flow models anthropicsnow-flow models --verbose
snow-flow stats View usage statistics
Usage: snow-flow stats

Options

--days Number of days to show
--tools Show tool usage breakdown
--models Show model usage breakdown
--project Filter by project

Examples

snow-flow statssnow-flow stats --days 30snow-flow stats --tools --models
snow-flow agent Create and manage custom agents
Usage: snow-flow agent <action>

Subcommands

create Create a new agent configuration
list List available agents

Examples

snow-flow agent createsnow-flow agent list
snow-flow mcp Manage MCP server configuration
Usage: snow-flow mcp <action>

Subcommands

add Add MCP server to configuration
list List configured MCP servers (alias: ls)
auth <name> Authenticate with an MCP server
logout <name> Remove MCP server authentication
debug <name> Debug an MCP server connection

Examples

snow-flow mcp addsnow-flow mcp listsnow-flow mcp auth servicenowsnow-flow mcp debug servicenow
snow-flow upgrade Upgrade Snow-Flow to latest version
Usage: snow-flow upgrade [target]

Options

--method, -m Install method: curl, npm, pnpm, bun, brew, choco, scoop

Examples

snow-flow upgradesnow-flow upgrade latestsnow-flow upgrade --method brew
snow-flow uninstall Uninstall Snow-Flow and remove files
Usage: snow-flow uninstall

Options

--keep-config, -c Keep configuration files
--keep-data, -d Keep data files (sessions, etc.)
--dry-run Show what would be removed
--force, -f Skip confirmation prompt

Examples

snow-flow uninstallsnow-flow uninstall --keep-configsnow-flow uninstall --dry-run
snow-flow completion Generate shell completion script
Usage: snow-flow completion

Examples

snow-flow completion
snow-flow github GitHub integration commands
Usage: snow-flow github <action>

Subcommands

install Install GitHub app integration
run Run on GitHub issue/PR

Examples

snow-flow github installsnow-flow github run --issue 123
snow-flow pr Fetch and checkout a GitHub PR branch
Usage: snow-flow pr <number>

Examples

snow-flow pr 42snow-flow pr 123
snow-flow acp Start ACP (Agent Client Protocol) server
Usage: snow-flow acp

Options

--port Port to listen on
--hostname Hostname to bind to
--mdns Enable mDNS discovery
--cors Enable CORS headers
--cwd Working directory

Examples

snow-flow acpsnow-flow acp --port 5000
snow-flow generate Generate OpenAPI specification with code samples
Usage: snow-flow generate

Examples

snow-flow generate

Debug Commands

Advanced debugging commands for troubleshooting and development:

snow-flow debug paths Show global paths (data, config, cache, state)
snow-flow debug config Show debug configuration
snow-flow debug scrap List all known projects
snow-flow debug skill List all available skills
snow-flow debug agent <name> Show agent configuration details
snow-flow debug wait Wait indefinitely (for debugging)
snow-flow debug lsp diagnostics <file> Show LSP diagnostics for file
snow-flow debug lsp symbols <query> Search LSP symbols
snow-flow debug lsp document-symbols <uri> Get symbols from document
snow-flow debug file search <query> Search files by query
snow-flow debug file read <path> Read file contents
snow-flow debug file list <path> List directory contents
snow-flow debug file status Show file status information
snow-flow debug file tree [dir] Show directory tree
snow-flow debug rg search <pattern> Search with ripgrep
snow-flow debug rg tree Show file tree using ripgrep
snow-flow debug rg files List files using ripgrep
snow-flow debug snapshot track Track current snapshot state
snow-flow debug snapshot patch <hash> Show patch for a snapshot hash
snow-flow debug snapshot diff <hash> Show diff for a snapshot hash

Global Options

These options are available on all commands:

--help, -h Show help for any command
--version, -v Show current version
--print-logs Print log file path on exit
--log-level Set log level: DEBUG, INFO, WARN, ERROR

Environment Variables

SNOWCODE_SERVER Custom server URL
OPENCODE_SERVER_PASSWORD Secure the headless server with a password
OPENCODE_THEME Theme override
SERVICENOW_INSTANCE ServiceNow instance URL
SERVICENOW_CLIENT_ID OAuth Client ID
SERVICENOW_CLIENT_SECRET OAuth Client Secret
ANTHROPIC_API_KEY Anthropic API key for Claude
OPENAI_API_KEY OpenAI API key

Need More Help?

Check out the TUI Guide for keyboard shortcuts or explore all MCP tools.