Get started with docsbot
This guide takes you from nothing to a docs check that runs on every pull request. It takes about ten minutes.
You will:
- Install docsbot.
- Run a check on your docs and read the findings.
- Add a
docsbot.ymlso the defaults suit your project. - Run the check in GitHub Actions.
Before you begin
You need:
- A documentation repository in Markdown, MDX or HTML. docsbot detects Hugo, Docusaurus, MkDocs, Astro, Mintlify and Jekyll, and works on a plain folder of Markdown too.
- Go 1.26 or later, to install with
go install. Prebuilt binaries are also on the releases page. - Optional: Node 22 or later, only for
docsbot agent-ready check, which runs AFDocs throughnpx.
docsbot never edits your docs and sends nothing off your machine unless you configure it to, so it is safe to try on any repository.
1. Install docsbot
go install github.com/kakabisht/Docs-toolkit/cmd/docsbot@latest
The repository is called Docs-toolkit; the command it installs is docsbot. Check that
it is on your PATH:
docsbot --version
If the shell cannot find it, add Go’s binary folder to your PATH:
export PATH="$PATH:$(go env GOPATH)/bin"
To build from a clone instead:
git clone https://github.com/kakabisht/Docs-toolkit.git
cd Docs-toolkit
make build # writes ./docsbot
2. Run your first check
From the root of your docs repository:
docsbot check --offline
--offline skips external URLs so the first run is fast. docsbot finds the content root
(content/, docs/, src/content/docs and so on), works out the published URL of each
page, reads the navigation, and reports findings grouped by file:
docs/install.md
21:49 error Links to a page or file that does not exist: missing.md [link-missing-file]
hint: Fix the path, or remove the link if the page was deleted.
docs/old-install.md
1 warning No page or navigation entry links to this page [page-orphan]
hint: Link to it from a related page or add it to the navigation.
Each finding has the file, line and column, a severity, a message, the rule ID in square
brackets and a hint. Run docsbot rules to see all 31 rules.
If docsbot picks the wrong folder, point it at the right one:
docsbot check --content-dir site/content --offline
Now run the full check, including external links:
docsbot check
The exit code tells scripts what happened: 0 no findings at or above the fail level
(error by default), 1 findings at or above it, 2 bad input or a failure.
3. Add a configuration file
Every setting is optional, but a small docsbot.yml at the repository root makes runs
repeatable. Start with this:
# docsbot.yml
base_url: https://docs.example.com # your published site: absolute links to it count as internal
exclude: ["drafts/**"]
links:
exclude_urls:
- ^https://(www\.)?linkedin\.com/ # sites that block automated checks
check:
fail_level: error
rules:
page-orphan: warning
content-todo: off
docsbot reads docsbot.yml, docsbot.yaml or .docsbot.yml from the current folder,
or else from the folder you are checking; -c path/to/docsbot.yml names one explicitly.
Flags on the command line override the file. The
configuration reference lists every key, and
docsbot.example.yml is a commented copy you can start from.
4. Run it on every pull request
Add a workflow to your docs repository:
# .github/workflows/docs.yml
name: docs
on: pull_request
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 } # --changed-only needs the base branch
- uses: kakabisht/Docs-toolkit@main
with:
command: check docs --changed-only --base origin/${{ github.base_ref }} -f github
--changed-only reports only on files the pull request changes, and -f github turns
findings into annotations on the changed lines. See
Run docsbot in CI for SARIF, JUnit and the action’s inputs.
What to try next
| If you want to | Run | Read |
|---|---|---|
| Map how pages, commands and settings connect | docsbot graph build docs && docsbot graph stats |
Explore the knowledge graph |
| Decide what to fix first | docsbot audit docs -o audit.md |
Audit structure and findability |
| See how well AI agents can use the docs | docsbot agent-ready check . |
Make docs agent-ready |
| Move from AsciiDoc to Markdown | docsbot convert src --out md --check |
Convert AsciiDoc to Markdown |
| Write a first draft with citations | docsbot draft write "Upgrading safely" |
Draft cited pages |
| Find what the code defines that the docs miss | docsbot agent gaps |
Run the documentation agent |
| Search your docs from Claude Code or another MCP client | docsbot mcp serve |
Serve docs over MCP |
To try any command without your own docs, use the fixtures in the repository:
git clone https://github.com/kakabisht/Docs-toolkit.git && cd Docs-toolkit && make build
./docsbot check testdata/fixtures/graph --offline
./docsbot audit testdata/fixtures/graph
./docsbot agent gaps testdata/fixtures/agent/repo