local hook

Claude Code Local (Global)

Wire every Claude Code session on your machine to the Neptrix local runtime. Configure once in ~/.claude/settings.json and all projects route through on-device governance - no API key.

需要 Neptrix 本地运行时(即将推出)

此设置完全在您的机器上运行。本地运行时二进制文件尚未发布。 加入等待名单以获取抢先体验。

安装

  1. 1Install and start the Neptrix local runtime and bridge daemon. The runtime binary is not published yet, so join the waitlist for early access.即将推出
  2. 2Open or create ~/.claude/settings.json in your home directory
  3. 3Paste the configuration below. The PreToolUse hook runs client.js for every tool call (matcher ".*", timeout 105) and forwards it to the local bridge daemon over NEPTRIX_BRIDGE_DAEMON_SOCKET. No API key.
  4. 4Restart Claude Code. Every tool call across all projects now asks the local runtime, which fails closed if the runtime is not running.
  5. 5Inspect the signed audit chain any time with: neptrix-runtime view --config ~/.neptrix/runtime.json --verify
将此配置添加到~/.claude/settings.json
~/.claude/settings.json
1{
2 "env": {
3 "NEPTRIX_BRIDGE_DAEMON_SOCKET": "$HOME/.neptrix/bridge-daemon.sock"
4 },
5 "hooks": {
6 "PreToolUse": [
7 {
8 "matcher": ".*",
9 "hooks": [
10 {
11 "type": "command",
12 "command": "node $HOME/.neptrix/bin/client.js",
13 "timeout": 105
14 }
15 ]
16 }
17 ]
18 }
19}

无需 API 密钥。钩子通过套接字与本地运行时通信,任何数据都不会离开您的机器。 加入等待名单以获取运行时。

工作原理

1

智能体提议操作

在每次工具调用之前,您的智能体将提议的操作发送给 Neptrix 进行评估。

2

Neptrix 进行评估

宪法治理规则评估操作。决策被记录到您的审计追踪中。

3

返回决策

ALLOW、BLOCK、ESCALATE 或 MODIFY。智能体自动发现——无需注册。

在您自己的机器上运行治理。

Neptrix 本地运行时将每个决策都保留在设备上。加入等待名单,即可在发布时第一时间获取。

加入等待名单