rarn
v1.1.0
Published
Universal Package Manager - Combining the best of Yarn and Conda for multi-language projects
Maintainers
Readme
RARN - Universal Package Manager
🚀 A revolutionary package manager that combines the best features of Yarn and Conda
RARN is a next-generation package manager designed to handle multi-language projects seamlessly. It brings together the speed and reliability of Yarn with the powerful environment management capabilities of Conda.
✨ Features
From Yarn
- Lock files for reproducible installs
- Workspace/Monorepo support for large projects
- Offline mode with intelligent caching
- Parallel installation for blazing fast performance
- Plugin system for extensibility
- Zero-installs capability
From Conda
- Virtual environment management
- Cross-platform binary packages
- Multi-language support (JavaScript, Python, C++, R, etc.)
- Advanced dependency resolver with SAT solving
- Binary relocation for compiled packages
- Channel/repository management
🚀 Quick Start
Installation
npm install -g rarn
# or
yarn global add rarnBasic Usage
# Initialize a new project
rarn init
# Install packages
rarn install express pandas numpy
rarn add react@18 tensorflow python:scikit-learn
# Create and activate environments
rarn env create ml-project --language python javascript
rarn env activate ml-project
# Workspace management
rarn workspace init
rarn workspace run build📦 Package Specification
RARN supports multiple package formats:
# JavaScript packages (from npm)
rarn install express react vue
# Python packages (prefix with python:)
rarn install python:numpy python:pandas python:tensorflow
# Language-specific versions
rarn install [email protected] python:[email protected]
# Git repositories
rarn install git+https://github.com/user/repo.git🌍 Environment Management
RARN provides full environment isolation with shell integration, similar to Conda:
# Create environment with specific languages
rarn env create myapp --language javascript python
# Activate environment (shows activation instructions)
rarn env activate myapp
# Or activate directly in your shell with eval
eval "$(rarn env activate myapp --print)"
# Your prompt will show the active environment
(myapp) $ npm install express # Installs to myapp environment
(myapp) $ rarn install python:requests # Uses myapp's Python venv
# Deactivate environment
rarn_deactivate
# List all environments
rarn env list
# Remove environment
rarn env remove myappEnvironment Features (v1.1.0+)
- Shell Integration: Full prompt modification and PATH management
- Package Isolation: Each environment has its own node_modules and Python site-packages
- Python Virtual Environments: Automatic Python venv creation with pip
- Multi-Shell Support: Works with bash, zsh, fish, cmd, and PowerShell
- Auto-detection: Install commands automatically use the active environment
📁 Project Configuration
package.json
{
"name": "my-universal-project",
"version": "1.0.0",
"dependencies": {
"express": "^4.18.0",
"react": "^18.0.0",
"numpy": "python:^1.24.0",
"pandas": "python:^2.0.0"
},
"rarn": {
"environments": {
"production": {
"languages": ["javascript", "python"],
"pythonVersion": "3.10"
}
}
}
}rarn-workspace.json
{
"version": "1.0.0",
"packages": [
"packages/*",
"apps/*"
],
"nohoist": [
"**/react-native"
]
}🔧 Commands
Package Management
rarn install [packages...]- Install packagesrarn add <packages...>- Add packages to projectrarn remove <packages...>- Remove packagesrarn update [packages...]- Update packagesrarn list- List installed packagesrarn info <package>- Show package information
Environment Management
rarn env create <name>- Create new environment with language supportrarn env activate <name>- Show activation instructions for environmentrarn env activate <name> --print- Print activation script for evalrarn env list- List all environmentsrarn env remove <name>- Remove environment
Workspace Management
rarn workspace init- Initialize workspacerarn workspace list- List workspace packagesrarn workspace run <script>- Run script in all packages
Other Commands
rarn init- Initialize new projectrarn run <script>- Run project scriptrarn cache clean- Clean cacherarn audit- Security auditrarn why <package>- Show why a package is installedrarn outdated- Check for outdated packagesrarn doctor- Check system for potential problemsrarn config get/set- Manage configuration
🔌 Plugin System
RARN supports plugins for extended functionality:
// my-plugin.js
module.exports = {
name: 'my-plugin',
version: '1.0.0',
hooks: {
beforeInstall: async (packages, context) => {
console.log('Installing:', packages);
}
},
commands: [{
name: 'hello',
description: 'Say hello',
handler: async (args, context) => {
console.log('Hello from plugin!');
}
}]
};Install plugins:
rarn plugin add ./my-plugin.js
rarn plugin list🏗️ Architecture
rarn/
├── src/
│ ├── core/ # Core package manager logic
│ ├── plugins/ # Plugin system
│ └── cli/ # Command-line interface
├── examples/ # Example configurations
├── bin/ # Executable files
└── package.json🤝 Contributing
Contributions are welcome! Please read our Contributing Guide for details.
📄 License
MIT License - see LICENSE for details.
🙏 Acknowledgments
Note: This is a conceptual implementation demonstrating the architecture and features of a universal package manager. Full production implementation would require additional work on registry integration, binary package handling, and platform-specific optimizations.
