https://github.com/azlanibrahim1/hookcn
A CLI tool that instantly copies React hooks into your codebase.
https://github.com/azlanibrahim1/hookcn
cli cli-hooks collaborate ghdesktop github hookcn react-hooks student-vscode
Last synced: 7 months ago
JSON representation
A CLI tool that instantly copies React hooks into your codebase.
- Host: GitHub
- URL: https://github.com/azlanibrahim1/hookcn
- Owner: azlanibrahim1
- License: mit
- Created: 2025-04-21T17:21:54.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-04-23T17:20:31.000Z (9 months ago)
- Last Synced: 2025-06-05T14:04:55.419Z (8 months ago)
- Topics: cli, cli-hooks, collaborate, ghdesktop, github, hookcn, react-hooks, student-vscode
- Language: TypeScript
- Homepage: https://azlanibrahim.gitbook.io/hookcn
- Size: 61.5 KB
- Stars: 20
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# hookcn β All your hooks in one command
A CLI tool that instantly copies React hooks into your codebase.




> **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.
## π Getting Started
Install the CLI globally:
```bash
npm install -g hookcn
```
> [!TIP]
> You can then run commands using `hookcn`, `hcn`, or `use-hook-cli`.
## βοΈ Setup
### Step 1: Initialize the Config
```bash
npx hookcn init
```
This creates a `hooks.json` file at your project root:
```json
{
"destination": "src/hooks"
}
```
This tells the CLI where to place downloaded hooks. You can update it anytime.
### Step 2: Add a Hook
List available hooks from the registry:
```bash
npx hookcn list
```
Install a hook by name:
```bash
npx hookcn add
```
The hook will be copied into the directory defined in `hooks.json` (default: `src/hooks/`).
> [!TIP]
> Now, you can install multiple hooks using a single command.
```bash
npx hookcn add useTheme useScroll useCopyToClipboard [more...]
```
## π Documentation
Every hook comes with a markdown file inside the `docs/` folder.
You can also explore all available hooks and their documentation online on [Gitbook](https://azlanibrahim.gitbook.io/hookcn/).
## π€ Contributing
Contributions are always welcome β whether itβs new hooks, CLI improvements, or documentation fixes.
Refer to this guide [CONTRIBUTING.md](CONTRIBUTING.md) for more details.