Skip to main content

MossCode

面向终端与编辑器的开源 AI Coding Agent:理解本地代码库、导航与修改文件、运行命令、检索代码并驱动完整的开发测试流程。支持 Anthropic Messages、OpenAI Responses 和 Chat Completions 三种协议,可接入完整 MCP、Skills、Hooks、子 Agent 与 Git 工作树团队。

安装

需要 Python 3.12 或更高版本。推荐用 uv 或 pipx 安装:

uv tool install mosscode

或

pipx install mosscode

升级使用 uv tool upgrade mosscode(或 pipx upgrade mosscode)。安装后提供 moss 和 mosscode 两个等价命令。

快速开始

moss                               # 启动终端交互界面(首次运行进入配置引导)
moss "梳理这个项目的核心模块"        # 启动并立即发送任务
moss -c                            # 恢复当前目录最近的会话
moss --sandbox                     # 开启系统级命令沙箱运行
moss -p "运行测试并总结失败原因"     # 无界面模式(支持 text / json / stream-json)
moss acp                           # 启动 ACP 服务,接入 PyCharm / IntelliJ / Zed

首次运行可直接跟随本机已有的 Claude Code / Codex 配置,或选用主流模型预设(DeepSeek、Kimi、GLM、通义千问、OpenRouter、Anthropic、OpenAI),可用 moss setup --add 追加配置,moss doctor --ping 检查环境与模型连通性。

核心功能

  • 三端统一接入:保留终端原生滚屏与文字选择的内联界面、脚本与 CI 无界面模式(-p),以及编辑器 ACP 服务端(moss acp)。
  • 代码结构导航与可靠编辑:支持全仓代码结构地图(repo_map)、文件符号大纲与按符号读取、多处原子替换与语法检查、全文检索、@文件 引用、图片输入与 !命令 直跑。
  • 长程任务与多 Agent 协作:提供只读规划(/plan)、目标驱动执行(/goal)、定时巡检(/loop)、后台命令与任务管理、子 Agent 及独立 Git 工作树团队协作(/swarm)。
  • 会话管理与长期记忆:支持长对话自动上下文减压、会话分支(/fork)、检查点文件与对话回退(/rewind),以及跨工作树共享的用户/项目记忆检索。
  • 开放扩展与安全边界:支持完整 MCP(工具、资源、@server:uri 与提示词命令)、Skills、生命周期 Hooks 与插件管理;内置四档权限、分层规则、高危命令拦截及 Windows / Linux / macOS 原生命令沙箱。

文档

MIT 许可证。

Metadata

Release files for mosscode 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mosscode 0.3.1
File Size Uploaded Provenance Actions
mosscode-0.3.1.tar.gz 1.1 MB With provenance Details for mosscode-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mosscode 0.3.1
File Interpreter ABI Platform Actions
mosscode-0.3.1-py3-none-any.whl Python 3 none any Details for mosscode-0.3.1-py3-none-any.whl

Total release size: 1.8 MB

Release files / mosscode-0.3.1.tar.gz

Download URL mosscode-0.3.1.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
b2ccee089a3382622b15868dca2be6ebc81d0fcd09536f6ff3f32329c0e103a7
BLAKE2b-256 checksum
How to use checksums
f1b04923a8462b9ef4193c9cb32de9755a6e7dc57b9b98db329597c8218260ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / mosscode-0.3.1-py3-none-any.whl

Download URL mosscode-0.3.1-py3-none-any.whl
Size 721.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e89d9263882878bc6e60c0296d986980efb213886ecd15e9101e5708a649e986
BLAKE2b-256 checksum
How to use checksums
7a72dcda60cef151930a7b20ffefff1629694f322107430baae89ee2c7935ac2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Security for mosscode 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mosscode-0.3.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page