Install
Requires Node.js 22+ on macOS or Linux.rubric init is interactive and prompts for two values:
| Prompt | Value |
|---|---|
| Agent name | How this install shows in the dashboard. Suggestion: claude-code-<hostname>. |
| Enrollment token | The enr_… string from the dashboard’s Enrollment page. |
https://api.rubric-app.com. Override with the RUBRIC_API_URL env var if you’ve been given a different URL.
After init completes, every Claude Code tool call on this machine flows through your policies. No code change, no harness change.
Scripted installs
Skip prompts with flags:RUBRIC_AGENT_NAME, RUBRIC_ENROLLMENT_TOKEN, RUBRIC_API_URL.
init will also install a launchd LaunchAgent (macOS) or systemd-user unit (Linux) so the daemon survives logout and reboot.
Verify
bundle non-empty + fresh — you need to author at least one policy in the dashboard and scope it to this agent.
Writing policies
Policies are authored in the dashboard exactly like the production adapters. Fields available to Claude Code policies:| Field | Example values |
|---|---|
tool_name | Bash, Read, Edit, Write, MultiEdit, WebFetch, WebSearch |
input.command | rm -rf /tmp/foo (for Bash) |
input.file_path | /Users/dev/.ssh/id_rsa (for file IO tools) |
input.url | https://example.com/api (for WebFetch / WebSearch) |
session_id | Claude Code session id |
agent_id | Rubric-assigned id for this install |
Rubric denied this call: policyblock-secret-files-claude-code(ruledeny-secret-file-access) matched.
CLI reference
rubric init flags
rubric logs filters
rubric stop flags
rubric uninstall flags
Where things live on disk
| Path | What’s there |
|---|---|
~/.config/rubric/config.json | API URL, agent name, enrollment token. Mode 0600. |
~/.config/rubric/daemon.token | 64-char hex bearer token gating the loopback daemon. Mode 0600. |
~/.config/rubric/daemon.pid | Daemon process id. |
~/.config/rubric/daemon.port | Bound port (defaults to 47821; falls back to OS-assigned). |
~/.claude/settings.json | Patched with three Rubric hook entries (PreToolUse, PostToolUse, SessionStart). User-authored entries are preserved. |
~/Library/Logs/rubric/claude-code.log (macOS) | Daemon log. |
~/.local/state/rubric/claude-code.log (Linux) | Daemon log. |
~/Library/LaunchAgents/dev.rubric.claude-code.plist (macOS) | Service definition. |
~/.config/systemd/user/rubric-claude-code.service (Linux) | Service definition. |
Uninstall
~/.claude/settings.json are preserved — only entries pointing at the local daemon URL are stripped.