Skip to content

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.

Notifications You must be signed in to change notification settings

CodingWithCalvin/rnr.cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿƒ 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


๐Ÿ“„ License

MIT License - see LICENSE for details.


Made with โค๏ธ by CodingWithCalvin

About

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.

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

Languages