@coworker-jp/aidr
v0.1.301
Published
AIDR setup CLI - installs ai-scanner hooks for 19+ AI coding agents
Readme
aidr
Hook installer CLI for ai-scanner: wires the scanner into AI coding agents (Claude Code, Cursor, Windsurf, …) via their hook mechanisms and fetches the scanner binary.
Quick start
ai-scanner is protection you put in the repository: its hooks target cloud coding-agent environments (cloud Claude Code, CI, devcontainers) that the repository travels into. Your own PC is protected by coworker-sentinel (see below), not by these hooks.
# Recommended: run inside the repository, then commit the generated config
# (.claude/ etc.). The scanner binary self-bootstraps in cloud sessions.
npx @coworker-jp/aidr install --agent claude --scope project --key ak_xxx...
git add .claude && git commit -m "add ai-scanner hooks"
# multiple agents, or auto-detect everything under $HOME:
npx @coworker-jp/aidr install --agent claude,cursor --scope project --key ak_xxx...
npx @coworker-jp/aidr install --all --key ak_xxx...Running install interactively on a machine with no cloud/CI/remote
indicators (= your own PC) stops with a pointer to the coworker-sentinel
installer; pass --local to proceed deliberately (see --local below).
coworker-sentinel (host EDR + DLP) is installed separately
aidr does not install the coworker-sentinel daemon. Use the OS-native installer for your platform — all are available from the user portal's Download page:
- Windows: run
coworker-sentinel-setup.exeand paste your access key when prompted. Uninstall via Add/Remove Programs. - macOS: open
CoworkerSentinel.dmg, drag the app to Applications, launch it, and enter your access key (one admin-password prompt). - Linux:
sudo apt install ./coworker-sentinel.deb sudo coworker-sentinel activate --key ak_xxx...
Endpoint-info snapshots are collected by the sentinel daemon itself every
6 hours (Pro / Trial plans). On macOS the menu-bar app has a toggle for this;
on Linux/Windows edit /etc/aidr/sentinel-settings.json
(%ProgramData%\coworker\sentinel-settings.json).
The old npx install paths are retired: --scheduled (cron/launchd
endpoint-info) and --with-sentinel (daemon install) both exit with a
migration message. aidr install / aidr uninstall still clean up leftovers
that older aidr versions wrote (cron/launchd entries; the legacy npx-installed
sentinel daemon on Linux). Deb-installed sentinels are never touched — their
cleanup belongs to the package manager.
Commands
aidr install --agent <list|standalone|--all> --key <ak_...>
[--dry-run] [--force] [--binary-only]
[--no-verify] [--skip-binary]
aidr uninstall [--agent <list>]
aidr doctor
aidr list-agentsOptions:
--agent <list>: comma-separated agent names (claude,cursor), orstandalonefor a hook-less binary-only install into~/.aidr/bin, or--all.--key <ak_...>: access key (formatak_+ 43 urlsafe chars).--dry-run: print planned writes, do not touch disk.--force: overwrite existing files.--binary-only/--skip-binary: only / never fetch the scanner binary.--no-verify: skip the server-side access-key check.--local: proceed on a personal PC. By defaultaidr installstops when it detects an interactive terminal with no cloud/CI/remote indicators (that machine should run coworker-sentinel instead) and prints the sentinel installer link. Non-interactive environments (CI, cloud sandboxes, agent-executed shells) are never gated.AIDR_ALLOW_LOCAL_INSTALL=1is the env-var equivalent for scripted local installs.
Platforms
| component | Linux | macOS | Windows |
|---|---|---|---|
| ai-scanner agent hooks (this package) | ✅ | ✅ | — |
| coworker-sentinel (EDR + DLP) | .deb installer | DMG | setup.exe |
Supported agents (hooks)
| name | status | |---|---| | claude, cursor, windsurf, kiro, gemini, codex | full | | cline, roo, copilot, qwen, trae, amazonq, jetbrains, opencode, aider, amp, crush, antigravity, continue | stub (Phase 2) |
Developing
node bin/aidr.js list-agents
node bin/aidr.js install --agent claude --key ak_xxx --dry-run --no-verify --skip-binary
node --test tests/Third-party components
This package downloads and installs Opengrep (LGPL-2.1) alongside the ai-scanner binary. Opengrep is invoked by ai-scanner as a separate process; the process boundary is the license boundary. The upstream binary is shipped unmodified. Set AI_SCANNER_OPENGREP=/path/to/opengrep to substitute a different LGPL-2.1 build. See LICENSES/opengrep-LGPL-2.1.txt in the downloaded scanner distribution for the full license text and pinned release metadata.
