claudehub-hooks
Pip-installable Claude Code hook dispatcher. Install once, then wire any repository to a Claude Monitor HTTP endpoint in one command — no manual script copying or JSON editing.
Events flow: Claude Code → claudehub-hooks dispatcher → Claude Monitor.
Install
pip install claudehub-hooks
Requires Python 3.10+. No third-party runtime dependencies (stdlib only).
Quick start
claudehub-hooks install
Run from a repository root (or pass --repo). The command is idempotent — safe to re-run.
claudehub-hooks install --repo /path/to/repo
claudehub-hooks install --url http://192.168.1.50:7070/event
claudehub-hooks install --dry-run
What it writes
| File | Purpose |
|---|---|
.claude/hooks/claude_hook.py |
Hook dispatcher (invoked by Claude Code) |
.claude/hooks/monitor_config.json |
Transport config with the monitor URL |
.claude/settings.json |
Hook entries merged in (existing entries kept) |
Uninstall
claudehub-hooks uninstall
Removes all claudehub hook entries from .claude/settings.json and deletes
claude_hook.py and monitor_config.json. Any hooks you added manually are
left untouched.
claudehub-hooks uninstall --repo /path/to/repo
claudehub-hooks uninstall --dry-run # preview without changing anything
Change the monitor URL
Edit .claude/hooks/monitor_config.json in the repo:
{
"transport": {
"http": { "url": "http://192.168.1.50:7070/event" }
}
}
Or set an environment variable (overrides the file):
export CLAUDE_HUB_URL="http://192.168.1.50:7070/event"
On Windows (persistent):
setx CLAUDE_HUB_URL "http://192.168.1.50:7070/event"
Test connectivity
python .claude/hooks/claude_hook.py --test
Hooks installed
| Event | Trigger |
|---|---|
SessionStart |
Claude session begins |
UserPromptSubmit |
User sends a message |
Notification |
Claude needs input |
PostToolUse |
File read/edited (Edit · Write · NotebookEdit · MultiEdit · Read) |
Stop |
Turn completes |
StopFailure |
API error |
PermissionRequest |
Allow/deny dialog shown |
PermissionGranted |
User approved a tool |
PermissionDenied |
User denied a tool |
PreToolUse |
Tool about to run (resolves permission) |
Configuration
| Variable | Default | Meaning |
|---|---|---|
CLAUDE_HUB_URL |
http://127.0.0.1:7070/event |
Monitor endpoint |
CLAUDE_HUB_TIMEOUT |
2.0 |
HTTP timeout (seconds) |
CLAUDE_HUB_HTTP_ENABLED |
true |
Set to false to silence all hooks |
CLAUDE_HOOK_LOG_LEVEL |
INFO |
Dispatcher log level |
CLAUDE_HOOK_LOG_FILE |
~/.claude/claude_hook.log |
Override log path |
CLAUDE_HUB_CONFIG |
— | Path to a monitor_config.json override |
License
MIT — see LICENSE.
Author: Pandiyaraj Karuppasamy · pandiyarajk@live.com
Metadata
Release files for claudehub-hooks 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| claudehub_hooks-0.1.3.tar.gz | 12.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| claudehub_hooks-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.2 kB
Release files / claudehub_hooks-0.1.3.tar.gz
| Download URL | claudehub_hooks-0.1.3.tar.gz |
|---|---|
| Size | 12.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa822e8a7796b7cf1bd78651479576bb070755fcdfc64e645d82227746ef2028
|
|
BLAKE2b-256 checksum How to use checksums |
30c3092618ef203f18e4b5dc20be77bac9311e4ec2833ac438fd8202e658ea47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / claudehub_hooks-0.1.3-py3-none-any.whl
| Download URL | claudehub_hooks-0.1.3-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
865799472f04e8427b0e5ec29bb3c5faf57165bc805b324fb2955d06b04bfd37
|
|
BLAKE2b-256 checksum How to use checksums |
4b8ded7665d321e75e08f73ab9b07dfea132ad24b8a7cc54ef4ccf6e13256ddb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for claudehub-hooks 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.