{"id":29947740,"url":"https://github.com/teneplaysofficial/cli-update-notifier","last_synced_at":"2025-08-03T07:11:07.691Z","repository":{"id":304004588,"uuid":"1011750312","full_name":"TenEplaysOfficial/cli-update-notifier","owner":"TenEplaysOfficial","description":"Notify users of CLI updates","archived":false,"fork":false,"pushed_at":"2025-07-10T15:40:59.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-10T21:59:03.216Z","etag":null,"topics":["cli","update-notifier","version-checker"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/cli-update-notifier","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/TenEplaysOfficial.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,"zenodo":null}},"created_at":"2025-07-01T09:33:45.000Z","updated_at":"2025-07-10T15:41:02.000Z","dependencies_parsed_at":"2025-07-10T21:59:09.924Z","dependency_job_id":"b2a5b5ab-eee3-49ae-bac5-b206d0ad387c","html_url":"https://github.com/TenEplaysOfficial/cli-update-notifier","commit_stats":null,"previous_names":["teneplaysofficial/cli-update-notifier"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/TenEplaysOfficial/cli-update-notifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TenEplaysOfficial%2Fcli-update-notifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TenEplaysOfficial%2Fcli-update-notifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TenEplaysOfficial%2Fcli-update-notifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TenEplaysOfficial%2Fcli-update-notifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TenEplaysOfficial","download_url":"https://codeload.github.com/TenEplaysOfficial/cli-update-notifier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TenEplaysOfficial%2Fcli-update-notifier/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268507842,"owners_count":24261331,"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-08-03T02:00:12.545Z","response_time":2577,"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":["cli","update-notifier","version-checker"],"created_at":"2025-08-03T07:10:37.163Z","updated_at":"2025-08-03T07:11:07.684Z","avatar_url":"https://github.com/TenEplaysOfficial.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ecli-update-notifier\u003c/h1\u003e\r\n\r\n_Notify users of CLI updates_\r\n\r\n## Preview\r\n\r\n![Preview](https://github.com/tenelabs/assets/raw/main/cli-update-notifier/preview.png)\r\n\r\n## Install\r\n\r\n```sh\r\nnpm install cli-update-notifier\r\n# or\r\nyarn add cli-update-notifier\r\n```\r\n\r\n## Usage\r\n\r\n### Basic\r\n\r\n```js\r\nimport notify from \"cli-update-notifier\";\r\n\r\nawait notify(\"react\", \"18.2.0\");\r\n```\r\n\r\n### Using `package.json`\r\n\r\n```js\r\nimport notify from \"cli-update-notifier\";\r\nimport pkg from \"./package.json\";\r\n\r\nawait notify(pkg.name, pkg.version);\r\n```\r\n\r\n## API\r\n\r\n```ts\r\nnotify(\r\n  name: string,\r\n  currentVersion: string,\r\n  title?: string = \"Update Available\",\r\n  titleAlignment?: \"left\" | \"center\" | \"right\",\r\n  padding?: number = 1,\r\n  borderColor?: string = \"green\",\r\n): Promise\u003cvoid\u003e\r\n```\r\n\r\n### Parameters\r\n\r\n| Name             | Type                            | Default              | Description                      |\r\n| ---------------- | ------------------------------- | -------------------- | -------------------------------- |\r\n| `name`           | `string`                        | —                    | **(required)** NPM package name. |\r\n| `currentVersion` | `string`                        | —                    | **(required)** Your version.     |\r\n| `title`          | `string`                        | `\"Update Available\"` | Box header.                      |\r\n| `titleAlignment` | `\"left\" \\| \"center\" \\| \"right\"` | `\"center\"`           | Title text alignment.            |\r\n| `padding`        | `number`                        | `1`                  | Inner box padding.               |\r\n| `borderColor`    | `string`                        | `\"green\"`            | Boxen border color.              |\r\n\r\n## How It Works\r\n\r\n1. Detects package manager via `npm_config_user_agent`.\r\n2. Fetches `latest` version using `npm-metadata`.\r\n3. Compares with `currentVersion`. If identical, does nothing.\r\n4. Builds a formatted message of current and latest versions + update command.\r\n5. Outputs a styled box using `boxen` and `chalk`.\r\n\r\n## Example\r\n\r\n```js\r\nimport notify from \"cli-update-notifier\";\r\nimport { name, version } from \"./package.json\";\r\n\r\nawait notify(name, version);\r\n```\r\n\r\nWhen an update is found, users see:\r\n\r\n![Preview](https://github.com/tenelabs/assets/raw/main/cli-update-notifier/preview.png)\r\n\r\n## Supported Package Managers\r\n\r\nPackage manager is auto‑detected:\r\n\r\n- `npm`: `npm i -g \u003cname\u003e`\r\n- `yarn`: `yarn global add \u003cname\u003e`\r\n- `pnpm`: `pnpm add -g \u003cname\u003e`\r\n- `bun`: `bun add -g \u003cname\u003e`\r\n\r\n## Why Use This?\r\n\r\n- Lightweight and fast\r\n- Works with all major package managers\r\n- Stylish, clear CLI updates\r\n- Silent when no updates\r\n\r\n## Contributing\r\n\r\nContributions welcome! Please:\r\n\r\n1. Fork the repo\r\n2. Create a new branch (`git checkout -b feature/...`)\r\n3. Add tests or docs\r\n4. Submit a PR\r\n\r\n## License\r\n\r\nMIT License\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteneplaysofficial%2Fcli-update-notifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteneplaysofficial%2Fcli-update-notifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteneplaysofficial%2Fcli-update-notifier/lists"}