{"id":13483894,"url":"https://github.com/typicode/pinst","last_synced_at":"2025-04-13T00:48:00.430Z","repository":{"id":32561389,"uuid":"136545947","full_name":"typicode/pinst","owner":"typicode","description":"🍺 dev only postinstall hooks (package.json)","archived":false,"fork":false,"pushed_at":"2023-03-04T02:55:58.000Z","size":438,"stargazers_count":261,"open_issues_count":4,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T00:47:48.429Z","etag":null,"topics":["dev","hook","hooks","npm","pnpm","postinstall","production","yarn"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/typicode.png","metadata":{"files":{"readme":"README.md","changelog":null,"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},"funding":{"github":"typicode"}},"created_at":"2018-06-08T00:34:40.000Z","updated_at":"2025-03-08T21:00:56.000Z","dependencies_parsed_at":"2023-01-14T21:35:43.767Z","dependency_job_id":null,"html_url":"https://github.com/typicode/pinst","commit_stats":{"total_commits":60,"total_committers":2,"mean_commits":30.0,"dds":0.09999999999999998,"last_synced_commit":"d817196fc86c9ab569ea49aeb216e73318d3f2e9"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typicode%2Fpinst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typicode%2Fpinst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typicode%2Fpinst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typicode%2Fpinst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typicode","download_url":"https://codeload.github.com/typicode/pinst/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650437,"owners_count":21139672,"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":["dev","hook","hooks","npm","pnpm","postinstall","production","yarn"],"created_at":"2024-07-31T17:01:16.583Z","updated_at":"2025-04-13T00:48:00.409Z","avatar_url":"https://github.com/typicode.png","language":"JavaScript","readme":"# pinst [![Node.js CI](https://github.com/typicode/pinst/workflows/Node.js%20CI/badge.svg)](https://github.com/typicode/pinst/actions) [![npm](https://img.shields.io/npm/v/pinst.svg)](https://www.npmjs.com/package/pinst)\n\n\u003e `pinst` lets you have `postinstall` hook that runs only in dev 🍺\n\n__Important__ if your project is using npm or pnpm, you can achieve the desired effect by setting a `prepare` hook instead. `pinst` is mainly useful for Yarn 2+ since it doesn't support `prepare` hook. See https://yarnpkg.com/advanced/lifecycle-scripts\n\n## Usage\n\n```js\n// package.json\n{\n  \"scripts\": {\n    \"postinstall\": \"\u003csome dev only command\u003e\",\n    \"prepack\": \"pinst --disable\",\n    \"postpack\": \"pinst --enable\"\n  }\n}\n```\n\n_On `prepack`, `postinstall` will be renamed to `_postinstall` (disabled)_\n\n_On `postpack`, it will be renamed back to `postinstall` (enabled)_\n\n## CLI\n\n`pinst` accepts the following flags:\n\n```\n--enable, -e   Enable postinstall hook\n--disable, -d  Disable postinstall hook\n--silent, -s\n```\n\n## Tips\n\nBy inverting commands, you can also use `pinst` to enable `postinstall` for your users only and not yourself.\n\n`pinst` also supports `install` alias.\n\n## License\n\nMIT - [Typicode :cactus:](https://github.com/typicode)\n","funding_links":["https://github.com/sponsors/typicode"],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypicode%2Fpinst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypicode%2Fpinst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypicode%2Fpinst/lists"}