aws / aws/amazon-q-developer-cli
bug: Documentation mismatch
- Dominant language
- Rust
- Stars
- 2k
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
### Checks
- [x] I have searched [github.com/aws/amazon-q-developer-cli/issues](https://github.com/aws/amazon-q-developer-cli/issues?q=) and there are no duplicates of my issue
- [x] I have run `q doctor` in the affected terminal session
- [x] I have run `q restart` and replicated the issue again
### Operating system
Windows
### Expected behaviour
The documentation for [hooks-field](https://github.com/aws/amazon-q-developer-cli/blob/main/docs/agent-format.md#hooks-field) to match the documentation for [pretooluse](https://github.com/aws/amazon-q-developer-cli/blob/main/docs/hooks.md#pretooluse)
### Actual behaviour
[hooks-field](https://github.com/aws/amazon-q-developer-cli/blob/main/docs/agent-format.md#hooks-field) states the `preToolUse` should look like
```json
"preToolUse": [
{
"matcher": "execute_bash",
"command": "{ echo \"$(date) - Bash command:\"; cat; echo; } >> /tmp/bash_audit_log"
},
{
"matcher": "use_aws",
"command": "{ echo \"$(date) - AWS CLI call:\"; cat; echo; } >> /tmp/aws_audit_log"
}
],
```
but the [pretooluse](https://github.com/aws/amazon-q-developer-cli/blob/main/docs/hooks.md#pretooluse) shows
```json
{
"hook_event_name": "preToolUse",
"cwd": "/current/working/directory",
"tool_name": "fs_read",
"tool_input": {
"operations": [
{
"mode": "Line",
"path": "/current/working/directory/docs/hooks.md"
}
]
}
}
```
It's a bit confusing. Where is the "command" and the "matcher"?
### Steps to reproduce
_No response_
### Environment
```yaml
```
Contributor guide
Assessment
This issue has not been assessed yet.