Pueue
A command-line task queue for scheduling, grouping, pausing, inspecting, and controlling long-running shell commands.
Why consider Pueue?
Pueue is a command-line task management tool designed to process queues of shell commands sequentially or in parallel. It runs via a background daemon, allowing developers and system administrators to manage long-running tasks independently of active terminal sessions.
Learn Pueue by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide3 sections
Managing Long-Running Shell Commands with Pueue
Managing long-running background jobs in developer workflows often requires decoupling process execution from interactive terminal sessions. According to the project documentation, Pueue is a command-line task management tool for sequential and parallel execution of long-running tasks. It operates by receiving shell commands from client invocations and delegating execution to a standalone local background service.
Because jobs run detached from the terminal window, developers can start long tasks and safely close their shell without interrupting ongoing work. As documented in the repository, Since Pueue is not bound to any terminal, you can control your tasks from any terminal on the same machine. This architecture eliminates the risk of accidental job termination caused by network dropouts or closed terminal windows.
Remote workers frequently rely on SSH sessions to trigger resource-intensive tasks on remote build servers. The official guide highlights that The queue will be continuously processed, even if you no longer have any active ssh sessions. This makes Pueue an effective utility for remote administration, video transcoding, and large data synchronization tasks.
To maintain background process operations without keeping an interactive user logged in, Pueue relies on its dedicated daemon. Specifically, The pueued daemon runs in the background. No need to be logged in. The daemon continuously tracks active tasks, captures standard output and error streams, and manages execution state transitions across the job lifecycle.
State persistence is critical when unexpected power cuts or system restarts interrupt long-running task queues. In Pueue, The queue is always saved to disk and restored on kill/system crash. When the daemon starts up again after an unexpected termination, previous tasks, logs, and queue states are reloaded from disk.
Understanding the intended scope of the project helps users evaluate appropriate use cases. As stated by the authors, Pueue is not designed to be a heavy-duty programmable (scriptable) task scheduler/executor. Instead, the tool is optimized for human-driven task queues and interactive workstation job orchestration.
Installation and Daemon Initialization
Before interacting with the queue through the command-line interface, the background service must be running. As explained in the setup documentation, Before you can use the pueue client, you have to start the daemon. The daemon can be launched interactively in a foreground shell or run as a detached background service.
On Linux systems, service management can be automated using native init systems for seamless background execution. The official documentation notes that Systemd user services allow every user to start/enable their own session on Linux operating system distributions. Configuring user-level systemd units ensures that the queue daemon starts automatically when a user logs in.
Install Pueue from Cargo:
cargo install --locked pueueBuild Pueue from source:
git clone git@github.com:Nukesor/pueuecd pueuecargo build --release --locked --path ./pueueConfiguration and File Structure
Pueue supports declarative configuration files across different operating systems. The official configuration documentation notes that The default configuration file of Pueue is located in one of these directories respectively: ~/.config/pueue/pueue.yml on Linux, ~/Library/Application Support/pueue/pueue.yml on macOS, and %APPDATA%\pueue\pueue.yml on Windows.
Users do not need to manually craft the configuration file before first use. The documentation states that A default configuration file will be generated when starting pueued for the first time. This generated configuration includes default socket paths, client display parameters, and daemon callback definitions.
Default configuration template:
---shared: pueue_directory: ~/.local/share/pueue use_unix_socket: true runtime_directory: null unix_socket_path: ~/.local/share/pueue/pueue_your_user.socket host: "localhost" port: "6924" daemon_cert: ~/.local/share/pueue/certs/daemon.cert daemon_key: ~/.local/share/pueue/certs/daemon.key shared_secret_path: ~/.local/share/pueue/shared_secretclient: restart_in_place: false read_local_logs: true show_confirmation_questions: false show_expanded_aliases: false dark_mode: false max_status_lines: null status_time_format: "%H:%M:%S" status_datetime_format: "%Y-%m-%d\n%H:%M:%S"daemon: pause_group_on_failure: false pause_all_on_failure: false callback: "\"Task {{ id }}\nCommand: {{ command }}\nPath: {{ path }}\nFinished with status '{{ result }}'\"" callback_log_lines: 10 shell_command: ["zsh", "-c", "{{ pueue_command_string }}"] env_vars: BASH_ENV: "$HOME/.config/shell_aliases"Task Groups and Queue Management
When running mixed workloads on a single machine, task grouping prevents high-resource jobs from degrading system responsiveness. According to the task documentation, Grouping tasks can be useful, whenever your tasks utilize different system resources. Users can allocate distinct concurrency limits to separate groups such as I/O-bound disk tasks and CPU-intensive compilation steps.
Managing distinct task groups in Pueue is performed directly through the command line. The official groups guide specifies that The addition and removal of groups is managed with the group subcommand. This command structure allows operators to create, list, and delete custom named queues dynamically.
Fine-tuning execution concurrency across groups enables optimal throughput without overwhelming CPU cores or memory. As explained in the project FAQ, You can specify how many tasks should run in parallel and group tasks to maximize system resource utilization. Adjusting parallel limits allows background tasks to run smoothly alongside interactive desktop applications.
Adding shell commands with quotes:
pueue add -- ls -al "/tmp/this\ is\ a\ test\ directory"Related tools
More options with a similar category or technology profile.
McFly
Fly through your shell history with an intelligent neural network search engine.
cheat
Interactive command-line cheatsheets for system administrators and software engineers.
Pipenv
Python development workflow for humans uniting Pipfile, pip, and virtualenv.
Rye
Comprehensive Python package and workspace management tool written in Rust.