Skip to content

Commit 8e37ad5

Browse files
committed
docs: create comprehensive README for runx CLI tool
1 parent fb83f36 commit 8e37ad5

File tree

1 file changed

+169
-0
lines changed

1 file changed

+169
-0
lines changed

packages/cli/README.md

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
# runx 🚀
2+
3+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4+
5+
> ATTENTION! The project is under development and not ready for production use!
6+
7+
A lightning monorepo task runner written in Deno. `runx` helps you manage and
8+
execute tasks across multiple packages in your monorepo with minimal
9+
configuration and maximum efficiency.
10+
11+
> **Note**: Supports only npm workspaces for now. Other package managers are
12+
> planned.
13+
14+
## 🌟 Key Features
15+
16+
- **Zero Configuration**: Works out of the box with your existing monorepo
17+
structure
18+
- **Smart Workspace Detection**: Automatically detects and works with workspace
19+
patterns defined in your root `package.json`
20+
- **Intelligent Dependency Management**:
21+
- Builds and validates dependency relationships between packages
22+
- Detects and prevents circular dependencies
23+
- Executes tasks in correct topological order
24+
- **Flexible Execution Modes**:
25+
- Run commands across all packages
26+
- Target specific packages
27+
- Execute only in affected packages (Git-aware)
28+
29+
## 🗺️ Roadmap
30+
31+
Current status of essential monorepo features:
32+
33+
**Dependency Management**
34+
35+
- Smart dependency graph building
36+
- Circular dependency detection
37+
- Proper topological ordering
38+
39+
**Change Impact Analysis**
40+
41+
- Git-aware change detection
42+
- Affected package detection with dependents
43+
44+
**Modularity and Isolation**
45+
46+
- Workspace pattern support
47+
- Package-level script execution
48+
- Independent package management
49+
50+
🚧 **Parallel Task Execution**
51+
52+
- Topologically ordered execution
53+
- Proper dependency order respect
54+
55+
🚧 **Incremental Builds**
56+
57+
- Smart rebuilding of changed packages
58+
- Dependency-aware build process
59+
60+
🚧 **Build Caching**
61+
62+
- Cache build artifacts
63+
- Reuse previous builds when possible
64+
65+
🚧 **Versioning and Release Management**
66+
67+
- Automated version bumping
68+
- Changelog generation
69+
- Release coordination
70+
71+
🚧 **Unified Tools and Processes**
72+
73+
- Standardized build process
74+
- Consistent development environment
75+
- Shared configurations
76+
77+
🚧 **Scalability**
78+
79+
- Large repository support
80+
- Performance optimizations
81+
- Resource management
82+
83+
🚧 **Access Control and Permissions**
84+
85+
- Package-level access control
86+
- Security policies
87+
- Role-based permissions
88+
89+
## 📦 Installation
90+
91+
```bash
92+
deno install --allow-sys --allow-write --allow-read --allow-env --allow-run -g -N -R -f -n runx jsr:@runx/[email protected]
93+
```
94+
95+
## 🚀 Quick Start
96+
97+
1. Navigate to your monorepo root:
98+
99+
```bash
100+
cd your-monorepo
101+
```
102+
103+
2. Run a script in all packages:
104+
105+
```bash
106+
runx test
107+
```
108+
109+
## 💡 Usage
110+
111+
### Basic Commands
112+
113+
```bash
114+
# Run a command in all packages
115+
runx <task-name>
116+
117+
# Run a command only in specific packages
118+
runx <task-name> package1 package2
119+
120+
# Run a command only in affected packages (compared to main branch)
121+
runx <task-name> --affected
122+
123+
# Run a command in packages affected since a specific branch
124+
runx <task-name> --affected feature-branch
125+
```
126+
127+
### Command Options
128+
129+
- `-a, --affected [base]` - Run command only for affected packages since the
130+
specified base branch (defaults to 'main')
131+
- `--version` - Show version information
132+
- `-h, --help` - Display help information
133+
134+
## 🔧 How It Works
135+
136+
1. **Workspace Detection**: `runx` reads your root `package.json` to understand
137+
your workspace structure
138+
2. **Dependency Analysis**: Builds a complete dependency graph of your packages
139+
3. **Task Execution**:
140+
- Validates the dependency graph for circular dependencies
141+
- Determines the correct execution order
142+
- Executes tasks while maintaining proper working directories and environment
143+
variables
144+
145+
## 🤝 Contributing
146+
147+
Contributions are welcome! Please feel free to submit a Pull Request. For major
148+
changes, please open an issue first to discuss what you would like to change.
149+
150+
1. Fork the repository
151+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
152+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
153+
4. Push to the branch (`git push origin feature/amazing-feature`)
154+
5. Open a Pull Request
155+
156+
## 📝 License
157+
158+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
159+
for details.
160+
161+
## 🙏 Acknowledgments
162+
163+
Built with:
164+
165+
- [Deno](https://deno.land/) - A modern runtime for JavaScript and TypeScript
166+
- [Cliffy](https://cliffy.io/) - A framework for building command line
167+
applications
168+
- [dax](https://github.com/dsherret/dax) - The friendly shell scripting library
169+
for Deno

0 commit comments

Comments
 (0)