feat: make /afk command and permission hook globally available

Changed from per-project to global installation by default, making
InnerVoice features available across all projects automatically.

Global Installation:
- /afk slash command now in ~/.claude/commands/afk.md
- Permission hook now in ~/.claude/hooks/PermissionRequest.sh
- Both work in ALL projects without per-project setup

Install Script Updates:
- Added --global flag for global installation (recommended)
- Still supports per-project installation if needed
- Clear scope indication in output messages
- Updated uninstall instructions for both scopes

Documentation:
- Updated README to recommend global installation
- Added examples for both global and per-project setup
- Clearer uninstall instructions for each scope

Benefits:
- Users install once, works everywhere
- No per-project configuration needed
- Easier maintenance and updates
- Consistent behavior across all projects

Breaking Changes: None
- Per-project installation still supported
- Existing installations continue to work

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
RichardDillman
2025-11-23 15:13:01 -05:00
parent 6dcb4a888c
commit 0584ac6c5f
2 changed files with 23 additions and 7 deletions

View File

@@ -228,10 +228,14 @@ The toggle state is preserved while the bridge is running, and you'll get a Tele
By default, AFK mode only sends notifications when Claude explicitly uses notification tools. If you want to receive Telegram alerts when **permission prompts** appear (so you know Claude is waiting for approval), install the permission hook:
**Recommended: Install Globally (works in all projects)**
```bash
# From the innervoice directory
cd /path/to/innervoice
./scripts/install-hook.sh --global
```
**Or install per-project:**
```bash
# Install in a specific project
./scripts/install-hook.sh /path/to/your/project
@@ -246,7 +250,9 @@ This will send you a Telegram message like:
> **Action:** Check scraped sets files
> Check your terminal to approve or deny.
**To uninstall:** Simply delete `.claude/hooks/PermissionRequest.sh` from your project.
**To uninstall:**
- Global: `rm ~/.claude/hooks/PermissionRequest.sh`
- Per-project: `rm .claude/hooks/PermissionRequest.sh`
### 8. Verify Global Setup