{"id":16756788,"url":"https://github.com/charmander/pqr","last_synced_at":"2026-03-05T03:33:12.898Z","repository":{"id":57648500,"uuid":"107540528","full_name":"charmander/pqr","owner":"charmander","description":"Runs package.json scripts without Node and npm overhead.","archived":false,"fork":false,"pushed_at":"2025-05-28T07:07:42.000Z","size":24,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-21T04:54:04.585Z","etag":null,"topics":["package-json"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/charmander.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2017-10-19T12:02:26.000Z","updated_at":"2025-05-28T07:07:46.000Z","dependencies_parsed_at":"2024-11-22T06:26:23.373Z","dependency_job_id":"d46b92a9-5074-40ca-80d8-ab7d0d81b0a3","html_url":"https://github.com/charmander/pqr","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/charmander/pqr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmander%2Fpqr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmander%2Fpqr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmander%2Fpqr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmander%2Fpqr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charmander","download_url":"https://codeload.github.com/charmander/pqr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charmander%2Fpqr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30108649,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T03:32:43.378Z","status":"ssl_error","status_checked_at":"2026-03-05T03:32:22.667Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["package-json"],"created_at":"2024-10-13T03:42:05.315Z","updated_at":"2026-03-05T03:33:12.868Z","avatar_url":"https://github.com/charmander.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"(**p**ackage **q**uick **r**un)\n\nRuns package.json scripts without Node and npm overhead.\n\n\u003e [!NOTE]\n\u003e If you have [Deno][] available, `deno task` can do this too.\n\n```shellsession\n$ time npm run echo test\n\n\u003e echo\n\u003e echo test\n\ntest\n\nreal    0m0.479s\nuser    0m0.249s\nsys     0m0.076s\n\n$ time pqr echo test\ntest\n\nreal    0m0.007s\nuser    0m0.001s\nsys     0m0.000s\n```\n\n\n## Installation\n\nA prebuilt executable is available for x86-64-v3 Linux on [the Releases page][github-releases]. You can:\n\n- audit the repository at the tagged version, then\n    - [reproduce the build](#reproducing-the-build)\n    - [verify GitHub’s attestation that GitHub Actions reproduced the build](#confirming-that-github-actions-reproduced-the-build)\n\n- [verify the author’s signature](#verifying-the-authors-signature)\n\nThen install the executable somewhere on your PATH, e.g. as root:\n\n```shell\ninstall -t /usr/local/bin/ ./pqr\nsha256sum --tag /usr/local/bin/pqr  # make sure it's still the same\n```\n\n\n## Intended incompatibilities with `npm run-script`\n\n### Notable\n\n- pqr runs only the specified script; npm [also runs scripts with `pre` and `post` prefixes][npm-pre-post] if they exist (as long as `ignore-scripts` is off). Use `[pqr prescript \u0026\u0026 ]pqr script[ \u0026\u0026 pqr postscript]` for compatibility.\n\n- pqr doesn’t support [workspaces][npm-workspaces] yet.\n\n- pqr runs the script with an unmodified environment; npm adds several of its own strings. (See `npm run-script env`.)\n\n- pqr requires `sh`; npm will use [`%ComSpec%` or `cmd` on Windows][npm-windows].\n\n- pqr doesn’t include npm’s `node-gyp-bin` in `PATH` (because it doesn’t require npm to exist); find the directory with `dirname \"$(npm run -- env which node-gyp)\"` and run \u003ccode\u003ePATH=\u003ci\u003enode-gyp-bin\u003c/i\u003e:$PATH pqr …\u003c/code\u003e for near-compatibility.\n\n- npm provides default definitions for:\n\n    - `env` (`env`)\n    - `start` when `server.js` exists (`node server.js`)\n    - `restart` (`npm stop --if-present \u0026\u0026 npm start`)\n\n    pqr doesn’t.\n\n### Niche\n\n- pqr rejects `package.json`s with duplicate definitions of the top-level `scripts` key or of individual scripts; npm uses the last definition of any key, like `JSON.parse`.\n\n- pqr uses the nearest `package.json` it finds along the current path (`./package.json`, `../package.json`, `../../package.json`, …). npm uses [a prefix consistent across all commands][npm-prefix]: the nearest directory containing either a `package.json` or a `node_modules` after first removing all `node_modules` components from the end of the current path.\n\n    This can only cause pqr to run a script in a situation where npm would have errored out.\n\n### Historical\n\n- pqr adds arguments to the end of script commands with `\"$@\"`; [npm double-quoted each argument after escaping only double quotes][npm-quoting] until version 7. (For example, `npm run-script script -- '\\\"; yes #'` would execute `yes`.)\n\n\n## Running nested scripts with pqr\n\nCreate an npm wrapper that delegates to pqr if its first argument is `run-script` or `run`, and the original npm otherwise; add it to your `PATH` before the original npm.\n\n\n## Verifying the prebuilt executable\n\n### Reproducing the build\n\n```shell\nzig version\n```\n\n\u003e 0.14.0\n\n```shell\nzig ld.lld --version\n```\n\n\u003e LLD 19.1.7 (compatible with GNU linkers)\n\n```shell\nzig build -Drelease -Dcpu=x86_64_v3\nobjcopy --remove-section=.comment zig-out/bin/pqr\nsha256sum --tag zig-out/bin/pqr\n```\n\n\u003e SHA256 (zig-out/bin/pqr) = *(same as prebuilt pqr)*\n\n### Confirming that GitHub Actions reproduced the build\n\nVerify GitHub’s attestation that the build was reproduced by GitHub Actions:\n\n```shell\ngh attestation verify \\\n    --signer-digest=\"$(git rev-parse HEAD)\" \\\n    --deny-self-hosted-runners \\\n    --source-digest=\"$(git rev-parse HEAD)\" \\\n    --repo=charmander/pqr \\\n    ./pqr\n```\n\n### Verifying the author’s signature\n\n1. Also download SHA256SUMS and SHA256SUMS.sig from the same release\n\n1. Verify the signature against [the author’s signing key][signing-key]:\n\n    ```shell\n    ssh-keygen -Y verify \\\n        -f allowed-signers \\\n        -n file \\\n        -I '~@charmander.me' \\\n        -s SHA256SUMS.sig \\\n        \u003cSHA256SUMS\n    ```\n\n    \u003e Good \"file\" signature for ~@charmander.me with …\n\n1. Check the comment in SHA256SUMS to ensure that the signed version is what the release page claims it is\n\n1. Check the hash:\n\n    ```shell\n    sha256sum -c SHA256SUMS\n    ```\n\n    \u003e pqr: OK\n\n\n[Deno]: https://deno.com/\n[github-releases]: https://github.com/charmander/pqr/releases\n[npm-pre-post]: https://github.com/npm/npm/blob/d081cc6c8d73f2aa698aab36605377c95e916224/lib/run-script.js#L158\n[npm-prefix]: https://github.com/npm/npm/blob/d081cc6c8d73f2aa698aab36605377c95e916224/lib/config/find-prefix.js\n[npm-quoting]: https://github.com/npm/cli/blob/1314dc07e8163099c993d5b0ec775bfef3bd80e0/lib/run-script.js#L182\n[npm-windows]: https://github.com/npm/npm/blob/d081cc6c8d73f2aa698aab36605377c95e916224/lib/utils/lifecycle.js#L237\n[npm-workspaces]: https://docs.npmjs.com/cli/v11/using-npm/workspaces\n[signing-key]: https://charmander.me/keys/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharmander%2Fpqr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharmander%2Fpqr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharmander%2Fpqr/lists"}