MicroCodex是一个用C++23编写的开源编码agent,以不足1MB的二进制文件体积重新实现了OpenAI Codex的核心功能[1]。该项目支持macOS(Apple Silicon和x86_64架构)及Linux(x86_64和arm64架构)平台,可直接在本地终端运行[1]。
MicroCodex集成了多项实用功能,包括单次提示模式、交互式终端用户界面、本地编码工具调用、持久对话记录及自动上下文压缩能力[1]。为确保安全性,该工具内置了防护措施,可阻止强制文件删除命令(rm -f/rm -rf)、git reset --hard、磁盘格式化和关机操作[1]。项目采用Apache-2.0许可证开源发布[1]。
项目当前存在若干已知限制,包括尚未支持MCP、无法从终端直接复制文本,且bash安全防护采用词汇黑名单机制而非完整沙箱隔离[1]。
MicroCodex is a compact coding agent written in C++23 with a binary size under 1MB, designed to run locally in a terminal environment.[1] The project reimplements the functionality of OpenAI Codex, offering capabilities including one-time prompts, an interactive terminal UI, local coding tools, persistent conversation history, and automatic context compression.[1]
The tool supports multiple platforms, including macOS with both Apple Silicon and x86_64 architectures, as well as Linux on x86_64 and arm64 systems.[1] Security measures are built into the agent to prevent destructive operations, blocking forced file deletion commands (rm -f/rm -rf), git reset --hard, disk formatting, and shutdown commands.[1] The project is released under the Apache-2.0 License.[1]
Several limitations remain in the current implementation. MicroCodex has not yet incorporated Model Context Protocol (MCP) support, and users cannot copy text directly from the terminal.[1] Additionally, the bash security gate relies on a vocabulary-based blacklist rather than a comprehensive sandbox environment.[1]