---
title: stx migrate
description: Migrate documentation from Mintlify, Docusaurus, GitBook, or ReadMe to Syntext.
icon: arrow-right
---

# stx migrate

Convert an existing documentation project to Syntext format. The migrator converts pages to Syntext MDX, generates a `syntext.json` config from your existing navigation, and produces a redirect map so old URLs keep working.

## Usage

```bash
stx migrate --from <platform> [options]
```

## Options

| Flag | Alias | Type | Default | Description |
|------|-------|------|---------|-------------|
| `--from <platform>` | | string | *(required)* | Source platform: `mintlify`, `docusaurus`, `gitbook`, `readme` |
| `--dir <dir>` | `-d` | string | `.` | Source docs directory |
| `--output <dir>` | `-o` | string | `docs` | Output directory |
| `--dry-run` | | boolean | `false` | Show what would be migrated without writing files |
| `--json` | | boolean | `false` | Output result as JSON |

## Examples

### Migrate from Mintlify

```bash
stx migrate --from mintlify
```

```
✔ Migration complete from mintlify

  Pages converted: 47
  Config generated: Yes
  Redirects:       12

  Redirect map saved to: docs/_redirects.json
```

### Preview First (Dry Run)

```bash
stx migrate --from docusaurus --dry-run
```

Reports the pages, config, and redirects that would be produced — without touching the filesystem.

### Custom Source and Output Directories

```bash
stx migrate --from gitbook --dir ./old-docs --output ./docs
```

## What Gets Converted

- **Pages** — MD/MDX files are rewritten to Syntext MDX, including component syntax where an equivalent exists
- **Config** — the source platform's navigation config (`mint.json`, `sidebars.js`, `SUMMARY.md`, etc.) becomes a `syntext.json`
- **Redirects** — URL structure changes are captured in `_redirects.json` so you can preserve inbound links

Warnings are printed for anything that needs manual attention (unsupported components, ambiguous navigation entries).

## After Migrating

```bash
stx check        # validate the converted content
stx dev          # preview locally
stx deploy       # publish
```

## Related

- [Migrate from Mintlify](/guides/migrate-from-mintlify) — step-by-step guide
- [Migrate from Docusaurus](/guides/migrate-from-docusaurus)
- [Migrate from ReadMe](/guides/migrate-from-readme)
- [stx check](/cli/check) — validate after migration
