Getting started
Install
Use the CLI directly from npm:
bash
pnpm dlx @omnimod/cli run <plugin> "src/**/*.tsx"For local development, run it from a checkout:
bash
git clone https://github.com/salnika/omnimod
cd omnimod
pnpm install
vp run -r buildRun a codemod
The CLI is dry-run by default — it prints a colored diff and writes nothing. Add --write to apply.
bash
# Dry-run: preview the changes
omnimod run styled-to-vanilla-extract "src/**/*.{tsx,jsx}"
# Apply, then format with your project's formatter
omnimod run styled-to-vanilla-extract "src/**/*.{tsx,jsx}" --writeFrom a checkout (no global install), invoke the built binary directly:
bash
node /path/to/omnimod/packages/cli/dist/index.mjs \
run styled-to-vanilla-extract "src/**/*.tsx" --cwd /path/to/your/projectRecommended workflow
The tool is designed to never emit broken code, but always review:
- Work on a throwaway branch in the target project.
- Dry-run first, read the diff and the diagnostics.
--write, thengit diffbefore committing.- If anything couldn't be fully converted, the run writes a
MIGRATION.md— follow it (or hand it to an AI agent) to finish.
See the CLI reference for all flags, and Authoring a plugin to build your own.
