tuff-cli-guide
Reference for using Tuff CLI to manage agent capabilities — create, add (including MCP servers), list, diff, check, update, and scope operations.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- tuff-cli-guide
- description
- Reference for using Tuff CLI to manage agent capabilities — create, add (including MCP servers), list, diff, check, update, and scope operations.
03 SKILL.md 正文
Tuff CLI Guide
Tuff is a capability lifecycle manager. It installs, versions, diffs, and validates the skills, tools, hooks, MCP servers, and policies a repository gives its coding agents. Use these commands when the user asks about managing any of those, or when they mention "drift", "baseline", or "tuff".
Before You Start
Run tuff --version. If the command is missing, ask the user before installing anything. When they agree:
uv tool install tuffcli
If uv is not available, use brew tap kannandreams/homebrew-tuff && brew install tuff on macOS, or cargo install tuffcli where Rust is present. Avoid bare pip install: most systems refuse it as an externally-managed environment, and a virtual environment install is not on PATH afterwards.
Confirm with tuff --version before continuing. If the command is still not found, the install directory is not on PATH; ~/.local/bin is the usual one.
If the project has no tuff.lock, run tuff init before anything else. Never hand-edit tuff.lock or the files Tuff emits under a harness directory; edit the source under .agents/ and let Tuff re-emit.
Available Commands
Install
tuff add <path> -a <agent>— install a local capability (auto-detect type)tuff add skill <path> [name] -a <agent>— install a skilltuff add tool <path> [name] -a <agent>— install a tooltuff add hook <path> [name] -a <agent>— install a hooktuff add .agents/skills/<id> -a open-agents— track existing agent files in placetuff add skill <git-url> <name> -a <agent>— install a skill from git;<name>is its directory name orSKILL.mdname:, found anywhere in the repository; omit it when the repository holds one skill, or use a/tree/<branch>/<path>URLtuff add tool <git-url> <name> -a <agent>— install a tool from gittuff add hook <git-url> <name> -a <agent>— install a hook from gittuff add skill <git-url> <name>@<version|range> -a <agent>— install a tagged release (1.2.0,^1.2,>=1, <2); the lockfile records the tag, the requirement, and the commit- without
@, a git install records the version the source declares (versionintuff.toml, orversion:/metadata.version:inSKILL.mdfrontmatter), shown as1.2.0 (declared)since it is weaker than a release; a source declaring nothing records the commit SHA tuff create <type> <id> -a <agent>— create and track a capabilitytuff add pack <artifact.tuffpack> -a <agent>— atomically install a verified capability packtuff add <policy-dir> -a claude— install a policy (type = "policy"); only Claude Code enforces policies today, and the install is refused for any agent that would not enforce every ruletuff add mcp <catalog-id|path|git-url>... -a <agent>— wire external MCP servers (catalog: filesystem, memory, github, fetch, git, time, sequentialthinking, everything, brave-search, notion, playwright, sentry, linear, context7, screenpipe) into each harness config; secrets stay as${VAR}references. Prompts once per required variable at a real terminal (add--yesto skip, or it's automatic in a non-interactive shell)
Packs
tuff pack build --name <name>— package accepted project capabilities intotuff-dist/<name>-0.1.0.tuffpacktuff pack build --name <name> --capability <id> --version <version> -a <agent>— build a selected project packtuff pack init <name> --from-project --capability <id>— save a reusable ID-based definition undertuff-packs/tuff pack check [path]— validate a local source packtuff pack build [path] -o <artifact.tuffpack>— build a reusable project definition or standalone source packtuff pack inspect <artifact.tuffpack>— inspect verified metadatatuff pack verify <artifact.tuffpack>— verify metadata and every stored filetuff pack push <artifact.tuffpack> <registry/repository:tag>— publish exact pack bytes as an OCI artifacttuff pack pull <registry/repository:tag-or-digest> -o <artifact.tuffpack>— download and verify an OCI-distributed pack without overwriting an existing filetuff pack extract <artifact.tuffpack> -a <agent> -o <dir>— extract a runtime-native target
Inspect
tuff list— show all installed capabilities with drift statustuff list --type skill— filter by capability typetuff list --scope global— show global scopetuff status— detailed status with override warningstuff diff <id>— show local changes against baselinetuff diff <id> --upstream— show upstream changes (git sources only); for a release-pinned entry, against the newest release its requirement allowstuff diff <id>@<range> --upstream— preview what a different requirement would change beforetuff update <id>@<range>tuff outdated— check all capabilities for available updates;repointedortag missingon a release-pinned entry means the tag moved or vanished upstream, andtuff update <id> --forcereplaces the install with what the tag names nowtuff mcp doctor— spawn each installed MCP server for real and verify the handshake + tool list, not just that the config entry existstuff mcp catalog— list the built-in MCP serverstuff add mcp <id>installs by nametuff mcp search <query>— search the MCP registry for installable serverstuff scan— find capabilities already in.claude/,.cursor/, or.agents/that Tuff is not tracking; changes nothingtuff scan --adopt— track every untracked capabilityscanfound, in placetuff policy matrix— show how each agent enforces each kind of policy rule
Update & Merge
tuff update <id> --check— preview local baseline promotion or upstream changestuff update <id>— accept local edits or reconcile with upstreamtuff update <id> -a <agent>— update one recorded agenttuff update <id> --force— overwrite local changes with source outputtuff update <id>@<range>— change a tag-pinned capability's requirement and move to the newest release it allows; a bareupdatenever leaves the recorded range
CI & Validation
tuff check— validate all capabilities (exit 1 on any failure)tuff check --json— machine-readable output for CItuff list --json,tuff outdated --json,tuff diff <id> --json— the same rows as JSON, with the sametype/target/statuskeys ascheck --json; prefer these over parsing tables
Manage
tuff delete <id> -a <agent>— remove the files Tuff generated for a capability and its lockfile entry;--forcewhen the files have local changes. It never deletes the original source directorytuff untrack <id> -a <agent>— stop tracking a capability but keep its files; use this for capabilities adopted in place, whichdeleterefusestuff lock migrate— rewritetuff.lockin the current schema, changing nothing elsetuff cache clear— delete Tuff's disposable machine-local cachetuff harness list— show available harnesses (Tuff 0.11 and earlier:tuff agent list)tuff harness add <id>— register a harness and initialize its project directorytuff init --global— initialize global scope and register harnesses found in the home directory; global commands need--global, and-a claudeis what reaches~/.claude/skills
Agents
open-agents—.agents/layout; its skills are read by Codex, Cursor, OpenCode, Copilot, Gemini CLI, Windsurf, Amp, Goose, Junieclaude— Claude Codecodex— Codexcursor— Cursor
Scope
- Project (default):
tuff.lockin repo root — committed with project - Global state: XDG config/state/cache Tuff directories — available across all projects
- Project always wins when both exist
Directory Model
.agents/skills/— create and edit skills here (single source of truth).agents/tools/— create and edit tools here.agents/hooks/— create and edit hooks here.agents/mcp-servers/— generatedserver.tomlrecords for external MCP servers (edit the manifest, not these)tuff.lock— committed capability identity and lifecycle metadatatuff.config.json— project preferences;tuff.lockremains the project source of truth- No separate source directory — agent files are the source
Status Values
clean— installed content matches baselinemodified— local changes detected (runtuff diff <id>to see)missing— installed file no longer exists
Quick Cheat Sheet
tuff init # initialize repo and register open-agents
tuff add <path> -a open-agents # install capability (auto-detect type)
tuff add skill <path> [name] # install a skill explicitly
tuff add mcp github -a claude # wire a catalog MCP server
tuff list # check drift
tuff diff <id> # see what changed
tuff check # CI validation
tuff outdated # check for updates
tuff update <id> # accept local edits or update from source
04 同仓库更多 Skills
python-uv-default
Use uv for Python dependency and environment management.
duplicate-files
暂无简介
security-review
Review code, configuration, and infrastructure for security vulnerabilities, secrets exposure, and attack surfaces.
security-review
Review code, configuration, and infrastructure for security vulnerabilities, secrets exposure, and attack surfaces.
find-skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
uv-project-setup
Set up a Python project with uv in a consistent, modern, and reproducible way.