{"id":34675955,"url":"https://github.com/nguyenngoclongdev/pkgscan","last_synced_at":"2025-12-24T20:34:36.965Z","repository":{"id":175896371,"uuid":"650139149","full_name":"nguyenngoclongdev/pkgscan","owner":"nguyenngoclongdev","description":"Retrieve information on installed packages across npm, pnpm and yarn.","archived":false,"fork":false,"pushed_at":"2024-12-27T04:42:08.000Z","size":6522,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-09T13:32:15.304Z","etag":null,"topics":["find","installed","lockfiles","npm","package","package-manager","packages","pnpm","scan","search","yarn"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/pkgscan","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/nguyenngoclongdev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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},"funding":{"github":["nguyenngoclongdev"],"ko_fi":"nguyenngoclong"}},"created_at":"2023-06-06T12:26:32.000Z","updated_at":"2024-12-27T04:42:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"83193800-e198-4b6a-9b2a-f7f987e03c94","html_url":"https://github.com/nguyenngoclongdev/pkgscan","commit_stats":{"total_commits":94,"total_committers":3,"mean_commits":"31.333333333333332","dds":0.5638297872340425,"last_synced_commit":"a237aa9c2ce2559f7ee8636a6b8859bb4bae460d"},"previous_names":["nguyenngoclongdev/pkgscan"],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/nguyenngoclongdev/pkgscan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nguyenngoclongdev%2Fpkgscan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nguyenngoclongdev%2Fpkgscan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nguyenngoclongdev%2Fpkgscan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nguyenngoclongdev%2Fpkgscan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nguyenngoclongdev","download_url":"https://codeload.github.com/nguyenngoclongdev/pkgscan/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nguyenngoclongdev%2Fpkgscan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28008430,"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","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"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":["find","installed","lockfiles","npm","package","package-manager","packages","pnpm","scan","search","yarn"],"created_at":"2025-12-24T20:34:36.241Z","updated_at":"2025-12-24T20:34:36.961Z","avatar_url":"https://github.com/nguyenngoclongdev.png","language":"TypeScript","funding_links":["https://github.com/sponsors/nguyenngoclongdev","https://ko-fi.com/nguyenngoclong","https://patreon.com/nguyenngoclong","http://paypal.com/paypalme/longnguyenngoc"],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/nguyenngoclongdev/pkgscan/actions/workflows/ci.yml/badge.svg)](https://github.com/nguyenngoclongdev/pkgscan/actions/workflows/ci.yml)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/nguyenngoclongdev/pkgscan/)\n\n[![npm version](https://img.shields.io/npm/v/pkgscan.svg?style=flat-square)](https://www.npmjs.org/package/pkgscan)\n[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod\u0026style=flat-square)](https://gitpod.io/#https://github.com/nguyenngoclongdev/pkgscan)\n[![install size](https://img.shields.io/badge/dynamic/json?url=https://packagephobia.com/v2/api.json?p=pkgscan\u0026query=$.install.pretty\u0026label=install%20size\u0026style=flat-square)](https://packagephobia.now.sh/result?p=pkgscan)\n[![npm bundle size](https://img.shields.io/bundlephobia/minzip/pkgscan?style=flat-square)](https://bundlephobia.com/package/pkgscan@latest)\n[![npm downloads](https://img.shields.io/npm/dt/pkgscan.svg?style=flat-square)](https://npm-stat.com/charts.html?package=pkgscan)\n\n# pkgscan\n\n\u003cp align=\"center\"\u003e\n  \u003c!-- npm --\u003e\n  \u003ca href=\"https://www.npmjs.com\" target=\"_blank\"\u003e\n      \u003cimg src=\"https://img.shields.io/badge/npm-CB3837?logo=npm\u0026logoColor=fff\u0026style=for-the-badge\" alt=\"npm\"\u003e\n  \u003c/a\u003e\n  \u003c!-- yarn --\u003e\n  \u003ca href=\"https://yarnpkg.com\" target=\"_blank\"\u003e\n     \u003cimg src=\"https://img.shields.io/badge/Yarn-2C8EBB?logo=yarn\u0026logoColor=fff\u0026style=for-the-badge\" alt=\"yarn\"\u003e\n  \u003c/a\u003e\n    \u003c!-- pnpm --\u003e\n  \u003ca href=\"https://pnpm.io\" target=\"_blank\"\u003e\n     \u003cimg src=\"https://img.shields.io/badge/pnpm-F69220?logo=pnpm\u0026logoColor=fff\u0026style=for-the-badge\" alt=\"pnpm\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n`pkgscan` is a useful tool to inspect installed packages in your project. It provides detailed information about installed packages managed by popular package managers like `npm`, `pnpm` and `yarn`.\n\n![pkgscan](https://github.com/nguyenngoclongdev/pkgscan/raw/HEAD/images/demo.gif)\n\nIf you find this package useful for your projects, please consider supporting me by [Patreon](https://patreon.com/nguyenngoclong), [KO-FI](https://ko-fi.com/nguyenngoclong) or [Paypal](http://paypal.com/paypalme/longnguyenngoc). It's a great way to help me maintain and improve this tool in the future. Your support is truly appreciated!\n\n[![KO-FI](https://img.shields.io/badge/Ko--fi-F16061?style=for-the-badge\u0026logo=ko-fi\u0026logoColor=white)](https://ko-fi.com/nguyenngoclong)\n[![Paypal](https://img.shields.io/badge/PayPal-00457C?style=for-the-badge\u0026logo=paypal\u0026logoColor=white)](http://paypal.com/paypalme/longnguyenngoc)\n[![Patreon](https://img.shields.io/badge/Patreon-F96854?style=for-the-badge\u0026logo=patreon\u0026logoColor=white)](https://patreon.com/nguyenngoclong)\n\n## Installation\n\n**npm**\n\n```sh\n# Try with npx\nnpx pkgscan [options]\n\n# Locally in your project.\nnpm install pkgscan\n\n# Or globally (use as cli)\nnpm install -g pkgscan\n```\n\n## CLI\n\n### Usage\n\n```\npkgscan [options]\n\nOptions:\n  -p, --pkg    The name of the package to retrieve information for.\n  -c, --cwd    The current working directory of the project.\n  -h, --help   Show help\n```\n\n### Examples\n\n```sh\n# Get details about the installed package with automatic package manager detection.\npkgscan --pkg typescript\n\n# Get details about the installed package with glob pattern.\npkgscan --pkg '@types/*'\n\n# To scan all installed packages\npkgscan --pkg '*'\n\n# Get details about the installed package with a user-specified package manager.\npkgscan --pkg typescript --cwd ./project-directory-path\n```\n\n## API\n\n```typescript\nimport { getInstalledPackage } from 'pkgscan';\n\n// Get details about the installed package with automatic package manager detection.\nconst installedPackage = getInstalledPackage('typescript');\nconsole.log(installedPackage);\n/*\n[\n  {\n    name: 'typescript',\n    version: '5.1.3',\n    isDirectProjectDependency: true,\n    dev: true,\n    license: 'Apache-2.0',\n    engines: { node: '\u003e=14.17' }\n  }\n]\n*/\n\n// Get details about the installed package with a user-specified package manager.\nconst cwd = __dirname;\nconst installedPackage = getInstalledPackage('typescript', cwd);\nconsole.log(installedPackage);\n/*\n[\n  {\n    name: 'typescript',\n    version: '5.1.3',\n    isDirectProjectDependency: true,\n    dev: true,\n    license: 'Apache-2.0',\n    engines: { node: '\u003e=14.17' }\n  }\n]\n*/\n```\n\n\u003e `isDirectProjectDependency` used to determine whether a package is a direct dependency of a project or not. By using this variable, you can check whether a package is directly listed in the dependencies section of the project's package.json file or not.\n\n## Feedback\n\nIf you discover a bug, or have a suggestion for a feature request, please\nsubmit an [issue](https://github.com/nguyenngoclongdev/pkgscan/issues).\n\n## LICENSE\n\nThis extension is licensed under the [MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnguyenngoclongdev%2Fpkgscan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnguyenngoclongdev%2Fpkgscan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnguyenngoclongdev%2Fpkgscan/lists"}