{"id":13961565,"url":"https://github.com/jqnpm/jqnpm","last_synced_at":"2025-07-21T06:31:06.904Z","repository":{"id":25172387,"uuid":"28595466","full_name":"jqnpm/jqnpm","owner":"jqnpm","description":"A package manager built for the command-line JSON processor jq.","archived":true,"fork":false,"pushed_at":"2021-06-01T11:48:55.000Z","size":162,"stargazers_count":45,"open_issues_count":3,"forks_count":4,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-13T09:08:42.516Z","etag":null,"topics":["command-line-tool","data","data-processing","jq","json","package-manager"],"latest_commit_sha":null,"homepage":"https://joelpurra.com/projects/jqnpm/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jqnpm.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}},"created_at":"2014-12-29T14:53:16.000Z","updated_at":"2024-01-04T15:46:05.000Z","dependencies_parsed_at":"2022-07-11T06:46:50.318Z","dependency_job_id":null,"html_url":"https://github.com/jqnpm/jqnpm","commit_stats":null,"previous_names":["joelpurra/jqnpm"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/jqnpm/jqnpm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jqnpm%2Fjqnpm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jqnpm%2Fjqnpm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jqnpm%2Fjqnpm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jqnpm%2Fjqnpm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jqnpm","download_url":"https://codeload.github.com/jqnpm/jqnpm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jqnpm%2Fjqnpm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266253505,"owners_count":23900051,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["command-line-tool","data","data-processing","jq","json","package-manager"],"created_at":"2024-08-08T17:01:16.171Z","updated_at":"2025-07-21T06:31:06.286Z","avatar_url":"https://github.com/jqnpm.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/joelpurra/jqnpm\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/joelpurra/jqnpm/master/resources/logotype/penrose-triangle.svg?sanitize=true\" alt=\"jqnpm logotype, a Penrose triangle\" width=\"100\" border=\"0\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# [jqnpm](https://github.com/joelpurra/jqnpm) -- [jq](https://stedolan.github.io/jq/) package manager\n\nA package manager built for the command-line JSON processor [`jq`](https://stedolan.github.io/jq/) as an example implementation. This is experimental software. [Want to contribute?](https://github.com/joelpurra/jqnpm/blob/master/CONTRIBUTE.md)\n\n\n\n\u003e ## ⚠️ This project has been archived\n\u003e\n\u003e No future updates are planned. Feel free to continue using it, but expect no support.\n\n\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/joelpurra/jqnpm/\"\u003e\n    \u003cimg src=\"https://cloud.githubusercontent.com/assets/1398544/5852881/aaefa09c-a21d-11e4-9e7b-7c2c5574e0b6.gif\" alt=\"jqnpm in action\" border=\"0\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\n- Uses only namespaced packages, for example `jqnpm install joelpurra/jq-stress`, on github.com by default; the example package would automatically be cloned from [`github.com/joelpurra/jq-stress`](https://github.com/joelpurra/jq-stress).\n- Uses strict [semantic versioning](https://semver.org/) tags.\n- Use the [packages in the `jqnpm` wiki](https://github.com/joelpurra/jqnpm/wiki) - it's easy to [create and publish a package of your own](https://github.com/joelpurra/jqnpm#creating-a-package). Share your code! \u0026#x1f493;\n\n\n\n## Installation\n\n**On Mac with [Homebrew](https://brew.sh/)**\n\n```bash\n# NOTE: if homebrew-core's jq was installed previously.\nbrew unlink jq\n\n# NOTE: due to brew formula issues, this always installs a forked jq with package-root support.\nbrew install joelpurra/joelpurra/jqnpm\n```\n\n**On other systems**\n\n- Clone or download, then symlink `src/jqnpm`. There is no build step.\n- Requirements: [jq](https://stedolan.github.io/jq/) 1.5+, [bash](https://www.gnu.org/software/bash/) 4+, [git](https://git-scm.com/), [shUnit2](https://github.com/kward/shunit2).\n\n\n**Compatibility with `jq`**\n\n- `jqnpm` was tested with jq-1.5, which is [not yet *fully* compatible with `jqnpm`](https://github.com/joelpurra/jqnpm/blob/master/CONTRIBUTE.md#requirements-for-the-jq-binary).\n- For example deep package resolution doesn't work with plain `jq`. Without this feature, every dependency has to be installed in the package root.\n- See also the [`jqnpm`'s `package-root` fork of `jq`](https://github.com/joelpurra/jq/tree/package-root), which fixes these issues.\n- The easiest way to get both is to use `brew` to unlink both `jq` and `jqnpm`, then install the `jqnpm --devel` version which installs the patched versions.\n\n```bash\nbrew tap joelpurra/joelpurra\nbrew unlink jqnpm\nbrew unlink jq\nbrew install jqnpm --devel\n```\n\n\n## Usage\n\n\n```bash\njqnpm help\n```\n\n\n**Example 1**\n\nThese are the extended steps from the demo animation above.\n\n```shell\n# Your new project folder.\nmkdir my-project\ncd my-project/\n\n# Create 'jq.json', 'jq/main.jq', the local '.jq/' folder.\njqnpm init\n\n# Fetch package from github, installs it into '.jq/packages/'.\njqnpm install joelpurra/jq-stress\n\n# Edit your 'jq/main.jq' file with your code.\necho 'import \"joelpurra/jq-stress\" as Stress; Stress::remove(\"e\")' \u003e jq/main.jq\n\n# 'jqnpm execute' is a wrapper around jq, which also loads dependencies managed by jqnpm.\n# **'jqnpm execute' is a workaround until plain jq is up to speed.**\necho '\"Hey there!\"' | jqnpm execute\n```\n\n**Example 2**\n\nExample `jq/main.jq` combining two other packages; `jqnpm install joelpurra/jq-zeros \u0026\u0026 jqnpm install joelpurra/jq-dry`.\n\n```jq\nimport \"joelpurra/jq-zeros\" as Zeros;\nimport \"joelpurra/jq-dry\" as DRY;\n\ndef fib($n):\n    [ 0, 1 ]\n    | DRY::repeat(\n        $n;\n        [\n            .[1],\n            (\n                .[0]\n                + .[1]\n            )\n        ]\n    )\n    | .[0];\n\n# Get the eighth Fibonacci number, pad it to four (integer) digits.\nfib(8)\n| Zeros::pad(4; 0)\n```\n\nAs this example doesn't expect to read any JSON data, execute it with `--null-input`/`-n` as you normally would with `jq`.\n\n```shell\njqnpm execute --null-input\n```\n\n\n\n## Creating a package\n\nHow to create a package of your own, using `jqnpm generate`. Share your code! \u0026#x1f493;\n\n\n**Guidelines**\n\n- The smaller package scope the better - it improves reusability through modularity.\n- One piece of functionality per package -- *each package does only one thing, but does it well*.\n- The [new github repository](https://github.com/new) name should start with `jq-`, be all lowercase and words are separated by dashes: `jq-good-tool`. The `jq-` prefix is to make it easier for others to see which of your repositories are jq packages.\n- The jq package name is written in `jq.json`. It is all lowercase and words are separated by dashes: `good-tool`. Note that there is no `jq-` prefix, as `jq.json` already knows it's package for jq.\n- Author information, software license and project links are written in `jq.json`.\n\n\n**Steps**\n\n1. Create a [new github repository](https://github.com/new):\n  - Choose a name starting with `jq-`, similar to `jq-good-tool`.\n  - Choose the MIT license if you don't have any other preference.\n1. On your computer, run `jqnpm generate \u003cgithub username\u003e \u003cpackage name\u003e \"\u003cone sentence to describe the package\u003e\"`:\n  - `\u003cgithub username\u003e` should be obvious.\n  - `\u003cpackage name\u003e` is the same as the git hub repository you just created, for example `jq-good-tool`.\n  - `\"\u003cone sentence to describe the package\u003e\"` is something snappy, like `\"This tool solves the worlds problems and can, contrary to a knife, only be used for good!\"`\n1. Push the code to github:\n  - `git commit`\n  - `git push`\n  - `git tag -a v0.1.0 -m v0.1.0 \u0026\u0026 git push origin v0.1.0` (assuming your package version is `0.1.0`.)\n1. Tell the world about it!\n\n\n\n---\n\n\n\n## License\n\nCopyright (c) 2014, 2015, [Joel Purra](https://joelpurra.com/). All rights reserved.\n\nWhen using [**jqnpm**](https://github.com/joelpurra/jqnpm), comply to at least one of the three available licenses: BSD, MIT, GPL. Please see the LICENSE file for details.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjqnpm%2Fjqnpm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjqnpm%2Fjqnpm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjqnpm%2Fjqnpm/lists"}