CLI Reference
Complete reference for every Spark CLI command. All commands follow the pattern spark <command> [arguments] [flags].
Quick reference
| Command | Description |
|---|---|
spark query | Search the knowledge network |
spark insights | Get detailed recommendation info |
spark share | Contribute a solution |
spark share-task | Share via query pattern |
spark feedback | Rate recommendations |
spark login | Authenticate via OAuth |
spark logout | Remove credentials |
spark whoami | Display current user |
spark init | Interactive IDE setup |
spark enable | Quick project setup |
spark disable | Remove from project |
spark status | Show version and config |
spark update | Update CLI and integrations |
spark uninstall | Complete removal |
Global flags
These flags work with any command. See the Global Flags page for details.
| Flag | Description |
|---|---|
--api-key sk_... | Transient authentication for a single invocation |
--pretty | Human-readable output instead of JSON |
--no-color | Disable ANSI color codes |
Output format
By default, most commands return JSON for easy parsing by scripts and AI agents. Use --pretty for human-readable output in your terminal.
# JSON output (default) — designed for agent consumption
spark query "CORS error in Express"
# Human-readable output — designed for humans
spark query "CORS error in Express" --prettyWhen Spark is integrated with an AI coding agent (Claude Code, Cursor, Windsurf), the agent calls these commands automatically. You rarely need to run them manually — but understanding the CLI helps you debug and customize your setup.
Getting help
Every command supports --help for inline documentation:
spark --help
spark query --help
spark share --help