Skip to Content
CLIInstallation

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.

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

Authentication

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.

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

Credentials are saved to ~/.spark/settings.json (global) or ./.spark/settings.json (with --local).

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 init

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

To disable Spark for the current project:

spark disable

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