runx π
January 30, 2025 Β· View on GitHub
ATTENTION! The project is under development and not ready for production use!
A lightning monorepo task runner written in Deno. runx helps you manage and
execute tasks across multiple packages in your monorepo with minimal
configuration and maximum efficiency.
Note: Supports only npm workspaces for now. Other package managers are planned.
π Key Features
- Zero Configuration: Works out of the box with your existing monorepo structure
- Smart Workspace Detection: Automatically detects and works with workspace
patterns defined in your root
package.json - Intelligent Dependency Management:
- Builds and validates dependency relationships between packages
- Detects and prevents circular dependencies
- Executes tasks in correct topological order
- Flexible Execution Modes:
- Run commands across all packages
- Target specific packages
- Execute only in affected packages (Git-aware)
πΊοΈ Roadmap
Current status of essential monorepo features:
β Dependency Management
- Smart dependency graph building
- Circular dependency detection
- Proper topological ordering
β Change Impact Analysis
- Git-aware change detection
- Affected package detection with dependents
β Modularity and Isolation
- Workspace pattern support
- Package-level script execution
- Independent package management
π§ Parallel Task Execution
- Topologically ordered execution
- Proper dependency order respect
π§ Incremental Builds
- Smart rebuilding of changed packages
- Dependency-aware build process
π§ Build Caching
- Cache build artifacts
- Reuse previous builds when possible
π§ Versioning and Release Management
- Automated version bumping
- Changelog generation
- Release coordination
π§ Unified Tools and Processes
- Standardized build process
- Consistent development environment
- Shared configurations
π§ Scalability
- Large repository support
- Performance optimizations
- Resource management
π§ Access Control and Permissions
- Package-level access control
- Security policies
- Role-based permissions
π¦ Installation
deno install --allow-sys --allow-write --allow-read --allow-env --allow-run -g -N -R -f -n runx jsr:@runx/cli@0.2.0
π Quick Start
- Navigate to your monorepo root:
cd your-monorepo
- Run a script in all packages:
runx test
π‘ Usage
Basic Commands
# Run a command in all packages
runx <task-name>
# Run a command only in specific packages
runx <task-name> package1 package2
# Run a command only in affected packages (compared to main branch)
runx <task-name> --affected
# Run a command in packages affected since a specific branch
runx <task-name> --affected feature-branch
Command Options
-a, --affected [base]- Run command only for affected packages since the specified base branch (defaults to 'main')--version- Show version information-h, --help- Display help information
π§ How It Works
- Workspace Detection:
runxreads your rootpackage.jsonto understand your workspace structure - Dependency Analysis: Builds a complete dependency graph of your packages
- Task Execution:
- Validates the dependency graph for circular dependencies
- Determines the correct execution order
- Executes tasks while maintaining proper working directories and environment variables
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
Built with: