SmallCode 是一款完全本地运行的 AI 编程助手,针对 8B–35B 参数的小型模型深度优化。通过智能上下文预算管理、任务分解、多模型路由、搜索替换补丁等机制,弥补小模型的局限性,提供完整的代理循环体验。 SmallCode is a fully local AI coding agent optimized for small models (8B–35B). It compensates for small model limitations through context budget management, task decomposition, multi-model routing, and search-and-replace patching — delivering a full agent loop experience.
在 GitHub 上查看View on GitHubnpm install -g smallcode
smallcode 启动全屏 TUIRun smallcode in terminal to start the fullscreen TUI/help 查看所有斜杠命令Use /help to see all slash commands交互式编程代理:读、写、编辑文件,执行 shell 命令,搜索代码Interactive coding agent: read, write, edit files, run shell, search code
根据复杂度路由到 fast/default/strong 模型Route tasks to fast/default/strong tiers by complexity
压缩对话历史,智能管理小模型上下文窗口Compress history, manage small model context windows
恢复小模型格式错误的工具调用(JSON、Liquid AI、围栏块)Recover malformed tool calls (JSON, Liquid AI, fenced blocks)
精确搜索替换补丁,避免全文件重写Exact search-and-replace patching, no full rewrites
将复杂任务分解为原子步骤,逐步执行Break complex tasks into atomic numbered steps
跨会话持久化决策、工作流、约定Persist decisions, workflows, conventions across sessions
红-绿-重构循环,自动阶段转换Red-Green-Refactor cycle with auto phase transitions
符号搜索、代码解释、MCP 桥接Symbol search, explanation, MCP bridge
防止覆盖未读取的文件Prevents overwriting unread files
输入一个复杂任务,SmallCode 会将其分解为原子步骤(模拟核心算法) Enter a complex task, SmallCode decomposes it into atomic steps (simulating core logic)
Share
Submit to AI Directories