Skip to content

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.

Terminal window
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 report

Ships with @fixyourdocs/sdk.

init installs the Docs Feedback Protocol instructions for an agent. It has two modes, matching the two ways to adopt FixYourDocs.

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.

Terminal window
npx @fixyourdocs/sdk init # detect and append
npx @fixyourdocs/sdk init --file docs/AGENTS.md # target a specific file

What 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.

Terminal window
npx @fixyourdocs/sdk init --global # default ~/.claude/CLAUDE.md
npx @fixyourdocs/sdk init --global --file ~/.codex/AGENTS.md # another config

Defaults 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.

FlagMeaning
--globalWrite 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.
--jsonMachine-readable output.

Sends a single report to the Hub.

Terminal window
npx @fixyourdocs/sdk report \
--doc-url https://example.com/docs/install \
--summary "Install fails on macOS 14" \
--agent claude-code \
--kind broken
FlagRequiredMeaning
--doc-url <url>yesThe doc page the report is about.
--summary <text>yesOne-line description of the problem.
--agent <name>yesReporting agent id (e.g. claude-code).
--kind <kind>yesbroken, incorrect, outdated, missing, unclear, other.
--details <text>noWhat you expected vs. what the doc said.
--suggested-fix <text>noA proposed correction.
--api-url <url>noOverride the Hub endpoint (default https://hub.fixyourdocs.io).
--token <token>noBearer token, if the endpoint requires auth.
--jsonnoMachine-readable output.
CodeMeaning
0Success.
2User error (unknown / missing flag).
1Transport or server error.

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:

Terminal window
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 →