rejox
AI-assisted migration from React (web) to React Native. Rejox resolves by
rules whatever rules can resolve, and invokes AI only where genuine reasoning
is required — at most one LLM call per migration. It builds a knowledge
graph of a React project, scores its migratability, plans the work, performs
the migration with deterministic AST transforms, validates the output with the
real toolchain (tsc + Metro), and hands back a working React Native project.
See the project repository for the full
docs, architecture notes and the web app. This README covers the rejox CLI
as distributed on PyPI.
Install
uvx rejox migrate ./my-react-app # try it without installing
pip install rejox # or install the CLI
Requirements: Python 3.11+, and Node 20+ on PATH (the deterministic
parser/codemod workers run in Node; npm is needed only if you're building
from an sdist rather than a prebuilt wheel).
pip install rejox installs the CLI only. The web service (FastAPI, job
queue) is a separate extra:
pip install "rejox[server]"
Usage
rejox doctor # checks Node 20+, npm and the worker bundles
rejox migrate ./my-react-app
rejox migrate <project-path> [--out <dir>] [--force] [--yes] [--no-validate] [--json]
| Flag | Meaning |
|---|---|
--out <dir> |
Where to write the React Native project (default: ./<project>-native). |
--force |
Write into --out even if it is not empty (files already there are kept). |
--yes, -y, --no-input |
Accept every recommended answer without prompting. Implied when stdin is not a terminal. |
--no-validate |
Skip the tsc + Metro validation stage (fast). |
--json |
Print a machine-readable summary on stdout (progress goes to stderr). Implies --no-input. |
rejox --version prints the version; rejox --debug migrate … shows the full
traceback if Rejox itself fails.
Exit codes — stable, for scripts and CI:
| Code | Meaning |
|---|---|
0 |
Migrated; validation passed (or was skipped with --no-validate). |
1 |
Migrated, but validation (tsc / Metro) failed. |
2 |
Usage error (bad flag, missing project, non-empty --out without --force). |
3 |
Environment: Node 20+, npm or a worker bundle is missing — run rejox doctor. |
4 |
Input refused: the project has no React components to migrate. |
70 |
Internal error in Rejox; re-run with --debug for the traceback. |
AI is optional
Rejox makes at most one LLM call per migration — the navigator shape decision, the one genuine design judgment. Everything else is deterministic.
GEMINI_API_KEY=…→ the real provider (Gemini, viagoogle-genai) makes that one call.REJOX_AI_PROVIDER=fake→ an offline provider makes it deterministically (no network), useful for demos and CI.- Neither set → AI disabled: the navigator defaults to a stack and the rest of the pipeline is unchanged. Rejox is fully usable with zero AI.
If a build fails validation, a repair loop may send the offending line and
its compiler/bundler diagnostic to the LLM (never the whole file), capped at
two rounds. Your source code is never uploaded anywhere except in that one
line-level repair prompt, and only when a GEMINI_API_KEY is set.
Where rejox writes
Nothing is written inside the install directory. Run workspaces and the AI
response cache live in $XDG_CACHE_HOME/rejox (~/.cache/rejox by default),
overridable with REJOX_WORKSPACE_ROOT and REJOX_AI_CACHE.
Platforms
Linux and macOS. Windows is not supported yet.
License
FSL-1.1-ALv2 —
free to use; converts to Apache-2.0 two years after each version's release.
See CHANGELOG.md for release history.
Release files for rejox 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rejox-0.1.1.tar.gz | 244.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rejox-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.4 MB
Release files / rejox-0.1.1.tar.gz
| Download URL | rejox-0.1.1.tar.gz |
|---|---|
| Size | 244.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c723ab9b7b6e407bbf0171f04fa72208accccbdad6bbb33a1d35b114de364bb9
|
|
BLAKE2b-256 checksum How to use checksums |
85a43d695ac9ececce3b70e0d001803c80311e0f7ef81c92c8a168ea38d25590
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency logRelease files / rejox-0.1.1-py3-none-any.whl
| Download URL | rejox-0.1.1-py3-none-any.whl |
|---|---|
| Size | 3.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1e270fb20730ec9003043eb5092c66520255ec36cb53511717fb54cebada9afc
|
|
BLAKE2b-256 checksum How to use checksums |
e3a18b560a679a809b651b1e29bd18a9ec92feb7b131e7de7de28a87a0d9bea8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 26, 2026.
Transparency log