mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-16 13:03:31 +08:00
- Slim down README from ~400 lines to ~140 lines, keeping only essential content - Reorganize docs/ into guide/, features/, reference/, images/ subdirectories - Add GitHub badges (stars, forks, issues, PRs, license, language switch) - Extract env vars, FAQ, fixes, project structure, global usage into separate docs - Add LICENSE file (educational and research use only) - Update all cross-references and issue template links
42 lines
974 B
Markdown
42 lines
974 B
Markdown
# Global Usage (Run from Any Directory)
|
|
|
|
<p align="right"><a href="./global-usage.md">中文</a> | <a href="../../README.en.md">Back to README</a></p>
|
|
|
|
If you want to run `claude-haha` directly from any project directory, set up one of the following. Once configured, `claude-haha` will automatically recognize your current working directory.
|
|
|
|
## macOS / Linux
|
|
|
|
Add to `~/.bashrc` or `~/.zshrc`:
|
|
|
|
```bash
|
|
# Option 1: Add to PATH (recommended)
|
|
export PATH="$HOME/path/to/claude-code-haha/bin:$PATH"
|
|
|
|
# Option 2: Alias
|
|
alias claude-haha="$HOME/path/to/claude-code-haha/bin/claude-haha"
|
|
```
|
|
|
|
Then reload the config:
|
|
|
|
```bash
|
|
source ~/.bashrc # or source ~/.zshrc
|
|
```
|
|
|
|
## Windows (Git Bash)
|
|
|
|
Add to `~/.bashrc`:
|
|
|
|
```bash
|
|
export PATH="$HOME/path/to/claude-code-haha/bin:$PATH"
|
|
```
|
|
|
|
## Verify
|
|
|
|
After setup, navigate to any project directory and test:
|
|
|
|
```bash
|
|
cd ~/your-other-project
|
|
claude-haha
|
|
# Ask "What is the current directory?" — it should show ~/your-other-project
|
|
```
|