UNPKG

neexrs

Version:

A concurrent command runner for development workflows

131 lines (95 loc) 3.23 kB
# neexrs A fast concurrent command runner built with Rust for development workflows. ## Installation ```bash npm install -g neexrs ``` ## Usage ### Run Commands in Parallel Use `neexrs p` or `neexrs parallel` to run multiple commands simultaneously: ```bash # Run dev servers in parallel neexrs p "cd apps/client && bun run dev" "cd apps/server && bun run dev" # Start multiple services neexrs p "npm run start:client" "npm run start:server" "npm run start:worker" ``` ### Run Commands Sequentially Use `neexrs s` or `neexrs sequential` to run commands one after another: ```bash # Build steps in sequence neexrs s "prisma generate" "prisma migrate" "npm run build:client" "npm run build:server" # Setup workflow neexrs s "npm install" "npm run build" "npm run test" ``` ## Example Usage in package.json Based on your scripts, here's how you can use neexrs: ```json { "scripts": { "dev": "neexrs p 'cd apps/client && bun run dev' 'cd apps/server && bun run dev'", "build": "neexrs s 'cd apps/server && bunx prisma generate' 'cd apps/server && bunx prisma db push' 'cd apps/client && bun run build' 'cd apps/server && bun run build'", "start": "neexrs p 'cd apps/client && bun run start' 'cd apps/server && bun run start'", "setup": "neexrs s 'npm install' 'cd apps/server && bunx prisma generate' 'cd apps/server && bunx prisma db push'" } } ``` ## Features - **🚀 Fast**: Built with Rust for maximum performance - **⚡ Concurrent**: Run multiple commands in parallel - **📋 Sequential**: Run commands in order when needed - **🎨 Colored Output**: Each command gets its own color for easy identification - **💾 Cross-platform**: Works on Windows, macOS, and Linux - **🔧 Error Handling**: Proper exit codes and error reporting ## Command Options ### Parallel Mode (`p`) - Runs all commands simultaneously - Each command gets a colored prefix for identification - Waits for all commands to complete - Exits with error code if any command fails ### Sequential Mode (`s`) - Runs commands one after another - Stops execution if any command fails - Shows progress indicator - Perfect for build pipelines ## Colors Commands are automatically assigned colors for easy identification: - Cyan - Yellow - Magenta - Green - Blue - Red ## Examples ### Development Workflow ```bash # Start frontend and backend together neexrs p "npm run dev:client" "npm run dev:server" # Watch multiple file types neexrs p "npm run watch:css" "npm run watch:js" "npm run watch:templates" ``` ### Build Pipeline ```bash # Complete build process neexrs s "npm run lint" "npm run test" "npm run build" "npm run deploy" # Database operations neexrs s "npm run db:migrate" "npm run db:seed" "npm run db:backup" ``` ### Testing ```bash # Run different test suites in parallel neexrs p "npm run test:unit" "npm run test:integration" "npm run test:e2e" # Sequential testing with setup neexrs s "npm run test:setup" "npm run test:run" "npm run test:cleanup" ``` ## Requirements - Node.js 14 or higher - Works on Linux, macOS, and Windows ## Building from Source If you have Rust installed: ```bash git clone https://github.com/yourusername/neexrs.git cd neexrs cargo build --release ``` ## License MIT