A CLI toolkit for automating shipping, deployment, and release workflows.
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 43 分钟前 | ||
| 43 分钟前 | ||
| 18 小时前 | ||
| 43 分钟前 | ||
| 18 小时前 | ||
| 43 分钟前 | ||
| 18 小时前 | ||
| 43 分钟前 | ||
| 18 小时前 | ||
| 18 小时前 | ||
| 12 小时前 | ||
| 18 小时前 | ||
| 43 分钟前 | ||
| 18 小时前 | ||
| 18 小时前 | ||
| 18 小时前 | ||
| 18 小时前 | ||
| 18 小时前 | ||
| 18 小时前 | ||
| 18 小时前 | ||
| 18 小时前 | ||
| 18 小时前 | ||
| 18 小时前 | ||
| 18 小时前 | ||
| 18 小时前 | ||
| 18 小时前 | ||
| 18 小时前 | ||
| 18 小时前 | ||
| 43 分钟前 | ||
| 18 小时前 |
AutoShip-CLI
AutoShip 让项目从命令行就能保持可交付——清理、验证、提交、上传,源码不离开本机。
官方网站:ms33834.github.io/autoship-cli
企业版:SSO / SCIM / RBAC
全部默认关闭、向后兼容的 opt-in 企业特性:
SSO 把 CLI 调用与审计记录绑定到企业身份。内置 stub provider 从本地 token cache 或环境变量读身份,真实 SAML/OIDC provider 通过 autoship-sdk.SsoProvider 插入。在此之上,RBAC 提供 4 个内置角色(viewer / developer / maintainer / admin)与 15 个细粒度权限;敏感命令(upload、audit cleanup、registry sync、config telemetry)受权限门控,拒绝时写审计记录。SCIM 从 SCIM 源同步用户/组用于 group-based 角色绑定——stub 模式读本地 JSON,真实 SCIM 服务器通过 autoship-sdk.ScimClient 插入。开启 SSO 后,每条审计记录(及 SIEM bundle 导出)都带 user / role / sso_subject / sso_provider 字段,审计链路同时可作为 SOC2 取证依据。
详见 docs/commands/team.md(team sso / team scim / team role)与 docs/configuration.md([sso] / [rbac] / [scim] 段)。
为什么选 AutoShip
AutoShip 本地优先:除非你显式配置外部模型或上传目标,代码不离开本机。基于
pluggy 的插件系统把 clean → verify → commit → upload 串成一条命令,commit message
由本地模型(Ollama、LM Studio)按真实 diff 生成——开箱即用,无需 API key。
AutoShip 的定位(完整对比):
| 需求 | AutoShip | husky | pre-commit | GitHub Actions | commitizen |
|---|---|---|---|---|---|
| 本地 AI 生成 commit message | ✅ | ❌ | ❌ | ❌ | ⚠️ 仅模板 |
| 一条命令 clean → ship | ✅ | ❌ | ❌ | ⚠️ 仅云端 | ❌ |
| 内置安全扫描 | ✅ | ❌ | ⚠️ 第三方 | ⚠️ 自建 | ❌ |
| 默认离线 | ✅ | ✅ | ⚠️ 首次拉取 | ❌ | ✅ |
| 三语文档(中/英/日) | ✅ | ❌ | ❌ | ❌ | ⚠️ 部分 |
AutoShip 不替代 CI——它做补充。本地用 AutoShip 产出干净提交,云端交给 GitHub Actions。
安装
推荐:pipx
pipx install autoship
使用 pip
pip install autoship
从源码安装
git clone https://github.com/MS33834/autoship-cli.git
cd autoship-cli
uv sync --all-extras --dev
uv run autoship --help
二进制下载
各平台预编译二进制可在 GitHub Releases 下载:
二进制由 CI 自动发布。
快速开始
# 初始化项目配置
autoship init
# 清理并格式化代码
autoship clean
# 生成 commit message 并提交
autoship commit
# 运行验证(以 pytest 为例)
autoship verify pytest
# 上传产物(示例:Docker 镜像)
autoship upload --target docker --image myapp --tag latest
核心特性
- 本地优先:默认使用本地 AI 模型与本地工具链,代码无需上传云端。
- 插件化:基于 pluggy 的 Hook 系统,可自由扩展清理、验证、上传等阶段。
- 插件开发 SDK:
autoship-sdk提供基类、Hook 装饰器、测试脚手架,降低插件开发门槛。 - 模型分级:根据硬件配置与任务类型自动路由到不同层级模型,平衡速度与效果。
- 安全扫描:提交前运行依赖漏洞与代码安全扫描,拦截潜在风险。
- 审计日志:完整记录命令执行、模型调用与配置变更,支持结构化导出与自动清理。
- 环境诊断:
autoship doctor一键检查 Python、Git、模型后端、工具链与目录权限。 - 多语言 CLI:内置中文、英文、日文支持,
--lang zh|en|ja或配置locale即可切换。 - 遥测默认关闭:匿名使用数据仅在显式开启后才会上报,尊重隐私。
- 企业就绪(opt-in):SSO 身份、SCIM 用户组同步、基于角色的访问控制(
team sso/team scim/team role)拦截敏感命令,并在每条审计记录上盖章操作者身份,供 SOC2 取证。
文档
- 完整文档:ms33834.github.io/autoship-cli/docs
- 本地文档:docs/
- 命令参考:docs/commands/index.md
- 配置说明:docs/configuration.md
- 插件开发指南:docs/plugin-development.md
常见问题
AutoShip 会上传我的代码吗?
不会。默认情况下所有核心处理都在本地完成;只有当你显式配置外部模型或上传目标(如 Docker Registry、PyPI)时,才会向对应服务发送必要数据。
使用 AutoShip 需要联网吗?
核心命令(init、clean、commit、verify)可在离线环境下运行。upload 以及依赖网络搜索/外部模型的功能才需要联网。
如何禁用遥测?
遥测默认已关闭,无需额外操作。如需开启,可在 .autoship.toml 中设置 telemetry.enabled = true。
更多遥测字段与端点安全规则详见 docs/telemetry.md,完整隐私政策与用户权利说明详见 docs/privacy.md。
如何开发自定义插件?
参考 docs/plugin-development.md 与示例插件 examples/custom-plugin/。
AutoShip 可以用于商业项目吗?
可以。本项目基于 MIT 许可证发布,详见 LICENSE。
贡献与安全
- 贡献指南:CONTRIBUTING.md
- 安全报告:SECURITY.md
许可证
MIT