> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# Migrate to Rstack CLI

To migrate an existing project, we recommend using the `migrate-to-rstack-cli` Skill. It inspects the repository and migrates the Rstack toolchain, Prettier, Husky, and other supported tools to Rstack CLI.

## Use the migration skill

### Migrate in one pass

To migrate all supported tools in one pass, send this prompt to your coding agent:

```text wrapCode
Run `npx --yes skills@latest use rstackjs/rstack-cli@migrate-to-rstack-cli` and follow the generated Skill instructions to migrate this project to Rstack CLI.
```

### Migrate in stages

If you want to keep each set of changes small and easy to review, migrate one tool at a time. Start by installing the Skill in your repository:

```bash
npx skills add rstackjs/rstack-cli --skill migrate-to-rstack-cli
```

Then ask your coding agent to migrate a single tool. For example, start with Rslint:

```text wrapCode
Use the migrate-to-rstack-cli Skill to migrate Rslint to Rstack CLI, leaving all other tools unchanged.
```

Once you have reviewed and validated the changes, move on to Rstest:

```text wrapCode
Use the migrate-to-rstack-cli Skill to migrate Rstest to Rstack CLI, leaving all other tools unchanged.
```

Repeat this process for each remaining tool.

## Supported tools

The Skill can directly migrate the following standalone tools:

- **Rstack toolchain:** [Rsbuild](https://rsbuild.rs/), [Rslib](https://rslib.rs/), [Rstest](https://rstest.rs/), [Rslint](https://rslint.rs/), and [Rspress](https://rspress.rs/)
- **Code formatting:** [Prettier](https://github.com/prettier/prettier)
- **Staged-file tasks:** [lint-staged](https://github.com/lint-staged/lint-staged) and [nano-staged](https://github.com/usmanyunusov/nano-staged)
- **Git hooks:** [Husky](https://github.com/typicode/husky) and [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks)

## Unsupported tools

The Skill does not directly migrate tools outside the list above. If your project uses any of the following tools, migrate it to the corresponding Rstack tool first, then run the `migrate-to-rstack-cli` Skill:

- **Application builds:** Follow the Rsbuild [webpack migration guide](https://rsbuild.rs/guide/migration/webpack), [Vite migration guide](https://rsbuild.rs/guide/migration/vite), [Create React App migration guide](https://rsbuild.rs/guide/migration/cra), or [Vue CLI migration guide](https://rsbuild.rs/guide/migration/vue-cli) to migrate the project to Rsbuild.
- **Library builds:** Follow the Rslib [tsup migration guide](https://rslib.rs/guide/migration/tsup) or [tsc migration guide](https://rslib.rs/guide/migration/tsc) to migrate the library to Rslib.
- **Testing:** Follow the Rstest [Jest migration guide](https://rstest.rs/guide/migration/jest) or [Vitest migration guide](https://rstest.rs/guide/migration/vitest) to migrate the project to Rstest.
- **Linting:** Follow the [Rslint getting started guide](https://rslint.rs/guide/) to migrate ESLint or other linters to Rslint.
