Shell Compose
Shell Compose is a lightweight background process runner for long-running or scheduled jobs.
Features
Integration with just
just is a command runner with syntax inspired by make
.
It supports shell commands but also other languages like Python or NodeJS.
Tasks can have dependencies and variables loaded from .env
files.
Example:
# Simulate data processing
[group('autostart')]
:
# Serve current directory on port 8000
[group('autostart')]
:
Running a just
recipe:
shell-compose start processing
Running all recipes in a group:
shell-compose up autostart
Similar projects
-
PM2: Production process manager for Node.js/Bun applications with a built-in load balancer.
-
Pueue: Command-line task management tool for sequential and parallel execution of long-running tasks.
To start tasks in response to file modifications, consider using watchexec.
For interactive background tasks, consider using Pueue or a terminal multiplexer like Zellij, tmux or screen.
Installation
Pre-built binaries
We provide several options to access pre-built binaries for a variety of platforms. If you would like to manually download a pre-built binary, checkout the latest release on GitHub.
Installer scripts
macOS and Linux:
|
Windows PowerShell:
Other Options
cargo-binstall
Build From Source
For users who need to install shell-compose on platforms that we do not yet provide pre-built binaries for, you will need to build from source.
shell-compose
is written in Rust and uses cargo to build. Once you've installed the Rust toolchain (rustup
), run:
Run with systemd and journal logging
Unit file example:
[Unit]
Description=Shell Compose
After=network.target
Requires=network.target
[Service]
Type=exec
User=user
Group=user
WorkingDirectory=/home/user/my-project-justfile-root
ExecStart=/usr/local/bin/shell-composed up autostart
Restart=always
[Install]
WantedBy=multi-user.target
The background process shell-composed
supports a subset of the shell-compose
command line arguments:
Usage: shell-composed [COMMAND]
Commands:
run Execute command
runat Execute command with cron schedule
start Start service
up Start service group
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version