Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mod8-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
mod8
The AI coding terminal that picks the best model for you.
mod8 routes each task to Claude, GPT, Gemini, or DeepSeek โ compares them side-by-side, switches mid-task, edits files, runs shells, and publishes what you build to a free URL.
One CLI. Every model. No vendor lock-in.
npm install -g mod8-cliWhat makes it different
Every other AI coding tool ties you to one provider. mod8 doesn't.
| Feature | What it does |
|---|---|
| ๐ฏ Smart routing | Knows which model is best for what โ auto-recommends Claude for React, GPT for APIs, Gemini for huge contexts, DeepSeek for cheap iteration. |
| ๐ Mid-task switching | "use gpt" / "ask claude" / /handoff gemini โ change provider in the same conversation without losing context. |
| โ๏ธ Side-by-side compare | Run the same prompt across every configured provider, see all answers in one screen. |
| ๐ง Auto-handoff | Provider hits its context limit? mod8 silently switches to a bigger-window model. |
| ๐ Per-project tracking | Tags every turn with (project, topic, provider). Dashboard at mod8.ai shows per-project spend, provider mix, topic distribution. |
| ๐ Publish to a URL | mod8 publish ships any static site to <slug>.apps.mod8.ai with real HTTPS โ one command. |
| ๐ก๏ธ Anti-loop ledger | Write-tracking ledger refuses silent overwrites. No more "agent rewrote its own files for 10 minutes". |
| ๐ Learns YOU | After 2+ overrides for a topic, the comparison panel floats your preferred provider to the top with a โ "your usual pick" badge. |
Install
npm install -g mod8-cliRequires Node 20+. The terminal command is mod8; the npm package is mod8-cli.
Then pick auth:
Option A โ mod8 login (hosted proxy)
One account, one bill, every provider.
mod8 login # opens mod8.ai, paste the sk-mod8-โฆ keyAfter login, every request goes through the mod8 proxy. You see live spend on the mod8.ai dashboard.
Option B โ BYOK (bring your own keys)
mod8 keys set anthropic # also: openai, google, deepseek, mistral,
# groq, openrouter, xai, together
mod8 add-provider # for any other OpenAI-compatible APIKeys are stored at ~/.config/mod8/providers.json (mode 0600, never leaves your machine).
Quick tour
$ mod8 new
โป mod8
start chatting ยท "go" hands off to claude ยท "use gpt" / "use gemini" switches
/compare runs all providers ยท /handoff <name> mid-stream ยท /publish ships sites
โบ i want to build a landing page for a plumber
โ Topic shift detected: frontend / UI work
Typical turn: ~16k tokens ยท ~5 turns per task
Provider Speed $/turn Code Performance Why
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โญ Claude โ
โ
โ
โโ $0.054 โ
โ
โ
โ
โ
โ
โ
โ
โ
โ
Best at React, Tailwind, components
GPT โ
โ
โ
โ
โ
$0.040 โ
โ
โ
โ
โ โ
โ
โ
โ
โ
Fast iteration, weaker on Tailwind
Gemini โ
โ
โ
โ
โ $0.018 โ
โ
โ
โโ โ
โ
โ
โ
โ Decent UI, less precise CSS
DeepSeek โ
โ
โ
โโ $0.013 โ
โ
โ
โโ โ
โ
โ
โโ Cheapest โ expect a review pass
Currently: Claude (already the recommendation โ)
"use claude" ยท "use gpt" ยท "use gemini" ยท "use deepseek" ยท or just keep going
โบ go
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ switching to claude (work mode)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ claude ยท goal: scaffold a plumber landing page with React + Tailwind ยท step 1/8
โ โ write_file: src/Landing.tsx
โ โ write_file: src/components/Hero.tsx
โ โ bash: npm run build
โ โ done. dist/ ready to publish.
โบ /publish --confirm
โ Publishing
project plumber-site
slug plumber-site
url https://plumber-site.apps.mod8.ai
files 12 ยท size 47 KB
โ Published to https://plumber-site.apps.mod8.aiCommands
mod8 new # start a chat session (auto-saved)
mod8 list # list recent sessions
mod8 resume <id> # pick up where you left off
mod8 "say hi" # one-shot to your default
mod8 -c "โฆ" # โ claude (anthropic)
mod8 -o "โฆ" # โ gpt (openai)
mod8 -g "โฆ" # โ gemini (google)
mod8 -d "โฆ" # โ deepseek
mod8 --all "โฆ" # fan out to every configured provider, side-by-side
mod8 publish # dry-run: show what would ship
mod8 publish --confirm # ship to <slug>.apps.mod8.ai
mod8 publish --domain site.com # also bind a custom domain
mod8 keys list # who's configured
mod8 add-provider # add any OpenAI-compatible API
mod8 verify # run 252 self-testsInside chat, you can also:
/compare <prompt> explicit fan-out
/handoff <provider> switch mid-stream (preserves context)
/files list everything written this session
/status full session snapshot (zero LLM call, can't lie)
/clear start fresh
/exit quitDashboard at mod8.ai
If you mod8 login, every session is tracked per-project. Visit the dashboard to see:
- Projects โ one card per
cwdwhere you ran mod8, with totals + provider breakdown. - Sites โ your published
<slug>.apps.mod8.aiURLs, file counts, last publish times. - Spend โ token costs, charged amounts, balance.
- API key โ issue / rotate your
sk-mod8-โฆkey.
Configuration
| File or env var | What it holds |
|---|---|
~/.config/mod8/auth.json |
mod8 hosted-proxy credentials (after mod8 login). Mode 0600. |
~/.config/mod8/providers.json |
BYOK API keys + per-provider config. Mode 0600. |
~/.config/mod8/config.json |
Default provider, first-run consent state. |
~/.config/mod8/sessions/*.json |
Saved chat sessions, auto-titled after the second turn. |
~/.mod8/routing-prefs.json |
Per-user routing preferences โ learned from your overrides. |
MOD8_CONFIG_DIR |
Override the config root entirely (used by mod8 verify's sandbox). |
MOD8_HOST_MODEL, MOD8_WORK_MODEL |
Override the default chat models. |
ANTHROPIC_API_KEY, OPENAI_API_KEY, GOOGLE_API_KEY, GEMINI_API_KEY |
Override the stored key for that provider. |
Privacy
BYOK mode (Option B): mod8 talks directly to provider APIs. Your keys live in ~/.config/mod8/providers.json (mode 0600). No mod8 server is in the loop.
Hosted mode (Option A โ mod8 login): Requests go through the mod8 proxy at mod8.ai. The proxy forwards to providers using mod8's master keys, deducts from your balance, and records the turn for the dashboard. mod8 does NOT store your prompts or responses โ only metadata: project name, topic, token counts, cost.
The source is short enough to audit in an evening. mod8 verify runs 252 sandboxed tests covering every user-facing flow.
Links
- ๐ mod8.ai โ sign up, dashboard, docs
- ๐ GitHub โ issues, discussions, source
- ๐ฆ npm โ releases
License
MIT โ see LICENSE.