CLI Reference
Complete reference for every Spark CLI command. Commands follow the pattern spark [global flags] <command> [arguments] [command flags].
Quick reference
| Command | Description |
|---|---|
spark query | Search the knowledge network |
spark share | Contribute a solution against a session |
spark share-task | Share against a query pattern (no session) |
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, auth, and IDE config |
spark update | Update CLI and integrations |
spark uninstall | Complete removal |
Global flags
These flags work with any command and must be placed before the subcommand. See Global Flags for details.
| Flag | Description |
|---|---|
--api-key <key> | 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 compact JSON for easy parsing by scripts and AI agents. Use --pretty (before the subcommand) 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 --pretty query "CORS error in Express"When Spark is integrated with an AI coding agent (Claude Code, Cursor, Windsurf), the agent calls these commands automatically. You rarely need to run them by hand — 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