{"id":51330284,"url":"https://github.com/sgaunet/runq","last_synced_at":"2026-07-01T22:04:31.159Z","repository":{"id":360865099,"uuid":"1251626995","full_name":"sgaunet/runq","owner":"sgaunet","description":"Single-binary Go CLI for running many shell commands in parallel with live UI, concurrency control, and local socket for command submission","archived":false,"fork":false,"pushed_at":"2026-06-04T07:05:06.000Z","size":137,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-04T09:05:16.433Z","etag":null,"topics":["cli","command-runner","executor","go","live-ui","parallel","shell","single-binary","task-runner","unix-socket"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sgaunet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"sgaunet"}},"created_at":"2026-05-27T19:06:04.000Z","updated_at":"2026-06-04T07:04:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sgaunet/runq","commit_stats":null,"previous_names":["sgaunet/runq"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sgaunet/runq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgaunet%2Frunq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgaunet%2Frunq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgaunet%2Frunq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgaunet%2Frunq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgaunet","download_url":"https://codeload.github.com/sgaunet/runq/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgaunet%2Frunq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35024385,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","command-runner","executor","go","live-ui","parallel","shell","single-binary","task-runner","unix-socket"],"created_at":"2026-07-01T22:04:29.990Z","updated_at":"2026-07-01T22:04:31.153Z","avatar_url":"https://github.com/sgaunet.png","language":"Go","funding_links":["https://github.com/sponsors/sgaunet"],"categories":[],"sub_categories":[],"readme":"# runq\n\n`runq` is a small, single-binary Go CLI for running many shell or argv commands\nin parallel, with a live per-command bullet UI, a configurable concurrency cap\n(default 10), and an implicit local Unix socket that lets a second `runq`\ninvocation forward extra commands into the running instance.\n\n## Install\n\n```bash\ngo install github.com/sgaunet/runq/cmd/runq@latest\n```\n\n## Quickstart\n\nSee [specs/001-parallel-cmd-runner/quickstart.md](specs/001-parallel-cmd-runner/quickstart.md).\n\n## Serve (persistent listener)\n\nBy default a `runq` run exits as soon as its queue drains. For a long-lived\ntarget you can feed over time, use `runq serve`: it binds the per-user socket,\n**stays alive while idle**, and runs whatever later `runq` invocations forward\ninto it.\n\n```bash\n# terminal A — start the listener (stays up until you stop it)\nrunq serve\n\n# terminal B — forward commands into it, any time, from any shell\nrunq 'make build' 'make test'\nrunq './deploy.sh staging'\n```\n\nStopping (graceful shutdown):\n\n- **Ctrl+C / SIGTERM** — stop accepting new submissions, send `SIGTERM` to\n  in-flight commands, wait up to `--kill-grace` (default 5s), then `SIGKILL`\n  any stragglers and exit.\n- **second Ctrl+C** — force: `SIGKILL` remaining children immediately.\n- **`runq stop`** — same graceful shutdown, for a `serve` running under a\n  supervisor with no controlling terminal.\n\n`serve` takes no commands of its own — forward them with plain `runq`. All of a\nsession's per-command logs land under a single run directory (see\n[Logs](#logs)). Exit codes: `0` when stopped while idle, `10` when stopped with\nwork in flight or queued, `12` if another instance already owns the socket.\nSee `runq serve --help` for the full contract.\n\n## Logs\n\n`runq` writes **one log file per command** into a per-run directory under the\nXDG state directory:\n\n```text\n$XDG_STATE_HOME/runq/logs/\u003crun-ts\u003e_run-\u003crand\u003e/\u003ccmd-ts\u003e_\u003cslug\u003e_\u003cid\u003e.log\n# default base: ~/.local/state/runq/logs\n```\n\nThe base directory is created on demand and is overridable with `--log-dir` or\n`RUNQ_LOG_DIR`. Each file name encodes when the command ran, what it was, and a\nunique id:\n\n- `\u003ccmd-ts\u003e` / `\u003crun-ts\u003e` — local-time `YYYYMMDD-HHMMSS` (files sort\n  chronologically).\n- `\u003cslug\u003e` — the full command text, lowercased and reduced to a\n  filesystem-safe form (`sleep 50` → `sleep-50`, truncated if very long).\n- `\u003cid\u003e` — a short random hex token, so identical commands run in parallel or\n  repeated across runs never collide.\n\nEach file holds a single framed record:\n\n```text\n=== begin \u003cid\u003e · \u003ciso8601-start\u003e · \"\u003ccommand-text\u003e\" · src=\u003csource\u003e ===\n\u003ccommand's stdout and stderr, interleaved in arrival order, verbatim\u003e\n=== end   \u003cid\u003e · \u003ciso8601-end\u003e   · exit=\u003coutcome\u003e · dur=\u003cduration\u003e ===\n```\n\n- `\u003cid\u003e` (in the header) — the stable per-run identifier (`c-0001`, …).\n- `\u003ciso8601\u003e` — RFC3339 with nanoseconds, in **UTC** (the file *name* uses\n  local time; the header is UTC by design).\n- `\u003ccommand-text\u003e` — the command as executed, rendered with Go's `%q`.\n- `\u003csource\u003e` — `cli`, `file`, `stdin`, or `socket` (the latter for commands\n  forwarded by a second `runq` invocation).\n- `\u003coutcome\u003e` — `0` on success, the numeric exit code on failure, or one of\n  `signal-N`, `cancelled`, `timed-out`, `spawn-error`.\n- `\u003cduration\u003e` — Go `time.Duration` between started and ended.\n\nBecause each command owns its file, output streams straight to disk and no\ncross-command byte interleaving is possible. Reading one command's output is\njust `cat`:\n\n```bash\ncat ~/.local/state/runq/logs/\u003crun\u003e/\u003ccmd-ts\u003e_\u003cslug\u003e_\u003cid\u003e.log\n```\n\nList a run's failures:\n\n```bash\ngrep -L 'exit=0 ' ~/.local/state/runq/logs/\u003crun\u003e/*.log\n```\n\nThere is **no built-in size cap** and runq never deletes or rotates old logs.\nManage disk usage by pruning old run directories yourself (e.g. via `find` or\n`logrotate`).\n\n\u003e **Changed in v0.x (breaking):** earlier versions wrote a single combined\n\u003e `cli-executed.log` in the working directory via `--log`/`RUNQ_LOG`. That file\n\u003e and those flags are gone; use the per-command files under `--log-dir` /\n\u003e `RUNQ_LOG_DIR` instead.\n\n## Principles\n\nThis project follows the principles in\n[.specify/memory/constitution.md](.specify/memory/constitution.md):\n\n- Single-purpose static binary, no runtime dependencies.\n- Idiomatic Go: thin CLI wrappers, logic in plain packages.\n- Strict CLI UX contract: `stdout` is data, `stderr` is humans, documented\n  exit codes, `NO_COLOR`, config precedence (flags \u003e env \u003e defaults).\n- Reliability: context-aware cancellation, bounded I/O, no orphaned children.\n- Tested releases: unit + binary-level integration tests, goreleaser, SBOM.\n\n## License\n\nSee [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgaunet%2Frunq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgaunet%2Frunq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgaunet%2Frunq/lists"}