@modeloslab/modelcode
v0.1.12
Published
modelOS-native AI coding agent CLI — remembers like Hermes, codes like Claude Code, runs on modelOS (pay-per-use in MDL, no rate limits). Knowledge-graph memory, subagents, MCP, vision, spend caps.
Maintainers
Readme
modelcode
The AI coding agent that runs on modelOS. Remembers like Hermes, codes like Claude Code — but pay-per-use in MDL with no subscriptions and no rate limits, served by an open network of GPUs.
npm install -g @modeloslab/modelcode
modelcodeRequires Node ≥ 22.5 (uses the built-in node:sqlite — zero native dependencies).
Why modelcode
- Pay-per-use, no limits — every request is priced in MDL and shown after each turn. No monthly cap, no throttling.
- Real memory — cross-session facts, a per-repo knowledge graph (symbols + relationships), and session recall, all auto-injected as relevant context. It doesn't re-read your whole repo every session.
- Learns your style — after you reach for the same stack 3× (Tailwind, Next.js, …) it asks once to save the preference, then defaults to it everywhere.
- Agentic — subagents + multi-agent teams (free/uncapped), MCP tools (stdio + HTTP/OAuth), a full LSP client, knowledge-graph impact analysis before edits, web, browser automation, kanban, cron.
- Safe by default — permission prompts with per-tool/per-path "always allow", plan mode, checkpoints/undo, hooks, auto code-review, and spend caps (
/budget) — a guardrail subscription tools structurally can't offer. - Reliable for long sessions — auto-compaction sized to each model's context window, resumable sessions (
--continue/--resume), streaming tool output.
Getting started
modelcode # opens the REPL; pick: paste an API key, or create a wallet + key
modelcode login # set/replace your API key any time
modelcode tui # the rich Ink TUI
modelcode -p "explain this repo" # one-shot / scriptable
modelcode --continue # resume your most recent session (--resume to pick from a list)Funding credits (if you created a wallet): send MDL to your wallet, then
modelcode credits fund 5 # signs → broadcasts → waits for confirmation → claims as creditsModels
modelOS serves multiple models; pick with /model (or let /route auto-pick the best per task):
Gemini 2.5 Flash/Pro, DeepSeek V4, Qwen3 MoE, Kimi K2, GLM-4.7, gpt-oss-120b, and more.
Key commands
| | |
|---|---|
| /model /route | choose the build model / toggle the auto-router |
| /plan | plan mode (read-only until /exit-plan) |
| /budget <mdl> | per-session spend cap (subagents free) |
| /context | context-window usage (auto-compacts before overflow) |
| /memory /preferences | saved facts · learned style/stack preferences |
| /index /impact <symbol> | (re)index the codebase graph · who-references-this before an edit |
| /trust | manage always-allow tools |
| /resume | list past sessions |
| /help | everything |
Project context
Drop a MODELCODE.md (or CLAUDE.md / AGENTS.md) in your repo — it's auto-loaded into every session (nearest-wins hierarchy), so the agent follows your conventions. modelcode can generate one with the /init skill.
Configuration
State lives in ~/.modelcode/ (config, memory db, skills, sessions). Relocate with MODELCODE_HOME.
MCP servers: .modelcode/mcp.json. Hooks: .modelcode/hooks.json. Skills: .modelcode/skills/<name>/SKILL.md.
Development
bun install
bun run dev # run from source
bun test # 77 tests
bun run build # bundle → dist/cli.mjs (Node target)Built with Bun, ships to Node. MIT licensed.
