@di-rs/rollercoaster
v1.4.0
Published
CLI tool for running tasks without knowing the manager
Downloads
305
Maintainers
Readme
🎢 Rollercoaster
Run tasks/scripts without needing to know which package manager or task runner is being used. Roll through them like a rollercoaster!
A smart CLI tool that automatically detects and runs tasks from multiple sources (npm, pnpm, yarn, Taskfile) with a beautiful interactive interface, fuzzy search, and extensive keyboard shortcuts.
✨ Features
- 🔍 Fuzzy Search - Type partial names to find tasks (
bldmatchesbuild) - 🎨 Beautiful TUI - Modern terminal interface with colors and borders
- 📋 Task Preview - See task details before executing
- ⌨️ Vim-style Navigation - Efficient keyboard shortcuts (j/k, h/l, g/G)
- 🚀 Auto-detection - Automatically finds npm, pnpm, yarn, and Taskfile
- 📄 Smart Pagination - Clean interface even with many tasks
- 🔦 Search Highlighting - Visual feedback with highlighted matches
- 💡 Interactive Help - Press
?orF1for full keyboard reference - 🎯 Zero Configuration - Works out of the box
🎯 Supported Task Runners
- npm - package.json scripts
- pnpm - pnpm workspaces and scripts
- yarn - yarn v1.x scripts
- bun - bun package manager
- Task - Taskfile.yml (go-task/task v3)
📦 Installation
Download Standalone Binary (Recommended)
No runtime dependencies required! Download the binary for your platform:
macOS:
# Apple Silicon (M1/M2/M3)
curl -L https://github.com/di-rs/rollercoaster/releases/latest/download/rollercoaster-macos-arm64 -o rollercoaster
chmod +x rollercoaster
sudo mv rollercoaster /usr/local/bin/
# Intel
curl -L https://github.com/di-rs/rollercoaster/releases/latest/download/rollercoaster-macos-x64 -o rollercoaster
chmod +x rollercoaster
sudo mv rollercoaster /usr/local/bin/Linux:
# x86_64
curl -L https://github.com/di-rs/rollercoaster/releases/latest/download/rollercoaster-linux-x64 -o rollercoaster
chmod +x rollercoaster
sudo mv rollercoaster /usr/local/bin/Using Homebrew (macOS)
Homebrew now uses the standalone binary (no Node.js required):
brew tap di-rs/tap
brew install rollercoasterUsing npm
npm install -g @di-rs/rollercoasterUsing pnpm
pnpm add -g @di-rs/rollercoasterUsing yarn
yarn global add @di-rs/rollercoasterUsing bun
bun add -g @di-rs/rollercoasterFrom source
# Clone the repository
git clone https://github.com/dmitriy-rs/rollercoaster
cd rollercoaster
# Install dependencies
bun install
# Build npm package
bun run build
# Install globally
bun link🚀 Usage
Show all available tasks
rollercoasterThis displays an interactive list of all tasks from all detected managers.
Fuzzy search and execute
# Matches "build"
rollercoaster bld
# Matches "test"
rollercoaster tst
# Matches "lint"
rollercoaster liWith arguments
# Pass arguments to the task
rollercoaster test --watch --coverageCreate an alias
For maximum convenience, create a short alias:
# ~/.zshrc or ~/.bashrc
alias r="rollercoaster"
# Now you can use:
r # Show all tasks
r bld # Build
r t # Test⌨️ Keyboard Shortcuts
Navigation
↑ork- Move up↓orj- Move down←orh- Previous page→orl- Next pageg- Jump to first taskG- Jump to last task (Shift+g)
Search & Filter
/- Start filteringc- Clear active filterESC- Exit filter modeEnter- Confirm filter / Execute task
Actions
Enter- Execute selected taskv- Toggle view mode?orF1- Show helpqorESC- Quit
🎨 UI Preview
╭────────────────────────────────────────────────────────╮
│ │
│ 🎢 Rollercoaster Task Runner │
│ │
│ Manager: npm • /home/user/project │
│ │
╰────────────────────────────────────────────────────────╯
╭──────────────────╮ ╭────────────────────────────────╮
│ ❯ build [npm] │ │ 📋 Task Details │
│ test [npm] │ │ │
│ dev [npm] │ │ Name: build │
│ lint [Task] │ │ │
│ │ │ Description: │
╰──────────────────╯ │ Build standalone executables with bun │
│ │
Page 1/2 • 13 tasks │ Directory: │
│ /home/user/project │
│ │
│ Manager: npm │
╰────────────────────────────────╯
┌──────────────────────────────────────────────────────┐
│ 13 / 13 tasks Press ? or F1 for help │
└──────────────────────────────────────────────────────┘🔧 Configuration
Rollercoaster automatically creates a configuration file at ~/.rollercoaster/config.toml:
# Default JavaScript package manager when none detected
DefaultJSManager = "npm"
# Enable using default manager when no lock file found
EnableDefaultJSManager = false
# Automatically select first match (false shows selection UI)
AutoSelectClosest = true📚 How It Works
- Manager Detection: Scans from current directory to git root
- Lock File Priority: pnpm-lock.yaml > yarn.lock > package-lock.json
- Task Collection: Gathers all tasks from detected managers
- Fuzzy Matching: Uses fuse.js for intelligent task matching
- Interactive UI: Displays tasks in a beautiful Ink-based interface
🛠️ Development
Prerequisites
- Node.js 20+
- Bun (required for building standalone executables)
Setup
# Install dependencies
bun install
# Run in development mode
bun run dev
# Run tests
bun test
# Run tests with coverage
bun test --coverage
# Build npm package (outputs to dist/index.mjs)
bun run build
# Build for specific platforms
bun run build:bin:macos-arm64 # Apple Silicon
bun run build:bin:macos-x64 # Intel Mac
bun run build:bin:linux-x64 # Linux x86_64
# Build all platforms (npm package + all executables)
bun run build:all
# Type check
bun run typecheck
# Lint
bun run lint
# Format
bun run format
# Check and fix (lint + format)
bun run checkNote: This project uses Bun for development and building. The standalone executables are self-contained and include the Bun runtime, so end users don't need Node.js or Bun installed.
Build System
The project now uses bun build --compile to create standalone executables:
- Standalone executables: Built with
bun build --compilefor direct download and use- No runtime dependencies required
- Includes Bun runtime embedded in the binary
- Optimized with minification, sourcemaps, and bytecode compilation
- Cross-platform builds from a single machine (Linux, macOS, Windows)
Project Structure
src/
├── cli/ # CLI command definitions
├── core/
│ ├── config/ # Configuration management
│ ├── logger/ # Styled logging
│ ├── task/ # Task utilities
│ ├── manager/ # Manager system
│ │ ├── js/ # JavaScript managers (npm, pnpm, yarn)
│ │ ├── task-manager/ # Task runner integration
│ │ ├── parser/ # Manager detection
│ │ └── config-file/ # File parsing
│ └── ui/
│ └── tasks-list/ # Ink-based TUI
├── types/ # TypeScript definitions
└── index.ts # Entry point🧪 Testing
The project includes comprehensive test coverage:
- Unit tests for all core components
- Integration tests for manager detection
- File system operation tests
- Fuzzy search algorithm tests
Run tests with:
npm test📖 Documentation
- UI Features - Detailed UI feature documentation
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- 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
MIT © Dmitriy
🙏 Acknowledgments
Built with:
- Ink - React for CLIs
- Commander.js - CLI framework
- Fuse.js - Fuzzy search
- Chalk - Terminal styling
- Biome - Fast formatter and linter
Q: Can I use it in a monorepo? A: Yes! It scans from the current directory up to the git root and detects all managers along the way.
Q: Does it work with Yarn v2+? A: Currently only Yarn v1.x is supported. Yarn v2+ (Berry) support is planned.
Q: What if I have multiple package.json files? A: Rollercoaster will find and list tasks from all of them, showing the directory for each.
Q: How do I disable fuzzy search?
A: Set AutoSelectClosest = false in ~/.rollercoaster/config.toml to always show the selection UI.
🐛 Troubleshooting
Tasks not showing up?
- Make sure you're in a directory with a package.json or Taskfile.yml
- Check that your lock files are present
- Run with
NODE_ENV=developmentto see debug logs
Wrong manager detected?
- Check lock files in your directory
- Set
DefaultJSManagerin config file - Enable
EnableDefaultJSManagerif needed
UI rendering issues?
- Ensure your terminal supports colors
- Try a different terminal emulator
- Check terminal width (minimum 80 columns recommended)
Made with ❤️ by Dmitriy • Report Issues
