CLI reference
Every biti command, option, and environment variable.
npm install -g bitidocspnpm add -g bitidocsyarn global add bitidocsbiti --help # list commands
biti <command> --help # show a command's options
biti --versionEvery command that accepts [dir] defaults to the current directory.
biti init
Create a new docs project.
biti init [dir] [--title <title>] [--openapi <file>] [--skill]openapi.yml and generates two tabs, "Guides" and "API Reference".fern/docs.yml or docs.json directly. See Migrate from Fern..claude/skills/butterix-docs for coding agents such as Claude Code to use when editing the docs. In an existing project it only adds the skill, and leaves one that's already there as it is. See Let coding agents edit your docs.Generates docs.yml, pages/introduction.mdx, pages/quickstart.mdx, assets/logo.svg, AGENTS.md, and .gitignore. Exits with an error if the directory already contains docs.yml and --skill isn't given.
biti dev
Preview the docs on your computer, with automatic reload when you edit. Run biti login first (or set BITI_TOKEN).
biti dev [dir] [-p, --port <port>]- Pages are rendered by the ButterIX platform: biti syncs changes in your docs folder to the platform incrementally and serves the pages at
http://localhost:<port>. Pages reload once a change has synced; CSS-only changes hot-swap styles without a full reload. - The preview opens on your computer only. Every page carries a footer note saying it is a development-only preview, not for readers.
- Search and Ask AI work on the published site; in the development preview, clicking them shows a notice. API playground requests work, but only to the public servers listed in your OpenAPI spec.
- Use
biti checkfor a full check.
biti check
Validate the config, navigation, MDX, links, API specs, and skills without writing any files. The check runs on the platform, so run biti login first; in CI, set BITI_TOKEN.
biti check [dir] [--json] [--strict] [--review]{ ok, pages, diagnostics: [{ severity, code, message, file, line, column, hint }] }. Suited to CI and coding agents.The exit code is 1 when there are errors (or warnings under --strict). Common diagnostics:
| Code | Level | Meaning |
|---|---|---|
config/schema | Error | Wrong field type in docs.yml; the message includes the field path |
config/tab | Error | The navigation references an undeclared tab |
nav/missing-page | Error | A page file in the navigation doesn't exist |
nav/duplicate-slug | Error | Two pages end up with the same URL |
api/load | Error | The OpenAPI file doesn't exist or can't be parsed |
mdx/parse | Error | MDX syntax error (unclosed tag, unescaped { / <) |
mdx/attribute | Error | A prop value isn't a literal |
asset/missing | Error | A referenced image or file doesn't exist |
link/broken | Warning | Link to a nonexistent source file |
mdx/unknown-component | Warning | Unknown component; only its children are rendered |
mdx/required-prop | Warning | A component is missing a required prop |
mdx/tag | Warning | A disallowed HTML tag was removed |
md/table-merge | Warning | > / ^ in a table cell is neither written as a merge nor escaped |
page/review | Warning | owner, verified or review-every is written wrongly, see Page review |
icon/unknown | Warning | No icon has that name |
skill/invalid | Error / warning | A skill in .well-known/agent-skills/ doesn't meet the requirements |
api/unsupported | Warning | The file isn't OpenAPI or Swagger (for example AsyncAPI or OpenRPC), so this section has no content |
openapi/spec | Warning | A problem in the OpenAPI spec (such as an unresolvable $ref) |
biti eval
Lets AI answer the questions in evals.yml from the docs alone and grades the answers, see Docs eval. Run biti login first; answering and grading use your own model key (see Environment variables).
biti eval [dir] [--model <id>] [--min <percent>] [--site <slug>] [--report <file>] [--json]
biti eval [dir] --import --site <slug>The exit code is 1 below the pass mark.
biti export
Exports the docs published on the platform as Markdown or PDF. Run biti login first. See Export and print.
biti export [dir] [--site <slug>] [--format markdown|pdf] [--out <path>] [--only <name>] [--lang <code>] [--paper a4|letter]
biti export [dir] --listbiti migrate
Prints the steps to move docs from another platform, or compares the old project with the new one. See Migration tool.
biti migrate <source> [--check <dir>] [--report <file>] [--base <path>] [--ignore <glob>] [--json]<source /> is the folder of the old project, or the https:// address of the old site. With --check, the exit code is 1 while something is missing.
biti login
Save platform credentials.
biti login [--api <url>] [--token <token>]Credentials are verified against /api/v1/whoami and saved to ~/.config/bitidocs/credentials.json.
biti deploy
Package the project, upload it, and publish it to the hosted platform.
biti deploy [dir] [--site <slug>] [--preview] [--message <msg>]See CLI deployment and API keys for details.
biti pull
Pull the source files online into a local folder. A folder that doesn't exist is created; a folder synced before is merged line by line, keeping changes from both sides.
biti pull [dir] [--site <slug>] [--clean | --merge] [--force] [--dry-run]instances[0].url. Required when pulling into a new folder..git). It is emptied only after the download succeeds.When the folder isn't empty and isn't this site's docs (never synced, and its docs.yml doesn't match), you're asked whether to empty it first, pull into it, or cancel. Where nobody can answer, such as in CI, pass --clean or --merge.
See Sync with the online editor for merging and conflicts.
biti translate
Incrementally translate pages into translations/<lang>/ with AI.
biti translate [dir] [--to <langs>] [--provider <provider>] [--model <model>] [--only <path>]See Internationalization for details.
biti components
List every MDX component, alias, and prop.
biti components [--json]<Callout> (<Note> <Info> <Warning> <Success> <Error> <Danger> <Tip> <Check> <Launch>) callout
Highlights important information. Aliases set the intent: …
intent enum: note | info | warning | success | error | tip | check | launch | danger — Color and default icon.
title string — Bold heading above the content.
icon icon — Icon spec (Font Awesome / lucide:name / URL / <svg>). icon={false} hides the icon.Environment variables
| Variable | Used by | Description |
|---|---|---|
BITI_TOKEN | dev, check, eval, export, deploy, pull | Organization API key; takes precedence over saved credentials |
BITI_API | login and commands that need a login | Platform URL; the ButterIX hosted platform https://console.butterix.com by default |
XDG_CONFIG_HOME | login and commands that need a login | Directory containing the credentials file; defaults to ~/.config |
ANTHROPIC_API_KEY | translate, eval | Anthropic key |
DEEPSEEK_API_KEY | translate, eval | DeepSeek key |
OPENROUTER_API_KEY | translate, eval | OpenRouter key |
BITI_AI_PROVIDER | eval | Provider for answering and grading; defaults to the one whose key is set |
BITI_AI_MODEL | eval | Model that answers |