Skip to main content

queue-watch

Read-only terminal dashboard for CI runs and merge queues. It joins records from every source into one row per change, so a branch's CI runs and its merge-queue entry read together, and draws each merge queue as a chain of chips in queue order. queue-watch never reruns, cancels, merges or takes a lock.

queue-watch --demo: a merge queue landing changes one after another while CI runs finish, one fails and a fix goes through

Try it without a GitHub login:

uvx queue-watch --demo

Why

gh run watch follows one run, and GitHub's web UI shows Actions and the merge queue on separate pages. When several pull requests are queued at once, the questions are about the whole set: which one is merging now, which are waiting on checks, which failure is holding the queue up, and when the last one should land.

queue-watch answers them on one screen for a whole repository and keeps refreshing on its own. It joins each change's CI runs and queue entry into one row, puts the attention cases first, and shows the queue in merge order with GitHub's estimates. It also watches queues GitHub never sees: a merge lock on a build host, or anything a short script can describe as JSON.

Install

uv tool install queue-watch     # or: pipx install queue-watch
uvx queue-watch                 # run once without installing

Requires Python 3.11+. The GitHub adapters use an authenticated GitHub CLI (gh auth login); --demo needs neither.

Use

queue-watch                              # inside a GitHub checkout
queue-watch --repo owner/repo            # Actions plus the merge queue, if any
queue-watch --profile work               # ~/.config/queue-watch/work.toml
queue-watch profile add work --repo acme/api --repo acme/web
queue-watch --config sources.toml        # any combination of sources
queue-watch --repo owner/repo --once     # one JSON snapshot, no TUI
queue-watch --demo                       # a simulated repository
queue-watch --demo 2                     # two simulated repositories, as in a profile
queue-watch --theme nord --ascii         # another Textual theme; ASCII glyphs only
queue-watch --density comfortable        # title, owner and PR on a second line

With no flags, queue-watch looks for a .queue-watch.toml at the root of the current Git checkout. Without one, it watches the checkout's GitHub repository: Actions runs, plus the merge queue when the default branch has one. Outside a GitHub checkout it opens the profile named default.

The Changes tab groups changes into Needs attention, Running, Queued and Done; every view a source reports also gets its own tab. Done starts folded while any other group has changes; press enter on a group row, or click it, to fold or unfold it. Select a change or a queue chip to see its CI checks, the jobs of the most notable one, its queue position and ETA, and recent history in the inspector.

queue-watch showing a merge queue of four changes, the Changes table grouped by state, and the inspector for a failed change

Each merge queue gets a strip above the tabs: its entries in merge order, when it should clear, merges in the last hour, and how long recent attempts took. Queue depth over the session appears as a sparkline once two fetches have answered; sources report only the current queue, so the history starts when queue-watch does. On terminals under 30 rows the entries shrink to one line each.

Keyboard: arrows to move, 1 to 9 for tabs, / to search (esc to clear), o to open the selection in a browser, c to copy its SHA, d to switch row density, r to refresh, p to pause, q to quit. The mouse works too: click tabs, rows, chips and the inspector buttons, and scroll with the wheel. When a source fails, its last good data stays on screen and its status pill turns stale.

The default queue-watch theme draws on a black background and gives each region its own coloured box. Pass --theme with any Textual theme name, or pick one live from the command palette (ctrl+p).

Profiles

A profile is a named list of sources in $XDG_CONFIG_HOME/queue-watch/NAME.toml (default ~/.config), so one dashboard can watch a group of repositories:

queue-watch profile add work --repo acme/api --repo acme/web   # creates or extends work.toml
queue-watch profile list                                       # every profile and its sources
queue-watch --profile work
queue-watch profile add default --repo acme/api                # opens outside any checkout

profile add writes Actions for each repository, plus its merge queue when the default branch has one, with the repository's name in each label. Repositories already in the profile are left alone, and anything written by hand stays. A profile is ordinary source config, so you can add command and flock-queue sources too. When a dashboard spans several repositories, a branch name such as main in two of them is two rows, each labelled with its repository.

queue-watch --demo 2: two simulated repositories in one dashboard, each with its own merge queue strip, and rows that keep main and other shared branch names apart by repository

Repository configs need trust

A config can run commands and open SSH connections, so a .queue-watch.toml that arrives with a clone does nothing until you review it and run:

queue-watch trust

Trust covers the file's exact bytes (SHA-256, stored in $XDG_STATE_HOME/queue-watch/trusted.json). After any edit, queue-watch refuses the file and names the command to run again. Files passed with --config or --profile are yours and load without this step.

Sources

A config file lists sources as [[source]] tables. id and adapter are required; label and interval (seconds) are optional; every other key is an adapter option.

[[source]]
id = "ci"
adapter = "github-actions"
repo = "owner/repo"

[[source]]
id = "merge-queue"
adapter = "github-merge-queue"
repo = "owner/repo"
branch = "main"                          # optional; default branch otherwise

[[source]]
id = "deploys"
adapter = "command"
command = ["./bin/deploy-status", "--json"]
timeout = 20                             # optional seconds, default 25

[[source]]
id = "merges"
adapter = "flock-queue"
host = "build-host"                      # optional SSH destination
root = "~/src/project"                   # Git checkout that defines {git_dir}
lock = "{git_dir}/merge.lock"
tickets = "{git_dir}/merge.queue/*.ticket"
process = "merge.py"
owner_flag = "--owner"
history = "{git_dir}/merge-history.jsonl"
history_columns = [{ key = "fields.duration_seconds", label = "Took", format = "seconds" }]
Adapter Watches Options
github-actions Workflow runs, with jobs and steps in the inspector repo
github-merge-queue GitHub's native merge queue: position, state, author and GitHub's merge estimate per pull request repo, branch
command Anything else: a program that prints one snapshot command, host, cwd, timeout
flock-queue A Linux FIFO of flock-held ticket files guarding one merge lock, plus an optional JSON Lines attempt log lock, tickets, process, root, host, interpreters, owner_flag, history, history_limit, history_columns

Merge queue states map as QUEUED and MERGEABLE to queued, AWAITING_CHECKS and LOCKED to running, and UNMERGEABLE to blocked. A branch without a queue shows a warning instead of an error.

flock-queue reads lock holders from /proc/locks rather than acquiring them. With host set, the probe goes to python3 - over SSH on stdin and nothing is installed on the host.

Command sources

Use the command adapter for GitLab, Buildkite, Jenkins, Bors or an in-house queue. command is an argument list run without a shell. Locally it runs in cwd, which defaults to the config file's directory; relative paths resolve against that directory too. With host set, it runs over SSH (BatchMode, every argument quoted for the remote shell), in cwd on the host when given.

The program must exit zero and print one snapshot (below) on stdout within timeout seconds. Anything else, including a snapshot that breaks the contract, shows as a source error while the last good data stays on screen. examples/ has a working script and config.

Snapshot contract

Every adapter emits the same versioned snapshot (queue-watch.snapshot/1): a list of records with id, kind, state and title, plus optional ref, sha, repo, owner, position, timestamps, url, fields and children. state is one of queued, running, blocked, success, failure, cancelled, neutral or unknown; the adapter's own term is kept in raw_state. Records that share a ref or sha describe the same change across sources. Once records name more than one repo (owner/name, set by the GitHub adapters), a change also needs the same repo, and records without one join only each other; a command source watching several repositories should set it. model.py defines and validates the contract, and --once prints it.

Development

uv sync
uv run pytest -q                        # includes SVG snapshot tests
uv run pytest -q --snapshot-update      # after an intended layout change

docs/screenshot.png is the wide layout snapshot rendered in a browser; uv run python docs/record_demo.py re-records docs/demo.gif, and --repos 2 records docs/demo-profile.gif (both need Chrome and ffmpeg). To release, bump __version__ in src/queue_watch/__init__.py, merge, and push a matching vX.Y.Z tag; the release workflow tests, builds, publishes to PyPI with trusted publishing, and creates the GitHub release.

License

MIT

Metadata

Release files for queue-watch 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for queue-watch 0.4.0
File Size Uploaded Provenance Actions
queue_watch-0.4.0.tar.gz 97.8 kB Without provenance Details for queue_watch-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for queue-watch 0.4.0
File Interpreter ABI Platform Actions
queue_watch-0.4.0-py3-none-any.whl Python 3 none any Details for queue_watch-0.4.0-py3-none-any.whl

Total release size: 154.4 kB

Release files / queue_watch-0.4.0.tar.gz

Download URL queue_watch-0.4.0.tar.gz
Size 97.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2258e67be6c67ebdf534b4bceace68cbae25c7941ee2ad403d02d04a27f05598
BLAKE2b-256 checksum
How to use checksums
0b68acd946b39921162c08d480b9dc667c0a59bdcc1b4f9c26311e51e27e6c67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / queue_watch-0.4.0-py3-none-any.whl

Download URL queue_watch-0.4.0-py3-none-any.whl
Size 56.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6fd9dfb3540671c7daff45bd5046ba383f56aff2205f48be6a05e10e6acabb57
BLAKE2b-256 checksum
How to use checksums
26c302d15a1618a6268bdef37f30e028927a8f751b9bea09c989dff46e3e2386
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for queue-watch 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page