xingtu1996

Xingtu CLI — AI skill for Claude Code

AI community

服务于 AI Agent 的终端操作接口集:真实生产 harness 蒸馏的 CLI 工具与封装方法,纯文本交互,人直接用、AI 读 --help 即可 shell 调用 · Agent-ready CLI toolkit distilled from production, plain-text for humans and agents.

How to install Xingtu CLI

This entry records only its repository, not the path inside it, so there is no exact command to give. Open xingtu1996/xingtu-cli and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Xingtu CLI does

服务于 AI Agent 的终端操作接口集:真实生产 harness 蒸馏的 CLI 工具与封装方法,纯文本交互,人直接用、AI 读 --help 即可 shell 调用 · Agent-ready CLI toolkit distilled from production, plain-text for humans and agents.

Alternatives in AI

README

xingtu-cli — 服务于 AI Agent 的终端操作接口集

从真实生产 harness 里蒸馏出来的 CLI 工具集:我们自己开发的命令行、日常在用的工具、以及把手工操作封装成 CLI 的方法论。 核心理念:**封装为 Agent 而生**——纯文本交互,人直接用、AI 读个 `--help` 就能 shell 调,省 token、省人工。

这个仓收录什么

三类内容:

类别 是什么 例子
我们开发的 CLI 自己写的、每天在项目里跑的命令行工具 `fs-ops/`(统一运维 CLI)、`scripts/`(safe-delete/env-check/cc-switch)
我们使用过的 CLI 日常在用的工具及配置/封装经验 各 CLI 的环境配置、与 AI Agent 配合的用法
封装 CLI 的方法 怎么从手工操作变成 AI 友好的命令行 `docs/cli-architecture.md`(三层架构)、`docs/packaging-tutorial.md`(七步封装法)

配套的 Skill(工作流编排层)在独立仓 [xingtu-skills](https://github.com/xingtu1996/xingtu-skills) 管理,本仓聚焦 CLI 本身。

工具清单

我们开发的 CLI

位置 工具 说明
`fs-ops/` 统一运维 CLI 把日志/数据库/CI/部署/健康检查聚成一条命令,人+AI 通用。带可运行骨架 + 封装教程
`scripts/safe-delete.sh` 安全删除 进回收站而非硬删,防误删
`scripts/backup-before-op.sh` 操作前备份 批量/结构性改动前打快照
`scripts/env-check.sh` 环境检查 依赖/版本/路径体检
`scripts/cc-switch-*.py` Claude Code 配置切换 多 profile 同步 / token 接入

封装方法论

文档 内容
`docs/cli-architecture.md` 三层架构(编排 Skill / 能力 CLI / 基础环境矩阵+认证)+ 四形态演进(bash→CLI→Skill→MCP)
`docs/packaging-tutorial.md` 七步封装法:识别高频操作 → 沉淀五要素 → 套模板 → AI 友好化 → 组合成 Skill

快速开始:fs-ops(10 分钟跑通)

# 1. 复制骨架
cp -r fs-ops /tmp/fs-ops-demo
cd /tmp/fs-ops-demo
chmod +x fs-ops commands/*.sh

# 2. 跑通(demo 命令不调任何上游,纯演示)
./fs-ops list
./fs-ops demo order-service --env sit
./fs-ops demo order-service --env uat --json

你会看到:

  • list 自动扫描 commands/*.sh,文件名即命令名,零注册
  • --json 输出结构化 JSON,Agent 可解析
  • 不带 --env 直接被拦(防 prod 误操作)

**把它改成你自己的命令**:`cp commands/_TEMPLATE.sh commands/mylog.sh`,改 `run()` 调你的 API,自动成为 `fs-ops mylog`。

为什么这么设计

  • 命令自动注册:扫描 commands/*.sh,加文件 =