Skip to content

Latest commit

 

History

History
300 lines (223 loc) · 6.43 KB

File metadata and controls

300 lines (223 loc) · 6.43 KB

🏃 rnr

Clone a repo. Run tasks. No setup required.

Build & Test Integration Tests License: MIT


✨ What is rnr?

rnr (pronounced "runner") is a cross-platform task runner that works instantly on any machine. No Node.js. No Python. No global installs. Just clone and go.

git clone your-repo
./rnr build    # It just works! 🎉

🤔 Why rnr?

Tool Requires
npm scripts Node.js installed
Makefile Make installed (painful on Windows)
Just Just installed
Task Task installed
rnr Nothing!

rnr binaries live inside your repo. Contributors clone and run—zero friction.


🚀 Quick Start

Initialize a Project (One-time setup by maintainer)

Linux:

curl -fsSL https://github.com/CodingWithCalvin/rnr.cli/releases/latest/download/rnr-linux-amd64 -o rnr
chmod +x rnr
./rnr init

macOS (Intel):

curl -fsSL https://github.com/CodingWithCalvin/rnr.cli/releases/latest/download/rnr-macos-amd64 -o rnr
chmod +x rnr
./rnr init

macOS (Apple Silicon):

curl -fsSL https://github.com/CodingWithCalvin/rnr.cli/releases/latest/download/rnr-macos-arm64 -o rnr
chmod +x rnr
./rnr init

Windows (PowerShell):

Invoke-WebRequest -Uri "https://github.com/CodingWithCalvin/rnr.cli/releases/latest/download/rnr-windows-amd64.exe" -OutFile "rnr.exe"
.\rnr.exe init

Platform Selection

During init, you'll choose which platforms your project should support:

Which platforms should this project support?

  [x] linux-amd64      (760 KB)
  [ ] macos-amd64      (662 KB)
  [x] macos-arm64      (608 KB)  <- current
  [x] windows-amd64    (584 KB)
  [ ] windows-arm64    (528 KB)

  Selected: 1.95 MB total

What Gets Created

your-repo/
├── .rnr/
│   ├── config.yaml    # Tracks configured platforms
│   └── bin/           # Platform binaries (only selected ones)
├── rnr                # Unix wrapper script (auto-detects platform)
├── rnr.cmd            # Windows wrapper script (auto-detects arch)
└── rnr.yaml           # Your task definitions

Run Tasks

./rnr build        # Run the 'build' task
./rnr test         # Run the 'test' task
./rnr --list       # See all available tasks

For Contributors

After cloning a repo with rnr configured:

git clone your-repo
./rnr build    # It just works! 🎉

No installs. No setup. The binaries are already in the repo.


📝 Task File Format

Tasks are defined in rnr.yaml at your project root.

Simple Commands (Shorthand)

build: cargo build --release
test: cargo test
lint: npm run lint

Full Task Definition

build:
  description: Build for production
  dir: src/backend           # Working directory
  env:
    NODE_ENV: production     # Environment variables
  cmd: npm run build

Sequential Steps

ci:
  description: Run CI pipeline
  steps:
    - task: lint
    - task: test
    - task: build

Parallel Execution

build-all:
  description: Build all services
  steps:
    - cmd: echo "Starting builds..."
    - parallel:
        - task: build-api
        - task: build-web
    - cmd: echo "✅ All done!"

Nested Task Files

Subdirectories can have their own rnr.yaml:

# Root rnr.yaml
api:build:
  dir: services/api
  task: build          # Runs 'build' from services/api/rnr.yaml

🛠️ Built-in Commands

Command Description
rnr <task> Run a task
rnr --list List available tasks
rnr --help Show help
rnr --version Show version
rnr init Initialize rnr in current directory
rnr upgrade Update rnr binaries to latest

📋 Complete Example

# rnr.yaml

# Simple commands
lint: cargo clippy
format: cargo fmt

# Full tasks
build:
  description: Build release binary
  env:
    RUST_LOG: info
  cmd: cargo build --release

test:
  description: Run all tests
  cmd: cargo test --all

# Multi-step workflow
ci:
  description: Full CI pipeline
  steps:
    - task: format
    - task: lint
    - task: test
    - task: build

# Parallel builds for monorepo
build-all:
  description: Build all services
  steps:
    - parallel:
        - dir: services/api
          cmd: cargo build --release
        - dir: services/web
          cmd: npm run build
    - cmd: echo "🎉 Build complete!"

# Deploy workflow
deploy:
  description: Deploy to production
  steps:
    - task: ci
    - cmd: ./scripts/deploy.sh

🌍 Platform Support

Platform Architecture Status
Linux x86_64
macOS x86_64
macOS ARM64 (Apple Silicon)
Windows x86_64
Windows ARM64

🔮 Roadmap

  • Task dependencies (depends: [build, test])
  • Conditional execution (if: ${{ env.CI }})
  • Watch mode (watch: [src/**/*.rs])
  • Variable interpolation (${{ vars.version }})
  • Caching / incremental builds
  • Interactive task picker

See DESIGN.md for the full roadmap.


🤝 Contributing

Contributions are welcome! Please read our contributing guidelines and submit PRs.

Development

# Clone the repo
git clone https://github.com/CodingWithCalvin/rnr.cli
cd rnr.cli

# Build
cargo build

# Run tests
cargo test

# Run locally
cargo run -- --help

👥 Contributors

CalvinAllen BradKnowles


📄 License

MIT License - see LICENSE for details.


Made with ❤️ by CodingWithCalvin