Skip to main content
Use the Sparkle CLI to connect Codex to the Sparkle MCP server, hooks, and guardrail rules.

Prerequisites

Before you set up Codex, make sure you have:

Set up Codex

1

Sign in

Authenticate with Sparkle via browser OAuth:
sparkle login
Your session is stored locally under ~/.sparkle/.
2

Configure Codex

Wire Codex to Sparkle:
sparkle setup --ide codex
This connects Codex to the Sparkle MCP server, installs IDE hooks, and registers guardrail rules for your workspace.
3

Verify status

Confirm you are logged in and Codex is configured:
sparkle status

Verify guardrails

1

Open a project

Open the repository you want to protect with Sparkle in Codex.
2

Run a prompt

Use Codex in that project. Sparkle applies guardrails on every prompt and tool use.

What setup configures

When you run sparkle setup --ide codex, the CLI:
  • Connects Codex to the Sparkle MCP server
  • Installs and wires up IDE hooks
  • Registers guardrail rules for your workspace

Remove configuration

To remove Sparkle configuration from Codex only:
sparkle logout --ide codex

Next steps

Using the CLI

Learn the full CLI workflow.

Commands

Full command reference with options.