SoleilCode understands your project, uses tools with explicit approval, and lets SoleilRelay choose the best available free or local model for each task.
One prompt, automatic free/local model routing, real file tools, and browser verification.
Most coding agents are tied to one model or a paid subscription. SoleilCode takes a different approach:
- Free-first routing — paid model definitions are rejected.
- Local-first privacy — Ollama works without an API token or internet access.
- Task-aware model selection — coding, debugging, review, tests, exploration, and long-context work can use different models.
- Graceful fallback — rate-limited or unavailable providers are cooled down while SoleilRelay tries another eligible route.
- Human-controlled tools — file writes and commands require approval by default.
- Ten interface languages — change language without reinstalling or editing code.
- Project-agent behavior — coding requests inspect the workspace, write real files, verify the result, and report exact paths instead of pasting an unfinished code block.
- Native tool calling — Groq, OpenRouter, Gemini, compatible endpoints, and supported Ollama models can call project tools through provider-native functions.
- Recoverable edits — file writes create local checkpoints that can be restored
with
/undo. - Runtime browser checks — web projects can be opened in an installed Edge, Chrome, or Chromium browser with console errors, interactions, and screenshots.
- Automation and evaluation —
soleil run --jsonsupports scripts and CI, whilesoleil benchmeasures real coding-agent behavior in isolated projects.
SoleilCode is an early-stage project. Review proposed edits and terminal commands before approving them, especially in important repositories.
| Area | What is included |
|---|---|
| Terminal experience | Full-screen green interface, persistent cat header, live model and tool activity |
| Project tools | List/read/search files, write/replace, commands, Git diff, real browser verification |
| Model routing | Groq, Gemini, OpenRouter, Ollama, and custom OpenAI-compatible endpoints |
| Cost controls | Only free and local model definitions are eligible |
| Privacy modes | auto, free, local, and private |
| Token center | Hidden token entry, multiple accounts, fingerprints, listing, and removal |
| Safety | Workspace boundary, secret-file blocking, explicit write/command approval |
| Languages | English, Turkish, Spanish, French, German, Italian, Portuguese, Russian, Japanese, Korean |
| Automation | Headless JSON runs, built-in smoke/core benchmark suites, checkpoints and undo |
For project tasks, SoleilCode behaves as an execution agent:
- It takes a bounded snapshot of the current project structure.
- SoleilRelay classifies the task and selects a suitable free or local model.
- The provider receives native function definitions and the model calls one project tool at a time. Text JSON remains as a compatibility fallback for older models.
- The model inspects, writes, replaces, or verifies files through bounded tools.
- Every approved
write_fileorreplace_in_filecaptures the previous file state. - Browser applications are checked in a real locally installed Chromium browser.
- Malformed, flattened, or truncated fallback JSON is repaired instead of printed as chat.
- Edit tasks cannot finish until a file write succeeds or the user denies it.
- The final answer includes the exact files that were created or changed.
When a standalone app is requested from a general workspace, the agent is instructed
to create a descriptive subdirectory such as snake-game/index.html. When the
current directory is already dedicated to the app, it writes directly there.
- Node.js 22 or newer
- npm and a Windows, macOS, or Linux terminal
- At least one local model or free provider token
npm install -g soleilcode
soleilClone the repository, open the folder, and run:
npm install
npm run build
npm linkWindows users can alternatively run install-windows.cmd.
Then open any project directory and start SoleilCode:
soleilCheck discovered models:
soleil doctorOpen the guided free-model and token center:
soleil setupWork in a specific directory:
soleil --cwd ./my-appRun one task without the interactive interface:
soleil run "fix the failing login test" --cwd ./my-app --yes --jsonRun the fast one-task benchmark or the three-task core suite:
soleil bench --suite smoke
soleil bench --suite core --runs 3 --jsonBenchmarks use the configured free/local routes and therefore consume their quota. Each case runs in a new temporary project that is removed after verification. See the benchmark methodology and latest verified snapshot.
soleil run uses the same routing, tools, safety boundaries, checkpoints, and agent
loop as the interactive interface. JSON output includes the final answer, model
attempts, token usage when reported by the provider, tool results, protocol repair
count, timing, and the generated checkpoint.
soleil run "update the README" --yes --json
soleil run --prompt-file task.txt --cwd ./my-app --yes --jsonWithout --yes, headless writes and commands are denied because no interactive
approval prompt is available. Use automatic approval only in controlled workspaces.
The browser_test tool starts an ephemeral local server, launches an installed
Microsoft Edge, Google Chrome, or Chromium executable, performs requested keyboard
interactions, records page and console errors, and saves a screenshot under
.soleil/artifacts/.
External network requests and service workers are blocked during verification.
Secret paths such as .env, .git, .soleil, and private-key files are never
served. Set SOLEIL_BROWSER_PATH when the browser executable is installed in a
non-standard location.
Before SoleilCode overwrites or replaces a file, it stores that file's previous
state under .soleil/checkpoints/. In the interactive interface:
/checkpoints
/undo
Undo restores edited files and removes files that the agent created in the latest checkpoint. Commands can modify files outside SoleilCode's file tools, so command side effects are intentionally not claimed as reversible.
SoleilCode ships with ten selectable interface languages:
| Code | Language | Code | Language |
|---|---|---|---|
en |
English | it |
Italiano |
tr |
Türkçe | pt |
Português |
es |
Español | ru |
Русский |
fr |
Français | ja |
日本語 |
de |
Deutsch | ko |
한국어 |
Use the visual picker:
soleil languageOr choose a language for one launch:
soleil --language esInside the interactive agent:
/language
/language ja
Selections made with the picker or /language CODE are stored in
%USERPROFILE%\.soleilcode\config.json.
The built-in setup center explains how to connect these routes:
| Provider | Route | Best fit |
|---|---|---|
| Ollama | Models installed on your machine | Fully local and private work |
| Groq | Free-plan coding and general models | Fast edits, tests, and debugging |
| Google Gemini | Free-tier Flash models | Exploration and long-context tasks |
| OpenRouter | openrouter/free |
Automatic selection among available free models |
| Custom endpoint | OpenAI-compatible server | Self-hosted or community endpoints |
Free quotas and model availability are controlled by each provider and can change. SoleilCode never intentionally upgrades to a paid route, but it cannot determine whether billing is enabled on an external provider account. For strict zero-cost use, disable billing at the provider or use Ollama.
SoleilCode discovers installed models automatically while Ollama is running. To force a specific model:
set OLLAMA_MODEL=qwen2.5-coder:7b
soleil --mode localset GROQ_API_KEY=your_token
soleilOptionally set GROQ_MODEL to force one model.
set GEMINI_API_KEY=your_token
set GEMINI_MODEL=your_free_model
soleilset OPENROUTER_API_KEY=your_token
soleilThe default route is openrouter/free. Set OPENROUTER_MODEL to use a specific
eligible free model.
set SOLEIL_BASE_URL=http://127.0.0.1:1234/v1
set SOLEIL_MODEL=local-coder
set SOLEIL_API_KEY=
soleilSee .soleilcode.example.json for project-level configuration. Store only the environment variable name in configuration files, never the secret itself.
Use soleil setup or /setup to:
- Add tokens with hidden terminal input.
- Keep multiple legitimate accounts for supported providers.
- List tokens by provider, label, and irreversible short fingerprint.
- Remove a token without opening the credentials file.
- Change the interface language.
Tokens are stored in %USERPROFILE%\.soleilcode\credentials.json with
user-profile permissions. Raw token values are never printed in status views or
sent to models as chat content.
The current vault format is not encrypted with the operating-system keychain. Use device encryption and protect your Windows account. Keychain-backed storage is planned.
| Command | Purpose |
|---|---|
/help |
Show interactive commands |
/models |
Show discovered providers and models |
/status |
Show SoleilRelay mode and route health |
/setup |
Open the free-model and token center |
/tokens |
List token labels and fingerprints |
/free |
Show built-in free provider guidance |
/language |
Open the ten-language selector |
/language CODE |
Change and save the interface language |
/mode auto |
Use free cloud and local routes |
/mode free |
Use free routes |
/mode local |
Use local routes only |
/mode private |
Keep source code on the device |
/checkpoints |
List recoverable agent file checkpoints |
/undo |
Restore the latest checkpoint |
/clear |
Clear conversation context |
/exit |
Exit SoleilCode |
Use --yes only in controlled environments to bypass file and command approvals.
flowchart TD
U["User task"] --> C["Local task classifier"]
C --> R["SoleilRelay scorer"]
R --> F["Eligible free cloud models"]
R --> L["Local Ollama models"]
R --> O["Custom OpenAI-compatible models"]
F --> A["Soleil coding agent"]
L --> A
O --> A
A --> T["Project tools"]
T --> P{"User approval required?"}
P -->|Yes| U
P -->|Approved| T
For every eligible model, SoleilRelay considers:
- configured priority;
- task-specific strengths;
- local/private mode bonuses;
- observed success rate;
- average latency;
- active cooldown after failures or rate limits.
If a provider fails, the next free or local candidate is tried. Short provider retry windows can be honored once when doing so is faster than abandoning the route.
- Project tools cannot leave the selected workspace.
.env,.git, private keys, certificates, and common secret files are blocked.- File writes and terminal commands require approval by default.
- Browser verification is local-only and blocks secret paths and external requests.
- Checkpoints contain only prior contents of files changed through SoleilCode file tools.
- API keys are not included in model prompts.
- Token entry is hidden and token listings show fingerprints only.
privatemode only permits local models.
Found a vulnerability? Please follow SECURITY.md instead of opening a public issue.
npm install
npm run dev
npm test
npm run checkThe test suite covers native and fallback tool loops, headless JSON execution, real-browser interaction, checkpoint restoration, benchmark reporting, safe workspace boundaries, routing, rate-limit retries, credentials, and internationalization.
- Full terminal coding-agent loop
- Provider-native tool calling with text-protocol fallback
- Automatic workspace inspection and enforced project execution
- Recovery from malformed or truncated open-model tool responses
- Headless
run --jsonautomation - Isolated smoke and core benchmark suites
- Real local browser verification with screenshots
- File checkpoints,
/checkpoints, and/undo - Free/local task-aware routing
- Multiple provider tokens
- Ten-language interface
- Windows installer
- Automated CI across Windows, macOS, and Linux
- OS keychain-backed token encryption
- Streaming model output
- Git-aware patch review screen
- Provider health dashboard
- macOS and Linux installers
- Plugin/tool extension API
Issues and pull requests are welcome. Start with CONTRIBUTING.md and keep changes focused, tested, and free-first.
SoleilCode is available under the MIT License.
