CLI
The fixyourdocs CLI covers the one-liners you need: wire an agent (a repo,
or your global config) and send a report. It ships with both SDKs, so run
it with whichever toolchain you have.
npx @fixyourdocs/sdk init # add the AGENTS.md block to this repo (Mode A)npx @fixyourdocs/sdk init --global # wire your global agent config (Mode B)npx @fixyourdocs/sdk report … # send a reportShips with @fixyourdocs/sdk.
pipx run fixyourdocs init # add the AGENTS.md block to this repo (Mode A)pipx run fixyourdocs init --global # wire your global agent config (Mode B)pipx run fixyourdocs report … # send a reportShips with the fixyourdocs Python package.
fixyourdocs init
Section titled “fixyourdocs init”init installs the Docs Feedback Protocol instructions for an agent. It has
two modes, matching the two ways to adopt FixYourDocs.
Mode A — wire a repo (default)
Section titled “Mode A — wire a repo (default)”Adds the canonical Docs Feedback Protocol block to your
repo’s agent-instructions file, so agents working in that repo offer to
report its docs — asking you first. It auto-detects AGENTS.md, CLAUDE.md, .cursor/rules, or
.github/copilot-instructions.md and appends to whichever exists (falling
back to creating AGENTS.md). Re-running is a no-op when the block is
already present.
npx @fixyourdocs/sdk init # detect and appendnpx @fixyourdocs/sdk init --file docs/AGENTS.md # target a specific fileWhat it adds is exactly the block documented on the AGENTS.md snippet page — there’s no other state to configure.
Mode B — wire yourself globally (--global)
Section titled “Mode B — wire yourself globally (--global)”Adds the consumer-side “report stale third-party docs” block to your global agent config instead, so your agent — in every project you work in — can offer to report the broken third-party docs it consults. Public docs only, and only with your OK.
npx @fixyourdocs/sdk init --global # default ~/.claude/CLAUDE.mdnpx @fixyourdocs/sdk init --global --file ~/.codex/AGENTS.md # another configDefaults to ~/.claude/CLAUDE.md (Claude Code’s user memory); under
--global a relative --file path resolves against $HOME. Idempotent,
like Mode A. The block it writes — and the safety guards behind it — are
covered under Reporting third-party docs;
pairing it with the MCP server is recommended, since the server
enforces the consent and public-docs-only checks for you.
| Flag | Meaning |
|---|---|
--global | Write the consumer-side block to your global agent config (Mode B) instead of a repo. |
--file <path> | Target a specific file. Skips auto-detection; under --global, a relative path resolves against $HOME. |
--json | Machine-readable output. |
fixyourdocs report
Section titled “fixyourdocs report”Sends a single report to the Hub.
npx @fixyourdocs/sdk report \ --doc-url https://example.com/docs/install \ --summary "Install fails on macOS 14" \ --agent claude-code \ --kind broken| Flag | Required | Meaning |
|---|---|---|
--doc-url <url> | yes | The doc page the report is about. |
--summary <text> | yes | One-line description of the problem. |
--agent <name> | yes | Reporting agent id (e.g. claude-code). |
--kind <kind> | yes | broken, incorrect, outdated, missing, unclear, other. |
--details <text> | no | What you expected vs. what the doc said. |
--suggested-fix <text> | no | A proposed correction. |
--api-url <url> | no | Override the Hub endpoint (default https://hub.fixyourdocs.io). |
--token <token> | no | Bearer token, if the endpoint requires auth. |
--json | no | Machine-readable output. |
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 | Success. |
2 | User error (unknown / missing flag). |
1 | Transport or server error. |
Common workflows
Section titled “Common workflows”One-off report. The report command above — nothing to install
beyond npx/pipx.
CI usage. Fail a docs-lint job and file a report in one step. Use
--json to capture the report id, and check the exit code:
npx @fixyourdocs/sdk report --json \ --doc-url "$DOC_URL" --summary "$SUMMARY" --agent ci --kind broken \ || echo "report failed (exit $?)"“What does init add to my repo?” Just the AGENTS.md block — a
Markdown section telling agents how to file reports. It changes no code and
adds no dependency. Commit the modified AGENTS.md and you’re done.
Found something wrong, missing, or out of date on this page? File a docs-feedback report →