| Crates.io | raz-cli |
| lib.rs | raz-cli |
| version | 0.2.4 |
| created_at | 2025-07-02 21:38:51.061776+00 |
| updated_at | 2025-07-07 09:27:48.397252+00 |
| description | Universal command runner for Rust - Run any Rust file from anywhere with cursor-aware test targeting and override persistence |
| homepage | https://github.com/codeitlikemiley/raz |
| repository | https://github.com/codeitlikemiley/raz |
| max_upload_size | |
| id | 1735620 |
| size | 106,870 |
Universal command runner for Rust - Run any Rust file from anywhere with cursor-aware test targeting and override persistence.
cargo install raz-cli
# Run any Rust file
raz file.rs
# Run with cursor position for test targeting
raz file.rs:line:column
# Run with overrides
raz file.rs RUST_BACKTRACE=full --release -- --exact
# Save overrides for reuse
raz --save-override src/lib.rs:25:1 RUST_LOG=debug --quiet
# Run main function
raz src/main.rs
# Run specific test at line 25
raz src/lib.rs:25:1
# Run integration test
raz tests/integration.rs:40:5
# Environment variables (automatically detected)
raz file.rs RUST_BACKTRACE=1 RUST_LOG=debug
# Command options (passed to cargo/framework tools)
raz file.rs --release --features ssr
# Test arguments (passed after -- to test runner)
raz file.rs:25:1 -- --exact --nocapture
# Combined example
raz src/lib.rs:45:1 RUST_BACKTRACE=1 --release --platform web -- --test-threads 1
# Save command configuration for a specific test function
raz --save-override src/lib.rs:test_fn RUST_BACKTRACE=1 --exact
# Future runs automatically apply saved settings
raz src/lib.rs:test_fn # Uses saved RUST_BACKTRACE=1 --exact
#!/usr/bin/env -S cargo +nightly -ZscriptRAZ provides comprehensive override management with deferred save - overrides are only saved after successful execution.
# Save override (only saved after success)
raz --save-override src/lib.rs:test_fn RUST_BACKTRACE=1 --exact
# List and inspect
raz override list
raz override list --file src/main.rs
raz override inspect "src/main.rs:handle_request"
raz override stats
# Backup and recovery
raz override rollback
raz override export --output backup.toml
raz override import backup.toml
# Debug and management
raz override debug src/lib.rs 25 10
raz override delete src/lib.rs:test_fn
raz override clear [--force]
# Migration from legacy format
raz override migrate --auto
raz override migrate --file legacy.toml --dry-run
# Initialize project with template
raz init --template web # Leptos, Dioxus projects
raz init --template game # Bevy projects
raz init --template library # Library development
raz init --template desktop # Tauri, Egui projects
# Template management (planned features)
raz template list
raz template show my-framework
raz template validate .raz/templates/my-framework.toml
raz template init my-framework
raz template export --output my-project-template.toml
RAZ automatically detects and provides framework-specific commands:
# Leptos projects
raz src/app.rs # Runs leptos serve
# Tauri projects
raz src-tauri/src/main.rs # Runs tauri dev
# Bevy projects
raz src/main.rs # Runs with proper game features
For complete documentation, examples, and VS Code integration, visit the main RAZ repository.
For embedding RAZ functionality in your own applications, see the raz-core crate.