Skip to content

ButterIX v1 is out: versions, multiple languages, Ask AI, and a per-site MCP server, all built in. →

CLI reference

Every biti command, option, and environment variable.

npm install -g bitidocs
biti --help        # list commands
biti <command> --help  # show a command's options
biti --version

Every command that accepts [dir] defaults to the current directory.

biti init

Create a new docs project.

biti init [dir] [--title <title>] [--openapi <file>] [--skill]
--titlestring
Site title; generated from the directory name by default.
--openapistring
Copies this OpenAPI file to openapi.yml and generates two tabs, "Guides" and "API Reference".
--fromstring
Directory of an existing Fern / Mintlify project, copied whole into the new project. biti reads its fern/docs.yml or docs.json directly. See Migrate from Fern.
--skillboolean
Writes the writing skill to .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>]
-p, --portnumberDefault 3000
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 check for 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]
--jsonboolean
Output machine-readable JSON: { ok, pages, diagnostics: [{ severity, code, message, file, line, column, hint }] }. Suited to CI and coding agents.
--strictboolean
Treat warnings as errors too.
--reviewboolean
Also list pages to review; with --json they are in reviews. Doesn't affect the exit code.

The exit code is 1 when there are errors (or warnings under --strict). Common diagnostics:

CodeLevelMeaning
config/schemaErrorWrong field type in docs.yml; the message includes the field path
config/tabErrorThe navigation references an undeclared tab
nav/missing-pageErrorA page file in the navigation doesn't exist
nav/duplicate-slugErrorTwo pages end up with the same URL
api/loadErrorThe OpenAPI file doesn't exist or can't be parsed
mdx/parseErrorMDX syntax error (unclosed tag, unescaped { / <)
mdx/attributeErrorA prop value isn't a literal
asset/missingErrorA referenced image or file doesn't exist
link/brokenWarningLink to a nonexistent source file
mdx/unknown-componentWarningUnknown component; only its children are rendered
mdx/required-propWarningA component is missing a required prop
mdx/tagWarningA disallowed HTML tag was removed
md/table-mergeWarning> / ^ in a table cell is neither written as a merge nor escaped
page/reviewWarningowner, verified or review-every is written wrongly, see Page review
icon/unknownWarningNo icon has that name
skill/invalidError / warningA skill in .well-known/agent-skills/ doesn't meet the requirements
api/unsupportedWarningThe file isn't OpenAPI or Swagger (for example AsyncAPI or OpenRPC), so this section has no content
openapi/specWarningA 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] --list

biti 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>]
--apistringDefault https://console.butterix.com
Platform URL; the ButterIX hosted platform by default.
--tokenstring
Organization API key; prompted interactively when omitted.

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>]
--sitestring
Site slug; defaults to the first subdomain label of instances[0].url.
--previewboolean
Create a preview deployment.
--messagestring
Deployment message.

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]
--sitestring
Site slug; defaults to the first subdomain label of instances[0].url. Required when pulling into a new folder.
--cleanboolean
If the folder holds something else, empty it first (keeps .git). It is emptied only after the download succeeds.
--mergeboolean
If the folder holds something else, pull into it anyway. Files with the same path but different content become conflicts; the rest stays and is uploaded by the next deploy.
--forceboolean
Take the online version of every file, overwriting local edits.
--dry-runboolean
List what would change without writing anything.

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>]
--tostring
Target languages, comma-separated; defaults to every language other than the source.
--provideranthropic | deepseek | openrouterDefault anthropic
Model provider.
--modelstring
Model id; defaults to the provider's default model.
--onlystring
Only translate pages whose path contains this string.

See Internationalization for details.

biti components

List every MDX component, alias, and prop.

biti components [--json]
Output (excerpt)
<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

VariableUsed byDescription
BITI_TOKENdev, check, eval, export, deploy, pullOrganization API key; takes precedence over saved credentials
BITI_APIlogin and commands that need a loginPlatform URL; the ButterIX hosted platform https://console.butterix.com by default
XDG_CONFIG_HOMElogin and commands that need a loginDirectory containing the credentials file; defaults to ~/.config
ANTHROPIC_API_KEYtranslate, evalAnthropic key
DEEPSEEK_API_KEYtranslate, evalDeepSeek key
OPENROUTER_API_KEYtranslate, evalOpenRouter key
BITI_AI_PROVIDERevalProvider for answering and grading; defaults to the one whose key is set
BITI_AI_MODELevalModel that answers