Import reference
docslit import converts a Mintlify, Fern, GitBook or MkDocs project into a DocsLit project. This page is the reference for the command: its flags, how it picks a format, the report it writes and the limits you should plan for. For a walkthrough, start with the guide for your platform: Mintlify, Fern, GitBook or MkDocs.
Flags
| Flag | What it does |
|---|---|
--out <dir> |
The output directory. The default is <source-dir>-docslit. It is never the source folder, and it is refused when it is not empty unless you pass --force. |
--from <mintlify\|fern\|gitbook\|mkdocs> |
Skip detection and treat the source as this format. Any other value exits with an error. |
--dry-run |
Convert and report everything without writing files. |
--theme <name> |
The built-in theme or palette to apply, plus your brand colors. The default is peppermint for Mintlify, frond for Fern and folio for GitBook. An unknown name gets a warning with the nearest match, and the default theme is used. See Themes. |
--no-theme |
Do not select a built-in theme. Brand colors are still applied. |
--versions <tabs\|latest> |
How to treat versioned navigation: one tab per version, which is the default, or only the default version. |
--force |
Overwrite a non-empty output directory. |
--json |
Print the migration report as JSON instead of text. |
The source folder is never modified, and the output is deterministic, so re-running an import with the same input regenerates the same files.
How the format is detected
Point the command at the folder that holds the project config. DocsLit checks, in order:
| Format | Detected by |
|---|---|
| Mintlify | docs.json, or the legacy mint.json |
| Fern | fern/docs.yml, in the folder you pass, or in the fern/ folder you pass |
| GitBook | SUMMARY.md or .gitbook.yaml, including its root setting |
| MkDocs, Material for MkDocs, Zensical | mkdocs.yml, mkdocs.yaml or zensical.toml |
| Markdown folder | None of the above. Every .md and .mdx file is imported with an automatic sidebar. |
The detection is printed at the start of the run, for example Detected: Mintlify (docs.json).
What the output looks like
The migration report
Every run prints a summary. This is the real output of importing the Mintlify fixture that ships with the DocsLit CLI:
The same data is written to MIGRATION.md in the output, grouped as Must fix (errors), Review (warnings) and For your information (notes), followed by tables of the components converted and the config keys mapped or not converted. Each item in it has this shape:
An unknown or custom component is never silently dropped. It stays in the page inside a warning callout titled "Unconverted component", so you can find it and replace it. Delete MIGRATION.md when you have worked through it.
Severity and exit codes
| Severity | Meaning |
|---|---|
| Error | Content that could not be converted and was replaced by a placeholder. Fix these first. |
| Warning | A conversion that probably needs a look, or a setting that was skipped. |
| Info | A note, such as a key that has no equivalent. |
After converting, the importer runs docslit validate on the result and reports the numbers. The command exits with code 1 when that validation finds errors, and with 0 otherwise, even when the report contains conversion errors. An invalid --from or --versions value, or a non-empty output without --force, also exits with 1.
JSON report
--json prints the report as one JSON document, for agents and CI. With --dry-run it also describes what would be written:
severity, a stable code, the file and line it came from (null for config), the component involved, a message, action (what the importer did instead) and fix (what you should do).mapped lists the source config keys and where they went. unmapped lists the keys with no equivalent and why.docslit validate on the converted project.Work through items in order, then run docslit validate --strict and docslit lint.
Issue codes
| Code | Meaning | What to do |
|---|---|---|
unknown-component, custom-component |
A React or JSX component that cannot run on a static site | Replace the "Unconverted component" callout with Markdown, a reusable snippet or a custom component |
component-prop-dropped, component-value-dropped, component-prop-dynamic |
A prop or value has no DocsLit equivalent, or is computed | Usually nothing. Check how the page looks. |
mintlify-panel |
A right-rail Panel became a floating wc-aside |
Check where it sits |
fern-api-snippet, fern-runnable-endpoint |
An API snippet component that renders from the Fern definition | Link to the generated API page, or paste an example |
fern-codeblock-links, fern-if-products, fern-tab-language-sync |
A Fern feature with a different shape in DocsLit | Read the message for the fix |
code-src-downloaded, code-src-url |
A Fern <Code src> URL was downloaded at import time, or could not be |
Keep a copy in sync, or download the file into snippets/ and use file= |
redirect-invalid |
A redirect that DocsLit's rules reject, such as a destination that uses a capture the source doesn't have | Add one explicit entry per path under redirects |
integration-unsupported, fern-js, css-missing |
An analytics provider, script or stylesheet with no preset | Paste the vendor snippet into head |
nav-versions |
Versions were converted to tabs or the default version only | Optionally move each version to a branch. See Versioning. |
nav-languages |
Only the first language was converted | Move each language into docs.<locale>/. See Internationalization. |
nav-products, nav-flattened, nav-tab-empty, nav-page-missing |
Navigation that was reshaped, or a page that could not be found | Read the message |
auth-content-dropped |
Content gated by login, roles or groups was removed | Move it to a public page if it should be visible |
openapi-multiple, openapi-remote, fern-definition, fern-spec-unsupported, fern-api-no-spec |
An API spec that cannot be wired up | Merge specs, download remote specs, or export OpenAPI. See OpenAPI integration. |
snippet-exports, snippet-prop-dynamic, export-dropped, global-variable |
Exported constants or props in a snippet | Define the values under attributes in docslit.json. See Variables and precedence. |
contextual-unsupported, config-unmapped |
A contextual menu option or config key with no equivalent | Informational |
frontmatter-dropped, frontmatter-lenient |
A page key with no equivalent, or frontmatter that needed repair | Check the page |
mdx-parse-error, legacy-conversion, yaml-invalid |
A page or file that is not valid MDX or YAML | Fix the source, or review the converted page by hand |
broken-link, missing-asset |
A link or image target that is not in the project | Point it at a real page, or add the file |
gitbook-openapi, gitbook-tag-unsupported |
A GitBook block that has no equivalent | Read the message |
Known limits
- Files outside the source project are never copied. An image,
logo,favicon,<Code src>or snippet path that resolves outside the project, including through a symbolic link, is reported as a missing asset. - Repository files are not imported as pages. A Mintlify import skips
README.md,CHANGELOG.md,LICENSE.md,CONTRIBUTING.md,CODE_OF_CONDUCT.md,AGENTS.md,CLAUDE.md,GEMINI.mdandSECURITY.md. - Versions become tabs. DocsLit versions are git branches. See Versioning.
- Languages. Only the first language is converted. See Internationalization.
- Pattern redirects are carried over, in the array form when needed. Rules that DocsLit rejects are skipped and reported as
redirect-invalid. - Custom JavaScript and custom React components are reported, never converted.
- API snippet components from Fern are replaced by pointers to the API reference.
- Login, role and group content is removed.
- One OpenAPI spec per project is wired up.
Convert one page at a time
The MCP tool convert_mdx runs the same converter on a single page or snippet. See Migrate with your AI agent.
Next steps
- See every converted component in the component mapping
- Let an agent work through the report with Migrate with your AI agent