CLI hook for Claude Code and Cowork — automatic compliance monitoring for AI coding agents
Project description
AgentAudit Hook CLI
CLI for auditing Claude Code and Cowork sessions automatically.
Every tool call — file reads, writes, shell commands, web fetches — is logged, classified, and audit-ready with zero token overhead.
Install
pip install agentic-audit-hook
Setup
Add hooks to Claude Code:
// ~/.claude/settings.json
{
"hooks": {
"PreToolUse": [
{
"matcher": "",
"hooks": [
{"type": "command", "command": "agentaudit-hook pre"}
]
}
],
"PostToolUse": [
{
"matcher": "",
"hooks": [
{"type": "command", "command": "agentaudit-hook post"}
]
}
]
}
}
Set environment variables:
export AGENTAUDIT_API_KEY="aa_live_xxxxx"
export AGENTAUDIT_BASE_URL="http://localhost:8000"
Commands
| Command | Hook | Description |
|---|---|---|
agentaudit-hook pre |
PreToolUse | Classify risk, optionally block |
agentaudit-hook post |
PostToolUse | Log completion |
agentaudit-hook session-start |
SessionStart | Log session start |
agentaudit-hook session-end |
SessionEnd | Log session end |
Links
License
Apache 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentic_audit_hook-0.1.1.tar.gz.
File metadata
- Download URL: agentic_audit_hook-0.1.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50cb744a4f10e142ecea5a09f0689335b9d0883b017b5ac108d34514770bc1d2
|
|
| MD5 |
dd1e2e53ee2a6650e63068e76713318a
|
|
| BLAKE2b-256 |
6b2adabaacea66cda08361b047a926351c79455c6f411bf883e00b8b22b55d37
|
File details
Details for the file agentic_audit_hook-0.1.1-py3-none-any.whl.
File metadata
- Download URL: agentic_audit_hook-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59fc48b6b82c0f954368aebad1daa21126424fd2bbed16ecb5f43c8059022ef8
|
|
| MD5 |
76c13e837ce85297a1213e3c119a83f1
|
|
| BLAKE2b-256 |
ebe2d0da410361e75d396cb95135eaa6b99dd2914a424f368c261b9b02520865
|