{"id":22222015,"url":"https://github.com/fabiospampinato/get-current-package","last_synced_at":"2025-07-27T16:32:16.682Z","repository":{"id":65784216,"uuid":"599757319","full_name":"fabiospampinato/get-current-package","owner":"fabiospampinato","description":"Get the package.json of the currently executing bin.","archived":false,"fork":false,"pushed_at":"2023-09-24T16:28:48.000Z","size":4,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-10T05:11:47.930Z","etag":null,"topics":["cli","current","get","package"],"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/fabiospampinato.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},"funding":{"github":"fabiospampinato","custom":"https://www.paypal.me/fabiospampinato"}},"created_at":"2023-02-09T20:20:33.000Z","updated_at":"2024-04-03T18:43:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"ca41c55d-54ce-48b0-a90b-ad6494f26f35","html_url":"https://github.com/fabiospampinato/get-current-package","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"37add0763059cf4b0b2d67cb8757705d9c6a8317"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fget-current-package","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fget-current-package/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fget-current-package/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabiospampinato%2Fget-current-package/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabiospampinato","download_url":"https://codeload.github.com/fabiospampinato/get-current-package/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227817017,"owners_count":17824200,"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","current","get","package"],"created_at":"2024-12-02T23:16:32.604Z","updated_at":"2025-07-27T16:32:16.676Z","avatar_url":"https://github.com/fabiospampinato.png","language":"TypeScript","funding_links":["https://github.com/sponsors/fabiospampinato","https://www.paypal.me/fabiospampinato"],"categories":[],"sub_categories":[],"readme":"# Get Current Package\n\nGet the `package.json` of the currently executing bin.\n\nThis is meant to be used in combination with [`tiny-updater`](https://github.com/fabiospampinato/tiny-updater) or similar, in order to get the name and the version of the currently executing bin very conveniently, without importing a \"package.json\" and without hard-coding the values yourself.\n\n## Install\n\n```sh\nnpm install get-current-package\n```\n\n## Usage\n\nYou should have something like this in your bin app:\n\n```ts\nimport getCurrentPackage from 'get-current-package';\n\nconsole.log ( getCurrentPackage () );\n```\n\nThen executing the bin would produce this:\n\n```\n\u003e my-bin\n\u003c { name: 'my-bin', version: '1.0.0', ... }\n```\n\nBasically it detects which entrypoint file is being executed and retrieves its `package.json`.\n\n## License\n\nMIT © Fabio Spampinato\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiospampinato%2Fget-current-package","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabiospampinato%2Fget-current-package","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabiospampinato%2Fget-current-package/lists"}