repo scan
Knows your project on first run
/scan prints language mix, file count, git branch + dirty state, and detected package.json scripts. Sent as opening context so the model skips the warm-up.
SpacialCode is a local Ink/React TUI from SpacialMind — slash commands, file-aware autocomplete, streaming output, approval gates, persistent memory — wrapped around whichever coding model you already pay for.
Drive your Claude Pro / Max plan through the official CLI, bring an Anthropic or OpenAI key, or log into Codex. Four providers, one polished surface, every credential on your machine.
curl -fsSL https://spacialmind.com/install/spacialcode.sh | bash
Requires Node 18.17+ (brew install node).
spacialcode
Opens the TUI. Type /login to add Claude (plan or key) or Codex / OpenAI.
› refactor checkout to use Stripe Checkout Sessions
[info] scanning repo at ~/projects/store
[info] repo=… files=412 langs=ts:298 tsx:71 json:18
Plan (3 steps)
1. Replace legacy PaymentIntent flow with Checkout Sessions
2. Wire /api/checkout/session + webhook
3. Update e2e tests
[info] step 1 → Claude Code (first available, priority 50)
┌─ approval needed ─ file.write
│ overwrite src/api/checkout/session.ts (1284 bytes)
│ +import { stripe } from "@/lib/stripe";
│ +export async function POST(req: Request) {
│ …
└─ [y]es / [n]o / [a]lways for this tool / [q]uit: a
✓ wrote src/api/checkout/session.ts
[info] step 2 → Claude Code
[info] step 3 → Codex CLI (fallback after claude-code timeout)
✓ done — Completed 3/3 step(s) via codex.
The CLI itself is free and runs on your machine with your own provider credentials. A SpacialMind subscription unlocks the rest of the stack — Desk, MCP, Voice — around it.
01 The harness
SpacialCode does the parts every coding agent needs but none of them ship: a project scan, a deterministic plan, approval gates, multi-account routing, and a memory that lives next to your code. Then it hands the actual edits to the agent you already pay for.
repo scan
/scan prints language mix, file count, git branch + dirty state, and detected package.json scripts. Sent as opening context so the model skips the warm-up.
approval gate
Three modes — ask, trusted, yolo. Destructive commands (rm -rf, force push, mkfs) always confirm regardless of mode. Per-tool 'always allow' sticks for the session.
project memory
Persisted in .spacialcode/memory.md next to your code. Plain markdown, safe to edit by hand. /memory <note> appends from inside the REPL; sent as context every turn.
02 Adapters
Adapters are tiny shims — check() and run() — that wrap your installed coding CLI. The planner routes each step, falls through to the next available adapter on failure, and surfaces the run transcript verbatim.
plan billing
claude-cliDrives your installed `claude` CLI. You log in once with the official tool, SpacialCode just streams its output. Prompts bill against your Pro / Max plan, not API credits.
per-token
claude-apiTalks to api.anthropic.com directly using the key you paste into `/login`. Stored locally at 0600.
your account
codex-cliDrives the installed `codex` CLI. You log in once, SpacialCode rides on top of that session. Your ChatGPT / OpenAI account, your billing.
per-token
openai-apiTalks to api.openai.com directly with your key. Same `/login` flow, stored locally at 0600.
Add a provider
spacialcode # then type /login
A short wizard walks you through Claude (plan or key) and Codex / OpenAI. Stored locally at ~/.spacialcode/auth.json.
Switch the active provider
/provider codex-cli
Or set a default with spacialcode config set-provider claude-cli.
03 The loop
One-line installer for macOS, Linux, Windows. Detects Node, drops `spacialcode` on PATH, prints next steps.
Run `spacialcode`, type `/login`. Pick Claude (your plan via the CLI, or an API key) or Codex / OpenAI. Stored locally at 0600.
`/doctor` runs a health check — Node, installed CLIs, ripgrep, write perms, configured accounts. `/providers` shows what's ready.
Type a task and watch it stream. `spacialcode run "<task>"` for one-shot, `/usage` to see per-provider tokens and estimated cost.
04 Approval
Every tool that writes, runs, or commits passes through the approval gate before the adapter sees it. Three modes match three risk levels; destructive patterns (rm -rf, mkfs, force push) always confirm regardless of mode.
/mode ask
Prompt on every write, shell, and commit. The safest mode — pick this when you're letting the agent loose on unfamiliar code.
/mode trusted
Skip read-only ops. Prompt on writes and shell. Remembered per-tool 'always allow' choices stick for the rest of the session.
/mode yolo
Auto-approve everything — except commands flagged destructive (rm -rf, force push, mkfs, etc.) still confirm. Use in throwaway sandboxes.
┌─ approval needed ─ shell.exec
│ npm test -- --runInBand
│ npm test -- --runInBand
└─ [y]es / [n]o / [a]lways for this tool / [q]uit: a
05 Install
The installer checks Node, drops spacialcode on your PATH, prints next steps. Prefer npm? npm install -g spacialcode works the same.
curl -fsSL https://spacialmind.com/install/spacialcode.sh | bash
Requires Node 18.17+ (brew install node).
spacialcode
Opens the TUI. Type /login to add Claude (plan or key) or Codex / OpenAI.
Verify
spacialcode --version
Should print the installed version.
Prefer npm?
npm install -g spacialcode
Any platform with Node 18.17+.
06 Questions
A local terminal-native AI coding assistant. Polished Ink/React TUI, slash commands, @file autocomplete, streaming output, approval gates, project memory. Under the hood it talks to the model you choose — your Claude plan, an Anthropic key, your Codex login, or an OpenAI key.
No. SpacialCode runs entirely locally and brings your own provider credentials. A SpacialMind account is only needed if you want the rest of the stack — Desk, MCP, Voice — around it.
Yes. Pick the `claude-cli` provider in `/login`. SpacialCode drives Anthropic's official `claude` CLI as a subprocess, so your prompts ride on the same plan-based session you logged into with `claude /login`. No tokens are stored in SpacialCode itself.
The TUI itself runs entirely on your machine; your repo never leaves it. The model call obviously needs the network — that's between you and whichever provider you picked.
Those are the engines. SpacialCode is a host shell around them — autocomplete, history that persists across sessions, project memory, repo scan, a unified `/usage` view across providers, slash commands, and an `@file` picker. If you only ever use one CLI, you may not need it. If you want a polished, single-surface experience across Claude and Codex, this is that surface.
Yes. `Provider` and `Tool` interfaces are tiny — implement `check()` and `run()` (for providers) or `name` / `risk` / `run()` (for tools) and register it. Approval gating, memory injection, and the TUI come for free.
07 Access
SpacialCode is included with Basic. Upgrade to Pro when you want the rest of the stack — Desk, MCP, Voice — around it.
Recommended for solo builders
$20/mo Save 20%
Get BasicFull SpacialMind stack
$50/mo Save 20%
Get ProHighest ceilings
$100/mo Save 20%
Get UltraSpacialCode is one room in a larger workspace. The others handle the parts a CLI can't.
The desktop workroom for vibe coding. Multi-pane terminals, kanban, parallel agents, and Monaco editor in one Tauri app.
Remote MCP server that gives any AI client — Cursor, Claude Code, Codex, Windsurf — shared tasks, memory, and agent context.
On-device voice-to-text dictation. Speak the intent; whisper.cpp transcribes; the agent ships.
Install in one line, sign in, point it at a repo. SpacialCode plans, routes, and ships — under gates you control.
curl -fsSL https://spacialmind.com/install/spacialcode.sh | bash
Requires Node 18.17+ (brew install node).
spacialcode
Opens the TUI. Type /login to add Claude (plan or key) or Codex / OpenAI.