@solderspark/spark-code
v0.1.21
Published
Local-first agentic coding CLI for OpenAI-compatible LLM servers
Downloads
270
Readme
Spark — local-first agentic coding in your terminal
Spark is an agentic coding assistant that runs entirely against your own local LLM server. No cloud, no third-party API keys, no code leaving your machine — point it at an OpenAI-compatible endpoint (built for vLLM serving Qwen3.6, and it adapts to other local models) and it reads, edits, and runs your project with your approval.
By Solderspark.
Install
npm install -g @solderspark/spark-codeThat gives you the spark command. (Node 20+.)
Quick start
- Run a local model server that exposes an OpenAI-compatible API. The easiest
is Ollama:
(Or LM Studio, vLLM, llama.cpp — anything OpenAI-compatible.)ollama pull qwen2.5-coder - Run Spark — it auto-detects a running local server (Ollama / LM Studio /
vLLM / llama.cpp) and adapts to whatever model it serves:
First run walks you through setup if nothing's detected. To point it somewhere specific:sparkspark --url http://localhost:8000/v1 --model qwen3.6-35b
That's it — ask a question, and Spark works in your current directory.
Modes
Switch any time with the /mode picker (or /ask, /bypass, /agentic):
| Mode | Tools | For |
|---|---|---|
| Ask (default) | approve each tool (y/a/n) | staying in control |
| Bypass | auto-approve all tools | "stop asking, I'm watching" |
| Agentic | auto-approve + run unattended | long autonomous tasks |
| Plan (/plan) | plan first, then execute | risky multi-step work |
What it does
- A real agent loop — the model calls tools (
Read,Grep,Glob,Edit,Write,Bash, subagents), the harness runs them, results feed back, repeat. - Undo —
/undoreverts the last turn's file changes (and deletes files it created). Every turn is checkpointed. - Self-correction — after it says it's done, Spark runs your typecheck/build on the changed files and fixes what it broke before stopping.
- Safety nets — catastrophic shell commands (disk wipes,
curl | sh, fork bombs) are hard-blocked even unattended; edits preserve a file's real encoding (UTF-8 / BOM / UTF-16); a loop guard steers out of doom-loops. - Capability detection — Spark probes the served model and adapts (context window, tool-calling, parallel tools, reasoning), so non-qwen local models work too, with safe defaults.
- MCP — add custom/external tools (browser automation, databases, …) via MCP
servers in
~/.spark-code/mcp.jsonor./.spark-code/mcp.json. - Sessions —
/session save, resume withspark --resume <id>. - Project memory & prompt layering —
./SPARK.mdand file-based slash commands in./.spark-code/commands/.
Useful flags
| Flag | Description |
|---|---|
| -u, --url <url> | OpenAI-compatible server base URL |
| -m, --model <name> | Model id (the one your server serves) |
| --think | Enable the model's thinking/reasoning for this session |
| --resume <id> | Resume a saved session |
| --print <prompt> | Run one turn non-interactively, print to stdout, exit (scriptable) |
| --allow-all | With --print, auto-approve every tool (for CI) |
Run spark --help for the full list, and /help inside the session for slash
commands. /diagnose checks your server connection and the model's capabilities.
Supported models
Tuned for qwen3.6-35b (A3B MoE, sequential tool calls) and qwen3.6-27b
(dense, parallel tool calls) via vLLM, but capability detection lets other
OpenAI-compatible local models work with conservative defaults. Set --model /
sparkCode.model to the id your server actually serves; /diagnose confirms it.
Privacy
Everything runs against the server you configure. Spark sends your prompts and the files it reads to that endpoint only. No telemetry, no third-party service.
Also available for VS Code
Prefer a GUI? Spark is also a VS Code extension (same engine, a chat panel with inline diffs, grounded Plan mode, and a context visualizer) — search "Spark" in the VS Code Marketplace.
© Solderspark · https://solderspark.com · See LICENSE for terms.
