{"id":28234316,"url":"https://github.com/azlanibrahim1/hookcn","last_synced_at":"2025-06-12T21:30:49.298Z","repository":{"id":289129066,"uuid":"970226632","full_name":"azlanibrahim1/hookcn","owner":"azlanibrahim1","description":"A CLI tool that instantly copies React hooks into your codebase.","archived":false,"fork":false,"pushed_at":"2025-04-23T17:20:31.000Z","size":63,"stargazers_count":20,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T14:04:55.419Z","etag":null,"topics":["cli","cli-hooks","collaborate","ghdesktop","github","hookcn","react-hooks","student-vscode"],"latest_commit_sha":null,"homepage":"https://azlanibrahim.gitbook.io/hookcn","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/azlanibrahim1.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["azlanibrahim1"]}},"created_at":"2025-04-21T17:21:54.000Z","updated_at":"2025-05-20T05:41:34.000Z","dependencies_parsed_at":"2025-04-22T03:32:14.712Z","dependency_job_id":null,"html_url":"https://github.com/azlanibrahim1/hookcn","commit_stats":null,"previous_names":["azlanibrahim1/hookcn"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/azlanibrahim1/hookcn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azlanibrahim1%2Fhookcn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azlanibrahim1%2Fhookcn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azlanibrahim1%2Fhookcn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azlanibrahim1%2Fhookcn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azlanibrahim1","download_url":"https://codeload.github.com/azlanibrahim1/hookcn/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azlanibrahim1%2Fhookcn/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259533608,"owners_count":22872423,"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","cli-hooks","collaborate","ghdesktop","github","hookcn","react-hooks","student-vscode"],"created_at":"2025-05-18T22:13:31.419Z","updated_at":"2025-06-12T21:30:49.287Z","avatar_url":"https://github.com/azlanibrahim1.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n\n# hookcn — All your hooks in one command\n\nA CLI tool that instantly copies React hooks into your codebase.\n\n![npm version](https://img.shields.io/npm/v/hookcn.svg)\n![downloads](https://img.shields.io/npm/dm/hookcn)\n![license](https://img.shields.io/npm/l/hookcn)\n\n\u003cbr /\u003e\n\n![Cover Image](https://github.com/user-attachments/assets/f59f8103-d669-4478-9505-97566d424aad)\n\n\u003c/div\u003e\n\n\u003e **hookcn** started as a personal tool. Now it’s open for everyone. It lets you copy TypeScript React hooks directly into your codebase — no dependencies, full ownership.\n\n\u003cbr\u003e\n\n## 🛠 Getting Started\n\nInstall the CLI globally:\n\n```bash\nnpm install -g hookcn\n```\n\n\u003e [!TIP]\n\u003e You can then run commands using `hookcn`, `hcn`, or `use-hook-cli`.\n\n## ⚙️ Setup\n\n### Step 1: Initialize the Config\n\n```bash\nnpx hookcn init\n```\n\nThis creates a `hooks.json` file at your project root:\n\n```json\n{\n  \"destination\": \"src/hooks\"\n}\n```\n\nThis tells the CLI where to place downloaded hooks. You can update it anytime.\n\n### Step 2: Add a Hook\n\nList available hooks from the registry:\n\n```bash\nnpx hookcn list\n```\n\nInstall a hook by name:\n\n```bash\nnpx hookcn add \u003chook-name\u003e\n```\n\nThe hook will be copied into the directory defined in `hooks.json` (default: `src/hooks/`).\n\n\u003e [!TIP]\n\u003e Now, you can install multiple hooks using a single command.\n\n```bash\nnpx hookcn add useTheme useScroll useCopyToClipboard [more...]\n```\n\n\u003cbr\u003e\n\n## 📚 Documentation\n\nEvery hook comes with a markdown file inside the `docs/` folder.\n\nYou can also explore all available hooks and their documentation online on [Gitbook](https://azlanibrahim.gitbook.io/hookcn/).\n\n## 🤝 Contributing\n\nContributions are always welcome — whether it’s new hooks, CLI improvements, or documentation fixes.\n\nRefer to this guide [CONTRIBUTING.md](CONTRIBUTING.md) for more details.\n","funding_links":["https://github.com/sponsors/azlanibrahim1"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazlanibrahim1%2Fhookcn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazlanibrahim1%2Fhookcn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazlanibrahim1%2Fhookcn/lists"}