blocrun
v1.2.3
Published
Run and manage grouped CLI processes using blocks defined in a BLOCFILE
Maintainers
Readme
✨ Features
- Block-based grouping of commands
- Easily run or kill a named group of tasks
- Track background or sustained processes (e.g. GUI apps, dev servers)
- Command-type prefix system for flexible control
📦 Installation
npm install -g blocrun📂 File Structure
Create a BLOCFILE in your project root. This file defines blocks of commands:
dev {
@ code .
% vite
$ echo "Development server launched"
}
build {
% npm run build
}🔣 Prefix Symbols
| Symbol | Description | Tracked |
| ------ | ------------------------------------------- | ------- |
| @ | Sustained (servers, terminal commands, etc) | ✅ Yes |
| % | Tracked but auto-closing jobs (e.g. build) | ✅ Yes |
| $ | One-off commands (not tracked e.g. gui app) | ❌ No |
🚀 Usage
Run a block
blocrun run <block-name>Example:
blocrun run devIf the block is already running, it will not run again.
Kill a block
blocrun kill <block-name>This command:
- Terminates all tracked processes for the block
- Cleans up the
.blocksPID tracking file
📁 File Summary
BLOCFILE— Your command block definitions.blocks— Internal file storing tracked PIDs
📘 Full Example: BLOCFILE
dev {
@ code .
% npm run dev
$ echo "Started successfully"
}
build {
% vite build
}💡 When to use each symbol
@— GUI or server that should stay alive (cmd /k, VSCode, etc.)%— Script or tool that ends on its own (e.g.vite build)$— Logging or setup scripts you don’t need to track
🧠 Why use blocrun?
- Simpler than shell scripts
- Safer than PM2 for dev use
- Works on Windows/macOS/Linux
- Better UX for managing grouped tasks
