{"id":13469566,"url":"https://github.com/ranyitz/qnm","last_synced_at":"2025-05-13T21:09:06.688Z","repository":{"id":37599543,"uuid":"124037783","full_name":"ranyitz/qnm","owner":"ranyitz","description":":mag: cli utility for querying the node_modules directory","archived":false,"fork":false,"pushed_at":"2025-01-07T08:34:20.000Z","size":2487,"stargazers_count":1931,"open_issues_count":21,"forks_count":33,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-28T13:59:40.865Z","etag":null,"topics":["cli","javascript","nodejs","npm","typescript","yarn"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/ranyitz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2018-03-06T07:22:10.000Z","updated_at":"2025-04-15T13:19:21.000Z","dependencies_parsed_at":"2024-06-20T23:23:08.798Z","dependency_job_id":"87e456fb-2cff-40d9-a3ee-189bcad44bb0","html_url":"https://github.com/ranyitz/qnm","commit_stats":{"total_commits":262,"total_committers":15,"mean_commits":"17.466666666666665","dds":0.1297709923664122,"last_synced_commit":"5a8885a544b3962397a7ea975537d8beef07d608"},"previous_names":[],"tags_count":60,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranyitz%2Fqnm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranyitz%2Fqnm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranyitz%2Fqnm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranyitz%2Fqnm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ranyitz","download_url":"https://codeload.github.com/ranyitz/qnm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254028991,"owners_count":22002283,"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":["cli","javascript","nodejs","npm","typescript","yarn"],"created_at":"2024-07-31T15:01:45.095Z","updated_at":"2025-05-13T21:09:01.670Z","avatar_url":"https://github.com/ranyitz.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://gist.githubusercontent.com/ranyitz/ede5da04d74ccd9d40fc8a804d9a7a1a/raw/644d69caaa3145ede932a67c86b27f1c051eb3c6/qnm-logo.svg\" alt=\"qnm-logo\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e:mag: A simple cli utility for querying the \u003ccode\u003enode_modules\u003c/code\u003e directory\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://circleci.com/gh/ranyitz/qnm\"\u003e\n   \u003cimg src=\"https://img.shields.io/circleci/build/github/ranyitz/qnm?token=44b1fb1aa4b5bd58b977bda99d94d1be137ecbc3\u0026style=for-the-badge\" alt=\"Build Status\" /\u003e\n  \u003c/a\u003e\n  \u003ca aria-label=\"NPM version\" href=\"https://www.npmjs.com/package/qnm\"\u003e\n    \u003cimg alt=\"NPM version\" src=\"https://img.shields.io/npm/v/qnm.svg?style=for-the-badge\"\u003e\n  \u003c/a\u003e\n  \u003ca aria-label=\"License\" href=\"https://github.com/ranyitz/qnm/blob/master/LICENSE\"\u003e\n    \u003cimg alt=\"License\" src=\"https://img.shields.io/npm/l/qnm.svg?style=for-the-badge\"\u003e\n  \u003c/a\u003e\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://user-images.githubusercontent.com/11733036/138602697-29b9f00b-b35b-4db6-9005-e2bba7bd9398.png\" alt=\"qnm-help\" /\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n## Why?\n\n\u003e most bugs are caused by the assumptions we didn't realize we were making.\n\nI often need to quickly check the versions of the modules installed in the `node_modules` directory. Current solutions like running `npm list` are slow and produce a lot of irrelevant output. Checking the version in the `package.json` file of the specific module requires more effort and doesn’t provide information about other instances of the same module.\n\n_qnm_ is a tool that solves this problem by providing fast and focused information about the installed modules. It supports both `npm` and `yarn` and allows you to quickly identify the versions of the modules you are interested in.\n\n## Features\n\n- :sparkles: Interactive fuzzy-search\n- :abc: Match all packages with a specific string\n- :interrobang: Explain why a package was installed\n- :books: Supports monorepos\n- :clock12: Show when a version was release and what is the latest version\n\n## Usage\n\n\u003e You can use bunx/npx to run qnm, the docs use bunx because it's the fastest way\n\n```bash\nbunx qnm [module]\n```\n\nFor example, if you want to see the installed versions of `lodash`:\n\n```bash\nbunx qnm lodash\n```\n\nAnd you'll see something like that:\n\n```bash\nlodash 4.17.21 ↰ 2 days ago\n├── 4.17.21 ✓\n├─┬ cli-table2\n│ └── 3.10.1 ⇡ 1 year ago\n└─┬ karma\n  └── 3.10.1 ⇡ 1 year ago\n```\n\nWhich means you have 3 occurrences of lodash in your `node_modules`:\n\n1.  `./node_module/lodash`\n2.  `./node_module/cli-table2/node_modules/lodash`\n3.  `./node_module/karma/node_modules/lodash`\n\n- The latest version of lodash is 4.17.21, it was published 2 days ago.\n- The other 2 occurrences of lodash (3.10.1) were released a year ago.\n\n### Fuzzy-search\n\n\u003cimg src=\"./assets/fuzzy-search.gif\" alt=\"fuzzy-search\" width=\"400px\" height=\"400px\" /\u003e\n\nUse `qnm` command without arguments to trigger an [`fzf`](https://github.com/junegunn/fzf) like fuzzy search.\n\n- Start typing to filter the matches from your `node_modules`\n- Use arrows to move cursor up and down\n- `Enter` key to select the item, `CTRL-C` / `ESC` to exit\n- `TAB` and `Shift-TAB` to mark multiple items\n\n## Options\n\n### --no-remote\n\ndo not fetch remote data from npm, use this if you want qnm to run faster. qnm will show limited view.\n\n### -o , --open\n\nOpen the module's `package.json` file with the default editor.\n\n### -d, --debug\n\nSee full error messages, mostly for debugging.\n\n### --disable-colors\n\nDisables the most of colors and styling. E.g. version colors.\n\n## Commands\n\n### doctor\n\n\u003e experimental\n\nShows the heaviest modules in your `node_modules`. Helpful if you want to understand what's taking the most space on your `node_modules` directory.\n\n```bash\nbunx qnm doctor\n```\n\nsort the modules based on the amount of duplications they have in your `node_modules`.\n\n```bash\nbunx qnm doctor --sort duplicates\n```\n\n![image](https://user-images.githubusercontent.com/11733036/149247765-74247703-a7ce-4476-9b2e-7be31d4d672e.png)\n\n### list\n\n\u003e alias: ls\n\nReturns a list of all modules in node_modules directory.\n\n```bash\nbunx qnm list\n```\n\n| Optional arguments |                                       Description                                       |\n| ------------------ | :-------------------------------------------------------------------------------------: |\n| `--deps`           |              List the versions of direct dependencies and devDependencies.              |\n| `--remote`         | Fetch remote data, this may be very slow for many packages due to many network requests |\n\n### match\n\nWorks like grep, and match's any module that includes the supplied string.\n\nFor example, i want to see which eslint plugins i have installed:\n\n```bash\n\u003e bunx qnm match eslint-plug\n\neslint-plugin-babel\n└── 3.3.0\n\neslint-plugin-lodash\n└── 2.6.1\n\neslint-plugin-mocha\n└── 4.12.1\n\neslint-plugin-react\n└── 6.10.3\n```\n\n| Optional arguments |                                       Description                                       |\n| ------------------ | :-------------------------------------------------------------------------------------: |\n| `--remote`         | Fetch remote data, this may be very slow for many packages due to many network requests |\n\n### homepage\n\nOpens package \"homepage\" property in your browser.\n\n## Contributing\n\nHelp is always welcome! Please head to the [CONTRIBUTING.md](./CONTRIBUTING.md) file to see how to get started.\n\n## License\n\nThe MIT License\n\n## Installation\n\n\u003e while qnm used to be installed globally, it's recommended to use `npx`/`bunx` to run it, it's just much faster.\n\nIf you prefer the global installation, you can do it with:\n\n```bash\nnpm i --global qnm\n```\n","funding_links":[],"categories":["TypeScript","cli","typescript","Uncategorized","Command-line"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franyitz%2Fqnm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Franyitz%2Fqnm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franyitz%2Fqnm/lists"}