update docs
This commit is contained in:
parent
38fc49ddcc
commit
06441874be
14
CLAUDE.md
14
CLAUDE.md
@ -34,8 +34,20 @@ Configuration is stored in `~/.iamwaiting/config.edn` with the following structu
|
|||||||
|
|
||||||
Alternatively, the webhook URL can be set via the `IAMWAITING_WEBHOOK_URL` environment variable.
|
Alternatively, the webhook URL can be set via the `IAMWAITING_WEBHOOK_URL` environment variable.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Install via bbin (recommended):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bbin install git@git.ajet.fyi:ajet-industries/iamwaiting.git
|
||||||
|
```
|
||||||
|
|
||||||
|
This installs `iamwaiting` to `~/.local/bin/iamwaiting` (ensure `~/.local/bin` is in your PATH).
|
||||||
|
|
||||||
## Common Commands
|
## Common Commands
|
||||||
|
|
||||||
|
**Note:** These examples assume `iamwaiting` is in your PATH.
|
||||||
|
|
||||||
### Setup
|
### Setup
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@ -130,7 +142,7 @@ Uses Babashka standard libraries:
|
|||||||
The script is self-contained with minimal dependencies. To modify:
|
The script is self-contained with minimal dependencies. To modify:
|
||||||
|
|
||||||
1. Edit the `iamwaiting` script directly
|
1. Edit the `iamwaiting` script directly
|
||||||
2. Test changes using `iamwaiting test`
|
2. Test changes using `iamwaiting test` (or `./iamwaiting test` if running from the repo directory)
|
||||||
3. The script is executable via shebang `#!/usr/bin/env bb`
|
3. The script is executable via shebang `#!/usr/bin/env bb`
|
||||||
|
|
||||||
## Security Considerations
|
## Security Considerations
|
||||||
|
|||||||
85
README.md
85
README.md
@ -8,7 +8,31 @@ Send Discord notifications when Claude Code is waiting for your input.
|
|||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
### 1. Install Dependencies
|
### 1. Install
|
||||||
|
|
||||||
|
#### Using bbin (Recommended)
|
||||||
|
|
||||||
|
Install directly from Gitea using SSH:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Install from your Gitea repository via SSH
|
||||||
|
bbin install git@git.ajet.fyi:ajet-industries/iamwaiting.git
|
||||||
|
|
||||||
|
# Install a specific version using a git tag
|
||||||
|
bbin install git@git.ajet.fyi:ajet-industries/iamwaiting.git --git/tag v1.0.0
|
||||||
|
|
||||||
|
# Install the latest commit
|
||||||
|
bbin install git@git.ajet.fyi:ajet-industries/iamwaiting.git --latest-sha
|
||||||
|
```
|
||||||
|
|
||||||
|
This will install `iamwaiting` to `~/.local/bin/iamwaiting` (make sure `~/.local/bin` is in your PATH).
|
||||||
|
|
||||||
|
**Note:** Requires [bbin](https://github.com/babashka/bbin) to be installed first:
|
||||||
|
```bash
|
||||||
|
bash < <(curl -s https://raw.githubusercontent.com/babashka/bbin/main/bbin)
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Manual Installation
|
||||||
|
|
||||||
Requires [Babashka](https://babashka.org/):
|
Requires [Babashka](https://babashka.org/):
|
||||||
|
|
||||||
@ -20,10 +44,24 @@ brew install borkdude/brew/babashka
|
|||||||
bash <(curl -s https://raw.githubusercontent.com/babashka/babashka/master/install)
|
bash <(curl -s https://raw.githubusercontent.com/babashka/babashka/master/install)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Then clone and symlink:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Clone the repository
|
||||||
|
git clone git@git.ajet.fyi:ajet-industries/iamwaiting.git
|
||||||
|
cd iamwaiting
|
||||||
|
|
||||||
|
# Make the script executable
|
||||||
|
chmod +x iamwaiting
|
||||||
|
|
||||||
|
# Symlink to a directory in your PATH
|
||||||
|
ln -s $(pwd)/iamwaiting ~/.local/bin/iamwaiting
|
||||||
|
```
|
||||||
|
|
||||||
### 2. Set Up Discord Webhook
|
### 2. Set Up Discord Webhook
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./iamwaiting setup
|
iamwaiting setup
|
||||||
```
|
```
|
||||||
|
|
||||||
Follow the prompts to enter your Discord webhook URL. Get a webhook URL from:
|
Follow the prompts to enter your Discord webhook URL. Get a webhook URL from:
|
||||||
@ -32,41 +70,50 @@ Discord Server → Server Settings → Integrations → Webhooks → New Webhook
|
|||||||
### 3. Test It
|
### 3. Test It
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./iamwaiting test
|
iamwaiting test
|
||||||
```
|
```
|
||||||
|
|
||||||
You should see a test message in your Discord channel!
|
You should see a test message in your Discord channel!
|
||||||
|
|
||||||
### 4. Configure Claude Code Hook
|
### 4. Configure Claude Code Hook
|
||||||
|
|
||||||
Add to `~/.claude/hooks.edn`:
|
Add to `~/.claude/settings.json`:
|
||||||
|
|
||||||
```clojure
|
```json
|
||||||
{:agent-waiting-for-user {:command ["/full/path/to/iamwaiting/iamwaiting"]}}
|
{
|
||||||
```
|
"hooks": {
|
||||||
|
"Notification": [
|
||||||
Or if `iamwaiting` is in your PATH:
|
{
|
||||||
|
"matcher": "idle_prompt",
|
||||||
```clojure
|
"hooks": [{"type": "command", "command": "iamwaiting"}]
|
||||||
{:agent-waiting-for-user {:command ["iamwaiting"]}}
|
},
|
||||||
|
{
|
||||||
|
"matcher": "permission_prompt",
|
||||||
|
"hooks": [{"type": "command", "command": "iamwaiting"}]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
**Note:** These examples assume `iamwaiting` is in your PATH (e.g., installed via bbin or symlinked).
|
||||||
|
|
||||||
### Manual Testing
|
### Manual Testing
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Send a test notification
|
# Send a test notification
|
||||||
./iamwaiting test
|
iamwaiting test
|
||||||
|
|
||||||
# Send a waiting notification
|
# Send a waiting notification
|
||||||
./iamwaiting
|
iamwaiting
|
||||||
|
|
||||||
# Send notification with custom data
|
# Send notification with custom data
|
||||||
./iamwaiting '{"cwd": "/path/to/project"}'
|
iamwaiting '{"cwd": "/path/to/project"}'
|
||||||
```
|
```
|
||||||
|
|
||||||
### Babashka Tasks
|
### Babashka Tasks (if running from repository directory)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bb setup # Run setup wizard
|
bb setup # Run setup wizard
|
||||||
@ -114,7 +161,7 @@ The notification appears in your Discord channel with:
|
|||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
**"No webhook URL configured"**
|
**"No webhook URL configured"**
|
||||||
- Run `./iamwaiting setup` to configure your webhook
|
- Run `iamwaiting setup` to configure your webhook
|
||||||
|
|
||||||
**"Failed to send message"**
|
**"Failed to send message"**
|
||||||
- Check your webhook URL is correct
|
- Check your webhook URL is correct
|
||||||
@ -122,8 +169,8 @@ The notification appears in your Discord channel with:
|
|||||||
- Check your internet connection
|
- Check your internet connection
|
||||||
|
|
||||||
**Hook not triggering**
|
**Hook not triggering**
|
||||||
- Verify `hooks.edn` syntax is correct
|
- Verify `settings.json` syntax is correct
|
||||||
- Use full absolute path to the script
|
- Ensure `iamwaiting` is in your PATH
|
||||||
- Check Claude Code hooks documentation
|
- Check Claude Code hooks documentation
|
||||||
|
|
||||||
## Security
|
## Security
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user