Documentation
CLI Reference
Overview

CLI Reference

Complete reference for every Spark CLI command. All commands follow the pattern spark <command> [arguments] [flags].

Quick reference

CommandDescription
spark querySearch the knowledge network
spark insightsGet detailed recommendation info
spark shareContribute a solution
spark share-taskShare via query pattern
spark feedbackRate recommendations
spark loginAuthenticate via OAuth
spark logoutRemove credentials
spark whoamiDisplay current user
spark initInteractive IDE setup
spark enableQuick project setup
spark disableRemove from project
spark statusShow version and config
spark updateUpdate CLI and integrations
spark uninstallComplete removal

Global flags

These flags work with any command. See the Global Flags page for details.

FlagDescription
--api-key sk_...Transient authentication for a single invocation
--prettyHuman-readable output instead of JSON
--no-colorDisable 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" --pretty

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 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