Skip to main content

RPR CLI

React Python Rust monorepo scaffolding orchestrator.

Installation

Published package name: rpr-cli

Once published to PyPI, install by name with either:

uv add rpr-cli
uv tool install rpr-cli

Both install the rpr command.

For development, editable install is fine:

uv sync
uv run maturin develop

For an actual distributable install you can use in other projects, build the wheel first and install the built artifact:

uv build
uv tool install dist/rpr_cli-*.whl

From another local project you can also install the built artifact directly:

uv add ../project-getting-started/dist/rpr_cli-*.whl

The published wheels are mixed Python/Rust distributions. The rpr._native binding used by rpr rename and accelerated rpr map is installed alongside the Python package; no separate parser installation is required.

Usage

🚀 Scaffolding & Generation

Create a new NX + UV monorepo, then add apps and packages as needed.

NX monorepo uses integrated mode.

rpr init my-app              # Create/init my-app with root NX + UV tooling and AI instructions
cd my-app
rpr generate domain my-app   # Add a Python domain package
rpr generate api my-app      # Add a FastAPI application
rpr generate ui my-app       # Add a React UI library and web app
rpr generate web landing     # Add another web app; asks whether to depend on the UI library
rpr generate engine my-app   # Add a Rust/PyO3 computation engine
rpr generate storybook       # Add Storybook for UI component development
rpr rename new-app           # Rename the workspace identity and references

Run rpr rename <new-name> from an initialized workspace root to update RPR metadata, package and Nx project names, imports, commands, paths, lockfiles, and matching references in user-added text files. The command shows its complete change plan before asking for confirmation. Use --dry-run to preview without writing or --yes to skip the prompt. On its first invocation, rename creates a .rename-ignore file and stops so you can review the generated dependency, environment, cache, and build-output exclusions before rerunning. The file uses gitignore-style patterns and is independent of .gitignore, allowing ignored source and experiments to remain in rename scope. Binary contents, VCS data, and symlink targets are never changed. The outer workspace directory keeps its existing name.

After applying the rename, RPR synchronizes Node and Python dependencies and runs uncached Nx build, Rust-engine build, and typecheck targets with the Nx daemon disabled. This verifies the renamed project graph and commands without deleting the existing Nx cache. Pass --skip-verify to omit these checks; a dry run previews them without executing anything. If verification fails, the rename remains applied and RPR prints the command to retry.

The success output includes a guarded command for optionally renaming the outer workspace directory. Git remotes and hosted repository names are never changed. When a hosted repository still matches the old project name, rename it through the hosting provider if desired and then update its local URL with git remote set-url. Local and remote branch names are unaffected.

rpr init <project-name> creates the project directory when it does not exist. If the directory already exists and is not an NX workspace, RPR initializes Git and runs nx init inside that directory.

By default, rpr init scaffolds the root workspace and AI instructions only. To create project components during initialization, repeat --scaffold or pass a comma-separated list:

rpr init todo-list --scaffold common
rpr init todo-list --scaffold domain
rpr init todo-list --scaffold api --domain-migrations
rpr init todo-list --scaffold api --scaffold web --domain-migrations

Available scaffolds are:

  • common: Alias for instructions, domain, api, ui, web, and storybook; excludes engine.
  • instructions: AI instruction files for Cursor, Copilot, Claude Code, Gemini, and Codex.
  • domain: Python DDD package at packages/python/domain.
  • api: FastAPI app at apps/<name>-api; also scaffolds domain.
  • ui: React UI library at packages/node/<name>-ui.
  • web: React web app at apps/<name>-web; also scaffolds ui.
  • storybook: Storybook host package; requires or scaffolds ui.
  • engine: Rust/PyO3 package at packages/python/<name>-engine.

Dependency Placement

RPR keeps Python dependencies close to the package that uses them and Node dependencies at the workspace root.

  • Root Python tooling such as Ruff, pytest, pyright, pre-commit, and maturin lives in the root pyproject.toml.
  • Domain runtime dependencies such as sqlmodel, asyncpg, pydantic-settings, and optional alembic are added to packages/python/domain/pyproject.toml.
  • API runtime dependencies such as fastapi, uvicorn, and the workspace domain package are added to apps/<name>-api/pyproject.toml.
  • Node dependencies are declared and installed only in the root package.json, so every app and package shares one version of each. Package-level package.json files carry metadata and workspace links such as @my-app/ui. Generators install only the dependencies the root does not already declare, so adding another app never bumps existing versions.

rpr generate web <name> adds another web app (for example a landing page) at apps/<name>-web. When a UI library exists it asks whether to add the library as a dependency (--link-ui / --no-link-ui skip the prompt); linked apps get a starter page in the library's src/pages/, and unlinked apps are fully standalone. Each web app gets its own dev-server port (3000, 3001, ...), so npx nx serve <name>-web runs alongside the others. The generated workspace requires Node 24 LTS or newer.

Python dependency changes are made with uv so they are tracked in pyproject.toml. Node dependency changes are made from the root with npm install.

Update project-owned package manifests from upstream registries with rpr update node or rpr update python. Node updates target package.json; Python updates target pyproject.toml by default and fall back to requirements.txt when no pyproject.toml exists. Use --file to update a nested manifest, --dry-run to preview without changing files or running installers, and --include-major to opt into major-version updates.

The scaffold version manifest that powers generated dependency specs and the synced AI tech-stack overview lives in src/rpr/dependency_manifest_data.py. Refresh it from upstream registries with rpr refresh manifest when you want the repo-owned defaults to move forward.

🧠 AI Instructions & Code Templates

Sync project context to your favorite AI tools and add common code patterns.

rpr sync rules                         # Sync AI instructions to all supported coding agents
rpr sync rules --target claude         # Sync only Claude
rpr sync rules -t claude -t codex      # Sync Claude and Codex
rpr add template python mapper_util    # Add a Python code template to your project
rpr add template python camel_case_model
rpr add template node sticky_navigation --include-tests
rpr add template node -l               # List available Node/TSX templates
rpr add template --list                # List all available code templates

Use --output-dir to write generated files to a different directory while keeping the template filenames. Templates with test companions can use --include-tests; Node browser-test templates print the extra npm dev dependencies and any Playwright setup notes they need. Existing config files such as vitest.config.ts are not merged automatically; RPR leaves them unchanged unless you rerun with --force to replace them.

💬 Interactive Shell

rpr chat is the primary interactive shell for the product. It runs a Rich-based session with slash commands for both chat controls and existing CLI workflows.

rpr chat                                 # Start the interactive shell
rpr chat --approval-mode auto-readonly   # Override the session approval mode

Inside the shell:

/help        List supported slash commands
/settings    Inspect and update persisted settings in-shell
/init        Run workspace bootstrap from chat
/generate    Run scaffolding commands from chat
/sync        Sync AI instructions from chat
/add         Add a registered template from chat
/check       Run workspace health checks from chat
/map         Generate a code map from chat
/exit        End the session

There is no separate --tui mode. The unified shell is the default chat experience.

🛠️ Maintenance & Insights

Keep your project healthy and explore its structure.

rpr refresh manifest         # Refresh the scaffold dependency manifest from npm, PyPI, and crates.io
rpr update node              # Update package.json dependencies and run npm install
rpr update python            # Update pyproject.toml or requirements.txt and sync Python dependencies
rpr check                    # Inspect project health and report setup status
rpr map                      # Generate a structured code map of your project
rpr settings                 # Inspect persisted shell settings
rpr settings set theme ocean # Update the terminal theme
rpr settings set approval_mode auto-all
rpr settings set startup_help false

Persisted settings currently include:

  • theme: Rich console theme
  • approval_mode: default chat approval mode (ask, auto-readonly, auto-all)
  • startup_help: whether chat shows slash-command guidance on startup

rpr refresh manifest is a repo-maintenance command. It rewrites src/rpr/dependency_manifest_data.py, which feeds scaffold dependency versions in rpr generate ... and the versioned overview text produced by rpr sync rules. Use --dry-run to preview the manifest rewrite without writing the file.

rpr update node and rpr update python are project-maintenance commands. They update the selected package manifest, print applied and held-back dependency changes, and run the matching installer only when live changes are written. Without --include-major, RPR chooses the latest stable version inside the current major version and reports higher-major candidates as held back. Python updates cover [project].dependencies, [dependency-groups].*, and requirements.txt; build backend packages in [build-system].requires are left unchanged unless a future explicit build-system update option is added.

⚙️ Common Flags

Most commands support these global flags:

  • --dry-run: Preview changes without writing any files.
  • --help: Show detailed help for any command or subcommand.

Example:

rpr init my-app --scaffold domain --dry-run
rpr generate api my-app --dry-run

Dry runs print the commands RPR would execute, the files/directories it would create or update, and the package dependencies it would add with their target scope.

The check command also supports:

  • --json: Output machine-readable JSON for CI/CD integration.

The chat command also supports:

  • --provider: Override the AI provider. The mock provider is the only supported provider today.
  • --model: Override the active model name.
  • --approval-mode: Override the session approval mode without changing persisted settings.

Project Development

Setup

# Install Python dependencies
uv sync

# Rebuild the bundled Rust extension after native code changes
uv run maturin develop

Note: uv tool install rpr-cli installs the matching platform wheel with the Rust binding included. Building from a source checkout requires a Rust toolchain because Maturin compiles the same native module locally.

Running Tests

# Full test suite (Python)
uv run pytest

# Single test file
uv run pytest tests/test_map_extractor.py

# Single test
uv run pytest tests/test_map_extractor.py::test_fallback_returns_correct_shape

# Rust unit tests (bundled native crate)
cd rpr-parser && cargo test && cd ..

# Lint and format
uv run ruff check .
uv run ruff format .

The Rust-path tests in tests/test_map_extractor.py are automatically skipped if the bundled extension has not been built yet — run uv run maturin develop first to enable them.

Publishing To PyPI

This repo is set up to publish the package rpr-cli to PyPI from GitHub Actions.

One-time setup:

  1. Create the PyPI project rpr-cli.
  2. Create a PyPI Trusted Publisher for this repository using workflow .github/workflows/publish-pypi.yml and environment pypi.

No PYPI_API_TOKEN secret is required when publishing through GitHub Actions OIDC.

Release flow:

rpr version bump patch             # updates Python, Cargo.toml, and Cargo.lock
# Or repair/set an explicit version: rpr version set 0.3.9
git add src/rpr/__init__.py rpr-parser/Cargo.toml rpr-parser/Cargo.lock
git commit -m "Release 0.3.9"
git tag v0.3.9
git push origin main --tags

The workflow in .github/workflows/publish-pypi.yml checks both version declarations against the tag, builds an sdist plus native wheels for Linux x86-64/AArch64, Windows x86-64, and macOS x86-64/Apple Silicon, then publishes all artifacts to PyPI.

Metadata

Release files for rpr-cli 0.3.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rpr-cli 0.3.12
File Size Uploaded Provenance Actions
rpr_cli-0.3.12.tar.gz 327.4 kB With provenance Details for rpr_cli-0.3.12.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for rpr-cli 0.3.12
File Actions
rpr_cli-0.3.12-cp314-abi3-win_amd64.whl CPython 3.14 abi3 Windows x86-64 Details for rpr_cli-0.3.12-cp314-abi3-win_amd64.whl
rpr_cli-0.3.12-cp314-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.14 abi3 Linux glibc 2.17+ x86-64 Details for rpr_cli-0.3.12-cp314-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
rpr_cli-0.3.12-cp314-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.14 abi3 Linux glibc 2.17+ ARM64 Details for rpr_cli-0.3.12-cp314-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
rpr_cli-0.3.12-cp314-abi3-macosx_11_0_arm64.whl CPython 3.14 abi3 macOS 11.0+ ARM64 Details for rpr_cli-0.3.12-cp314-abi3-macosx_11_0_arm64.whl
rpr_cli-0.3.12-cp314-abi3-macosx_10_12_x86_64.whl CPython 3.14 abi3 macOS 10.12+ x86-64 Details for rpr_cli-0.3.12-cp314-abi3-macosx_10_12_x86_64.whl

Total release size: 20.0 MB

Release files / rpr_cli-0.3.12.tar.gz

Download URL rpr_cli-0.3.12.tar.gz
Size 327.4 kB
Tags Source
SHA-256 checksum
How to use checksums
427bf086a46f25f42450a7b87c9cc00dc7230559d7b841c68244af33dac743de
BLAKE2b-256 checksum
How to use checksums
57726be76ad817bf38a54c3751c2633448b3581c72336f98f0595d3ca9a7b846
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 Oct 7, 2026.

Transparency log

Release files / rpr_cli-0.3.12-cp314-abi3-win_amd64.whl

Download URL rpr_cli-0.3.12-cp314-abi3-win_amd64.whl
Size 4.0 MB
Tags CPython 3.14 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
08082b1088bad113358bba385c18e56469c206413cf15f5903121ec337ead6c1
BLAKE2b-256 checksum
How to use checksums
bf77ed3669a0578091e2d946ef39226f008b6437acaa0f6548482d5e353897b9
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 Oct 7, 2026.

Transparency log

Release files / rpr_cli-0.3.12-cp314-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL rpr_cli-0.3.12-cp314-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.1 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
72f7805b34547e3491bd3e22d0c6c1b0535facff9586e1ae4db150a91bc5a7a5
BLAKE2b-256 checksum
How to use checksums
7b55c25060a27f514304e0bc75a004c4790bbf841cf0d25674fef8f668e4fa7d
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 Oct 7, 2026.

Transparency log

Release files / rpr_cli-0.3.12-cp314-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL rpr_cli-0.3.12-cp314-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 3.8 MB
Tags CPython 3.14 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
4c20969db8df0fca02cc51a40f174fa5899e793c878fbc847489f4bfb8fa4f31
BLAKE2b-256 checksum
How to use checksums
3ba9b50ab56c935fc795dd1dc570bd9afcb6e021f95b3f9749dc314252446226
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 Oct 7, 2026.

Transparency log

Release files / rpr_cli-0.3.12-cp314-abi3-macosx_11_0_arm64.whl

Download URL rpr_cli-0.3.12-cp314-abi3-macosx_11_0_arm64.whl
Size 3.8 MB
Tags CPython 3.14 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e748f4dbb73e59b123ab2f0733f9cf6b6ff44f1b5157d0785f3382f2001d495f
BLAKE2b-256 checksum
How to use checksums
9dca0defe3ce0c0af1488e199d61f0fd1358be9bfe0c42c05440f81dfba311e5
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 Oct 7, 2026.

Transparency log

Release files / rpr_cli-0.3.12-cp314-abi3-macosx_10_12_x86_64.whl

Download URL rpr_cli-0.3.12-cp314-abi3-macosx_10_12_x86_64.whl
Size 4.0 MB
Tags CPython 3.14 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
bdddb2a5c958b3c2b751c3d18e2de58cfb013041aef49acb9bf3db04a9ec647c
BLAKE2b-256 checksum
How to use checksums
597df3ae315ec1d54aea4de6a18ed7533ef7a750b7effe78fb347764a6a85a81
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 Oct 7, 2026.

Transparency log

Security for rpr-cli 0.3.12

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.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for rpr_cli-0.3.12.tar.gz

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 Oct 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.12 This release

6 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page