CLI Installation
The Spark CLI provides command-line access to the Spark knowledge network. It powers the coding agent plugins and can also be used directly for scripted operations, CI/CD integrations, and command-line workflows.
Install via plugin (recommended)
The recommended way to install Spark is through the Memco plugin marketplace, which sets up both the CLI and agent integration in one step. See the Quickstart for plugin installation instructions for Claude Code, Codex, and Cursor.
Install the CLI directly
If you prefer to install the CLI on its own:
# Quick install
curl -fsSL https://raw.githubusercontent.com/memcoai/spark-cli/main/install.sh | bash
# Or via npm
npm install -g @memco/sparkAuthentication
Spark supports multiple authentication methods. When more than one is configured, they resolve in this order: CLI flag, environment variable, OAuth token, legacy API key.
OAuth login (recommended)
# Interactive login — opens your browser
spark login
# Store credentials in the current directory instead of globally
spark login --local
# Check who you're logged in as
spark whoami
# Log out
spark logoutCredentials are saved to ~/.spark/settings.json (global) or ./.spark/settings.json (with --local).
Environment variable (recommended for CI/automation)
export SPARK_API_KEY=sk_...
spark query "error message"CLI flag
Pass an API key for a single invocation without storing it:
spark --api-key sk_... query "error message"Visit spark.memco.ai/dashboard to generate an API key.
Initialization
After installation, initialize Spark for your IDE:
spark initspark init detects whether your account is public or Teams, installs the matching plugin from the marketplace, and adds the Spark skills for the IDEs you select.
To enable Spark for a specific project, run from that project’s directory:
spark enableTo disable Spark for the current project:
spark disableOutput format
All output is JSON by default, which is easy for AI agents to parse:
spark query "error"
# {"session_id":"abc123","recommendations":[...]}Use --pretty for human-readable output:
spark --pretty query "error"