Skip to main content

RPR CLI -- React Python Rust monorepo scaffolding orchestrator

Project description

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 tool install -e .

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

Usage

🚀 Scaffolding & Generation

Scaffold a complete monorepo or add new apps and libraries.

rpr init my-app              # Scaffold a new monorepo (NX + UV)
rpr generate domain my-app   # Add a domain package (shared logic & types)
rpr generate api my-app      # Add a FastAPI application
rpr generate ui my-app       # Add a React UI library + application
rpr generate engine my-app   # Add a Rust/PyO3 computation engine
rpr generate storybook       # Add Storybook for UI component development

🧠 AI Instructions & Code Templates

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

rpr sync rules               # Sync AI instructions to Cursor, Copilot, Claude Code, and Gemini
rpr add template mapper_util # Add a common code template to your project
rpr add template --list      # List all available code templates

💬 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 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

⚙️ 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 generate api my-app --dry-run

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

# Build the Rust extension (rpr_parser) — required for rpr map acceleration
cd rpr-parser && uv run maturin develop && cd ..

Note: uv tool install dist/rpr-*.whl uses the root hatchling build backend and does not build the Rust extension. You must run maturin develop separately before using rpr map with the Rust backend. Without it, rpr map falls back to the pure-Python implementation automatically.

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 (rpr_parser 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 Rust extension hasn't been built yet — 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. Add a repository secret named PYPI_API_TOKEN with an API token that can upload that project.

Release flow:

# update src/rpr/__init__.py with the new version
git commit -am "Release 0.1.2"
git tag v0.1.2
git push origin main --tags

The workflow in .github/workflows/publish-pypi.yml builds the sdist and wheel, checks that the tag matches the package version, and uploads dist/* to PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rpr_cli-0.1.1.tar.gz (307.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rpr_cli-0.1.1-py3-none-any.whl (157.9 kB view details)

Uploaded Python 3

File details

Details for the file rpr_cli-0.1.1.tar.gz.

File metadata

  • Download URL: rpr_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 307.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rpr_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a981f69b0bfa300876106839c3395653c1619580ddf8a53c1324399a979eb1ab
MD5 14ea91bba0f4c8f4387890dd7bd3e669
BLAKE2b-256 f43925932ed08273eb2bc4559ecc38246a23ac81bc6927177453cf342a1e5225

See more details on using hashes here.

File details

Details for the file rpr_cli-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: rpr_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 157.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rpr_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1c22dadf5e48720e70d6d66efd1d75ce5f5965df437ad1a5284b521dab2ce4e8
MD5 be450fcbe0f43ac03fe4ecd531bd60a6
BLAKE2b-256 a6ef4b38dd07dd1db8ebadfeb516fad06cdd1805bf6958d37c658deb9cba53e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page