Skip to content

Commit b5e132f

Browse files
authored
docs: add README with features, examples, and roadmap (#32)
1 parent f8f18c6 commit b5e132f

1 file changed

Lines changed: 252 additions & 0 deletions

File tree

README.md

Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,252 @@
1+
# 🏃 rnr
2+
3+
**Clone a repo. Run tasks. No setup required.**
4+
5+
[![Build & Test](https://github.com/CodingWithCalvin/rnr.cli/actions/workflows/build.yml/badge.svg)](https://github.com/CodingWithCalvin/rnr.cli/actions/workflows/build.yml)
6+
[![Integration Tests](https://github.com/CodingWithCalvin/rnr.cli/actions/workflows/integration-test.yml/badge.svg)](https://github.com/CodingWithCalvin/rnr.cli/actions/workflows/integration-test.yml)
7+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8+
9+
---
10+
11+
## ✨ What is rnr?
12+
13+
**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.
14+
15+
```bash
16+
git clone your-repo
17+
./rnr build # It just works! 🎉
18+
```
19+
20+
### 🤔 Why rnr?
21+
22+
| Tool | Requires |
23+
|------|----------|
24+
| npm scripts | Node.js installed |
25+
| Makefile | Make installed (painful on Windows) |
26+
| Just | Just installed |
27+
| Task | Task installed |
28+
| **rnr** | **Nothing!**|
29+
30+
rnr binaries live **inside your repo**. Contributors clone and run—zero friction.
31+
32+
---
33+
34+
## 🚀 Quick Start
35+
36+
### Initialize a Project
37+
38+
```bash
39+
# Download and run init (one-time setup by maintainer)
40+
curl -sSL https://rnr.dev/rnr -o rnr && chmod +x rnr && ./rnr init
41+
```
42+
43+
This creates:
44+
```
45+
your-repo/
46+
├── .rnr/bin/ # Platform binaries (Linux, macOS, Windows)
47+
├── rnr # Unix wrapper script
48+
├── rnr.cmd # Windows wrapper script
49+
└── rnr.yaml # Your task definitions
50+
```
51+
52+
### Run Tasks
53+
54+
```bash
55+
./rnr build # Run the 'build' task
56+
./rnr test # Run the 'test' task
57+
./rnr --list # See all available tasks
58+
```
59+
60+
---
61+
62+
## 📝 Task File Format
63+
64+
Tasks are defined in `rnr.yaml` at your project root.
65+
66+
### Simple Commands (Shorthand)
67+
68+
```yaml
69+
build: cargo build --release
70+
test: cargo test
71+
lint: npm run lint
72+
```
73+
74+
### Full Task Definition
75+
76+
```yaml
77+
build:
78+
description: Build for production
79+
dir: src/backend # Working directory
80+
env:
81+
NODE_ENV: production # Environment variables
82+
cmd: npm run build
83+
```
84+
85+
### Sequential Steps
86+
87+
```yaml
88+
ci:
89+
description: Run CI pipeline
90+
steps:
91+
- task: lint
92+
- task: test
93+
- task: build
94+
```
95+
96+
### Parallel Execution
97+
98+
```yaml
99+
build-all:
100+
description: Build all services
101+
steps:
102+
- cmd: echo "Starting builds..."
103+
- parallel:
104+
- task: build-api
105+
- task: build-web
106+
- cmd: echo "✅ All done!"
107+
```
108+
109+
### Nested Task Files
110+
111+
Subdirectories can have their own `rnr.yaml`:
112+
113+
```yaml
114+
# Root rnr.yaml
115+
api:build:
116+
dir: services/api
117+
task: build # Runs 'build' from services/api/rnr.yaml
118+
```
119+
120+
---
121+
122+
## 🛠️ Built-in Commands
123+
124+
| Command | Description |
125+
|---------|-------------|
126+
| `rnr <task>` | Run a task |
127+
| `rnr --list` | List available tasks |
128+
| `rnr --help` | Show help |
129+
| `rnr --version` | Show version |
130+
| `rnr init` | Initialize rnr in current directory |
131+
| `rnr upgrade` | Update rnr binaries to latest |
132+
133+
---
134+
135+
## 📋 Complete Example
136+
137+
```yaml
138+
# rnr.yaml
139+
140+
# Simple commands
141+
lint: cargo clippy
142+
format: cargo fmt
143+
144+
# Full tasks
145+
build:
146+
description: Build release binary
147+
env:
148+
RUST_LOG: info
149+
cmd: cargo build --release
150+
151+
test:
152+
description: Run all tests
153+
cmd: cargo test --all
154+
155+
# Multi-step workflow
156+
ci:
157+
description: Full CI pipeline
158+
steps:
159+
- task: format
160+
- task: lint
161+
- task: test
162+
- task: build
163+
164+
# Parallel builds for monorepo
165+
build-all:
166+
description: Build all services
167+
steps:
168+
- parallel:
169+
- dir: services/api
170+
cmd: cargo build --release
171+
- dir: services/web
172+
cmd: npm run build
173+
- cmd: echo "🎉 Build complete!"
174+
175+
# Deploy workflow
176+
deploy:
177+
description: Deploy to production
178+
steps:
179+
- task: ci
180+
- cmd: ./scripts/deploy.sh
181+
```
182+
183+
---
184+
185+
## 🌍 Platform Support
186+
187+
| Platform | Architecture | Status |
188+
|----------|--------------|--------|
189+
| Linux | x86_64 | ✅ |
190+
| macOS | x86_64 | ✅ |
191+
| macOS | ARM64 (Apple Silicon) | ✅ |
192+
| Windows | x86_64 | ✅ |
193+
194+
---
195+
196+
## 🔮 Roadmap
197+
198+
- [ ] Task dependencies (`depends: [build, test]`)
199+
- [ ] Conditional execution (`if: ${{ env.CI }}`)
200+
- [ ] Watch mode (`watch: [src/**/*.rs]`)
201+
- [ ] Variable interpolation (`${{ vars.version }}`)
202+
- [ ] Caching / incremental builds
203+
- [ ] Interactive task picker
204+
205+
See [DESIGN.md](DESIGN.md) for the full roadmap.
206+
207+
---
208+
209+
## 🤝 Contributing
210+
211+
Contributions are welcome! Please read our contributing guidelines and submit PRs.
212+
213+
### Development
214+
215+
```bash
216+
# Clone the repo
217+
git clone https://github.com/CodingWithCalvin/rnr.cli
218+
cd rnr.cli
219+
220+
# Build
221+
cargo build
222+
223+
# Run tests
224+
cargo test
225+
226+
# Run locally
227+
cargo run -- --help
228+
```
229+
230+
---
231+
232+
## 👥 Contributors
233+
234+
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
235+
<!-- prettier-ignore-start -->
236+
<!-- markdownlint-disable -->
237+
238+
<!-- markdownlint-restore -->
239+
<!-- prettier-ignore-end -->
240+
<!-- ALL-CONTRIBUTORS-LIST:END -->
241+
242+
---
243+
244+
## 📄 License
245+
246+
MIT License - see [LICENSE](LICENSE) for details.
247+
248+
---
249+
250+
<p align="center">
251+
Made with ❤️ by <a href="https://github.com/CodingWithCalvin">CodingWithCalvin</a>
252+
</p>

0 commit comments

Comments
 (0)