---
title: Migration tool
subtitle: Let your own coding agent move your docs, then make sure with one command that nothing is missing.
description: How to use biti migrate — recognize Mintlify, Fern, Docusaurus, GitBook, ReadMe, Starlight, VitePress, Nextra, Fumadocs and MkDocs projects, print migration steps for a coding agent, and compare pages, text, code, images, addresses, redirects and API operations with the new project.
---

The risk in moving docs is losing something: a page, a code sample, an address that people link to. `biti migrate` works in two steps: it gives a coding agent the steps to follow, and then compares the old and the new project and lists everything that didn't make it. It only reads the old project, never changes it, and sends its content nowhere.

## Steps

<Steps>
  <Step title="Print the steps">
    ```bash
    biti migrate ../old-docs > migrate.md
    ```

    Recognizes the platform, counts pages, redirects and API operations, and lists the markup to convert.
  </Step>
  <Step title="Hand them to a coding agent">
    Give `migrate.md` to Claude Code, Cursor, Codex or another tool, and let it work in a new folder.
  </Step>
  <Step title="Compare">
    ```bash
    biti check docs
    biti migrate ../old-docs --check docs --report migration.md
    ```

    The exit code is 1 while something is missing. Give the report to the agent and repeat.
  </Step>
  <Step title="Check addresses that are online">
    While the old site is online, its sitemap shows which addresses must keep working:

    ```bash
    biti migrate https://docs.example.com --check docs
    ```
  </Step>
  <Step title="Review and publish">
    Look through the preview, then run [`biti deploy`](./cli.mdx#biti-deploy).
  </Step>
</Steps>

## Sources

| Source | Recognized by | Notes |
|---|---|---|
| Mintlify | `docs.json`, `mint.json` | Can be imported directly, see [Migrate from Mintlify](./migrate-from-mintlify.mdx) |
| Fern | `fern/docs.yml` | Can be imported directly, see [Migrate from Fern](./migrate-from-fern.mdx) |
| Docusaurus | `docusaurus.config.*` | Sidebars and config are code; they aren't run, the agent reads them |
| GitBook | `.gitbook.yaml`, `SUMMARY.md` | Content synced to a Git repository |
| ReadMe | `_order.yaml` | An exported project |
| Starlight, VitePress, Nextra, Fumadocs, MkDocs | Their config files | |
| Anything else | `.md` and `.mdx` files | General steps only |
| Any website | An `https://` address | Checks the addresses in its sitemap only |

## What is compared

| Item | How |
|---|---|
| Pages and text | How much of the old text the new project contains. Pages may be split, merged and renamed, and markup may differ; text that many pages share counts less |
| Code blocks | Whether each is still there, ignoring whitespace |
| Headings | Listed for incomplete pages |
| Images and files | By content, so renaming and moving don't matter |
| Navigation | Files with content that no page shows |
| Addresses | Old addresses have a page or a redirect. Derived from the files by each platform's rules; addresses that can't be derived aren't checked |
| Redirects | Whether each old one still works |
| API | Every operation in the OpenAPI files |

The comparison says whether content is still there, not how it looks or reads. Have a person look through it before publishing.

## Options

<ParamField path="--check" type="string">Folder of the new project to compare with.</ParamField>
<ParamField path="--report" type="string">Write the report to a Markdown file.</ParamField>
<ParamField path="--base" type="string">Path the old site was served under, such as `/docs`.</ParamField>
<ParamField path="--ignore" type="string">Old pages left out on purpose; supports `*` and `**`, and can be repeated.</ParamField>
<ParamField path="--json" type="boolean">Machine-readable output. Without `--check`, the inventory of the old project.</ParamField>
