# leahneukirchen/nq

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/leahneukirchen-nq).**

3,101 stars · 70 forks · C · other

## Links

- GitHub: https://github.com/leahneukirchen/nq
- awesome-repositories: https://awesome-repositories.com/repository/leahneukirchen-nq.md

## Description

nq is a daemonless job orchestrator and POSIX shell task manager that manages asynchronous command execution on Unix systems. It functions as a command line job queue using directories and file-system locks to coordinate background processes across multiple terminal sessions.

The system distinguishes itself by utilizing file-system-based locking to ensure sequential job execution without requiring a resident background daemon. It enables shared queue coordination, allowing different terminal sessions to synchronize work by directing tasks to specific directories.

The project covers background task monitoring and job log management, persisting output to disk for auditing and streaming live progress to the terminal. It includes capabilities for job completion synchronization, the ability to restart previously completed jobs, and integration with terminal multiplexers to decouple execution output from the primary shell.

Configuration is handled through system environment variables to define queue locations and operational behavior.

## Tags

### Development Tools & Productivity

- [Daemonless Synchronization](https://awesome-repositories.com/f/development-tools-productivity/feature-flags/system-flag-unlocking/system-file-lock-management/daemonless-synchronization.md) — Implements a daemonless orchestration system using file-system locks to synchronize sequential task execution.
- [Terminal Workflow Automations](https://awesome-repositories.com/f/development-tools-productivity/terminal-shell-cli/cli-tooling-frameworks/cli-tooling/shell-productivity-enhancements/terminal-workflow-automations.md) — Automates complex sequences of shell commands and integrates with terminal multiplexers for visibility.

### DevOps & Infrastructure

- [Distributed Task Coordination](https://awesome-repositories.com/f/devops-infrastructure/distributed-lock-coordination/distributed-task-coordination.md) — Coordinates shared queues across multiple terminal sessions using file system locks to prevent concurrent execution.
- [Sequential Job Runners](https://awesome-repositories.com/f/devops-infrastructure/job-execution-engines/sequential-job-runners.md) — Ensures strict execution order by polling for the completion of a preceding task before starting the next.
- [Job Queues](https://awesome-repositories.com/f/devops-infrastructure/job-queues.md) — Implements a system for managing and tracking the sequential execution of background jobs. ([source](https://github.com/leahneukirchen/nq/blob/master/nqtail.sh))
- [Multi-Session Coordination](https://awesome-repositories.com/f/devops-infrastructure/job-queues/multi-session-coordination.md) — Enables synchronization of work across multiple terminal sessions by directing tasks to shared directories. ([source](https://github.com/leahneukirchen/nq/blob/master/README.md))
- [Output Streaming](https://awesome-repositories.com/f/devops-infrastructure/job-scheduling/job-output-retrievers/job-workflow-administrators/output-streaming.md) — Allows users to stream live output and logs from background jobs directly to the terminal. ([source](https://github.com/leahneukirchen/nq/blob/master/nqtail.1))
- [Completion Synchronization](https://awesome-repositories.com/f/devops-infrastructure/job-queues/completion-synchronization.md) — Pauses the current session until specified background jobs or all queued tasks finish executing. ([source](https://github.com/leahneukirchen/nq#readme))
- [Queue Location Configuration](https://awesome-repositories.com/f/devops-infrastructure/task-queues/queue-location-configuration.md) — Isolates different task queues by directing logs and lock files to specific directories via environment variables. ([source](https://github.com/leahneukirchen/nq#readme))

### Operating Systems & Systems Programming

- [POSIX Shell Task Managers](https://awesome-repositories.com/f/operating-systems-systems-programming/posix-shell-task-managers.md) — Orchestrates background processes across multiple terminal sessions with persistent logging and job tracking.
- [Environment Variable Configurations](https://awesome-repositories.com/f/operating-systems-systems-programming/system-administration-maintenance/system-administration-utilities/system-utilities/environment-configuration-tools/system-environment-customizers/environment-variable-configurations.md) — Uses environment variables to define queue locations and operational behavior at runtime.

### Software Engineering & Architecture

- [Task Queue Isolation](https://awesome-repositories.com/f/software-engineering-architecture/directory-based-organization/task-queue-isolation.md) — Provides isolation for different work streams by organizing tasks and logs into separate folder structures.
- [Queue and Log Persistence](https://awesome-repositories.com/f/software-engineering-architecture/persistent-operation-queues/queue-and-log-persistence.md) — Captures standard output and error streams to disk for auditing and real-time monitoring.
- [Job Result Persistence](https://awesome-repositories.com/f/software-engineering-architecture/job-result-persistence.md) — Provides persistence of background job execution results to files for later auditing. ([source](https://github.com/leahneukirchen/nq/blob/master/nq.c))

### System Administration & Monitoring

- [Background Job Monitoring](https://awesome-repositories.com/f/system-administration-monitoring/background-job-monitoring.md) — Tracks real-time output and progress of background processes without requiring an active terminal session.
- [Background Job Queues](https://awesome-repositories.com/f/system-administration-monitoring/background-job-queues.md) — Functions as a background task runner that uses file-system locks to ensure sequential order on Unix systems.
- [Job Execution Logging](https://awesome-repositories.com/f/system-administration-monitoring/background-job-schedulers/job-execution-logging.md) — Persists background command output to files and streams logs for debugging and auditing.
- [File-Based Job Orchestrators](https://awesome-repositories.com/f/system-administration-monitoring/file-based-job-orchestrators.md) — Provides a daemonless queue system using directories and lock files to manage asynchronous command execution.
