pueue
A command-line task queue manager for sequential and parallel execution of long-running shell commands.
pueue is a daemon-based task queue manager for the shell. Instead of running
long commands in the foreground or backgrounding them haphazardly with &,
pueue gives you a proper queue: add tasks, control how many run in parallel,
pause and resume them, inspect their output, and get notified when they finish —
all from the command line.
It's particularly useful for batch jobs: encoding videos, running large test suites, syncing files, or any situation where you have more tasks than you want to run simultaneously.
Features
- Persistent daemon —
pueuedruns in the background and survives terminal sessions; tasks keep running even if you close your shell - Parallel execution — configure how many tasks run concurrently; the rest wait in the queue
- Groups — organise tasks into named groups, each with their own parallelism setting
- Full output capture — stdout and stderr of every task are captured and can
be inspected at any time with
pueue log - Follow live output — stream the output of a running task in real time with
pueue follow - Dependencies — tasks can depend on other tasks, only starting once their dependencies succeed
- Callbacks — run a shell command automatically when a task finishes (e.g. send a notification)
- Stash & schedule — add tasks in a paused state or schedule them to start at a specific time
- Clean interface —
pueue statusgives a colour-coded table of all tasks and their states
Installation
cargo install pueue
Or via your system package manager:
# Debian / Ubuntu
apt install pueue
# Fedora
dnf install pueue
# Arch Linux
pacman -S pueue
# macOS
brew install pueue
# Nix
nix-env -iA nixpkgs.pueueSetup
Start the daemon (add this to your init system or shell profile to run it automatically):
pueued --daemonize
On systems with systemd, a user service can be enabled instead:
systemctl --user enable --now pueuedUsage
# Add a task to the queue
pueue add "sleep 10 && echo done"
# Add a task with a label
pueue add --label "encode video" "ffmpeg -i input.mkv output.mp4"
# Check the status of all tasks
pueue status
# Stream the live output of a running task (by ID)
pueue follow 0
# Show the captured output of a finished task
pueue log 0
# Pause the queue (finish current tasks, don't start new ones)
pueue pause
# Resume the queue
pueue start
# Run tasks in parallel (set parallelism to 4)
pueue parallel 4
# Kill a running task
pueue kill 0
# Remove a finished or failed task from the list
pueue remove 0
# Clean up all successfully finished tasks
pueue cleanGroups and parallelism
# Create a group with a parallelism limit of 2
pueue group add downloads --parallel 2
# Add a task to the group
pueue add --group downloads "wget https://example.com/file1.zip"
pueue add --group downloads "wget https://example.com/file2.zip"
pueue add --group downloads "wget https://example.com/file3.zip"
# file3 will wait until one of the first two finishesDependencies
# Task 1 runs first
pueue add "echo step-one"
# Task 2 only starts after task 0 succeeds
pueue add --after 0 "echo step-two"Configuration
Pueue is configured via ~/.config/pueue/pueue.yml. Key options include:
daemon:
default_parallel_tasks: 1
pause_all_on_failure: false
pause_group_on_failure: false
client:
restart_in_place: false
read_local_logs: true
show_confirmation_questions: false