Commands
Complete reference for all brin CLI commands
brin init
Initialize brin in your project. Sets up the AGENTS.md docs index and adds package installation instructions for AI agents.
brin initFlags:
| Flag | Description |
|---|---|
-y | Skip prompts and use defaults |
Examples:
# Interactive initialization
brin init
# Non-interactive with defaults
brin init -yOutput:
$ brin init
🔧 initializing brin...
Enable AGENTS.md docs index for AI coding agents? (Y/n) Y
✓ created brin.json
✓ created .brin-docs/
✓ updated AGENTS.md with brin docs index
✓ added package installation instructions to AGENTS.md
✓ brin initialized successfully!Behavior:
- Prompts for configuration options (unless
-yis used) - Creates
brin.jsonwith project settings - Creates
.brin-docs/directory (if docs index enabled) - Creates or updates
AGENTS.mdwith brin docs index (if enabled) - Adds package installation instructions to
AGENTS.mdso AI agents usebrin addinstead of direct package manager commands
brin add
Install packages with security checks before installation.
brin add <packages...>Arguments:
packages- One or more package specs (e.g.,lodash,express@4.18.0,@types/node)
Flags:
| Flag | Description |
|---|---|
--yolo | Skip all safety checks and install anyway (dangerous) |
--strict | Block installation if any warnings are found |
Examples:
# Install a single package (JavaScript)
brin add express
# Install a specific version (JavaScript)
brin add lodash@4.17.21
# Install multiple packages (JavaScript)
brin add express cors helmet
# Install scoped packages (JavaScript)
brin add @types/node @prisma/client
# Install Python packages
brin add requests
brin add django==4.2.0
brin add flask sqlalchemy pytest
# Force install despite warnings (not recommended)
brin add sketchy-package --yolo
# Block on any warning
brin add untrusted-pkg --strictBehavior:
- Parses package specs and resolves versions
- Queries the brin API for security assessment
- Displays risk level with details (publisher, downloads, CVEs, threats)
- For Clean packages: installs automatically
- For Warning packages: prompts for confirmation (unless
--strict) - For Critical packages: blocks installation (unless
--yolo) - Installs via your detected package manager (npm/yarn/pnpm/bun for JavaScript, pip/poetry/pipenv/uv for Python)
- Saves documentation to
.brin-docs/and updatesAGENTS.mdindex
brin remove
Uninstall packages from your project.
brin remove <packages...>Arguments:
packages- One or more package names to remove
Examples:
# Remove a single package
brin remove lodash
# Remove multiple packages
brin remove express cors helmetBehavior:
- Detects your package manager
- Runs the appropriate uninstall command
- Removes documentation from
.brin-docs/and updatesAGENTS.mdindex
brin uninstall
Remove brin from your system. This command is for curl-based installations.
brin uninstallFlags:
| Flag | Description |
|---|---|
--yes | Skip confirmation prompt |
--all | Also remove project files (.brin-docs/, brin.json, and brin section from AGENTS.md) |
Examples:
# Uninstall with confirmation prompt
brin uninstall
# Skip confirmation
brin uninstall --yes
# Also remove project files
brin uninstall --allOutput:
$ brin uninstall
⚠️ This will remove brin from your system.
Are you sure? (y/N) y
✓ removed brin binary
✓ brin has been uninstalled
To reinstall, run:
curl -fsSL https://brin.sh/install.sh | shBehavior:
- Prompts for confirmation (unless
--yesis used) - Removes the brin binary from your system
- If
--allis specified, also removes:.brin-docs/directorybrin.jsonconfiguration file- Sus Docs Index section from
AGENTS.md(preserves other content)
- Shows reinstall instructions after successful removal
brin upgrade
Check for and install the latest version of brin from GitHub releases. This command is for curl-based installations.
brin upgradeFlags:
| Flag | Description |
|---|---|
--force | Re-download and reinstall even if already on latest version |
Examples:
# Upgrade if newer version available
brin upgrade
# Re-download even if on latest
brin upgrade --forceOutput:
$ brin upgrade
🔍 checking for updates...
✓ new version available: v0.1.6
📦 downloading brin v0.1.6...
✓ brin upgraded to v0.1.6
$ brin upgrade
🔍 checking for updates...
✓ already on latest version (v0.1.6)Behavior:
- Fetches latest release information from GitHub
- Compares current version with latest available
- If newer version exists (or
--forceis used):- Downloads the latest binary for your platform
- Replaces the existing brin binary
- If already on latest and no
--force: exits with success message
brin scan
Audit all dependencies in your project for security issues.
brin scanFlags:
| Flag | Description |
|---|---|
--json | Output results as JSON instead of human-readable format |
Examples:
# Scan current project
brin scan
# Output as JSON (for CI/CD)
brin scan --jsonOutput:
$ brin scan
🔍 scanning 127 packages...
📦 lodash@4.17.20
⚠️ kinda sus
└─ CVE-2021-23337: prototype pollution (medium)
📦 event-stream@3.3.6
🚨 MEGA SUS
└─ malware: flatmap-stream injection
───────────────────────────────
summary: 125 clean, 1 warning, 1 criticalBehavior:
- Reads dependencies from
package.json(JavaScript) orrequirements.txt/pyproject.toml/Pipfile(Python) - Attempts to get exact versions from lockfiles
- Performs bulk lookup via the brin API
- Categorizes packages: clean, warnings, critical, unknown
- Displays results sorted by severity
- Exits with code 1 if critical issues are found (useful for CI)
brin check
Look up the security assessment for a package without installing it.
brin check <package>Arguments:
package- Package spec to check (e.g.,lodash,express@4.18.0)
Examples:
# Check latest version
brin check axios
# Check specific version
brin check lodash@4.17.20Output:
$ brin check axios
🔍 checking axios@1.6.0...
✅ not sus
├─ publisher: axios (verified)
├─ downloads: 45M/week
├─ cves: 0
├─ agentic threats: none
├─ install scripts: none
└─ trust score: 92/100
📋 capabilities:
├─ 🌐 network: *
└─ 🔑 env vars: HTTP_PROXY, HTTPS_PROXYBehavior:
- Parses package spec (name and optional version)
- Fetches full assessment from the brin API
- If not yet scanned, requests a scan and shows estimated time
- Displays complete risk assessment including:
- Risk level and trust score
- Publisher information
- CVEs with descriptions
- Agentic threats (if any)
- Install scripts
- Capabilities (network, filesystem, process, environment, native)
brin update
Check for and update dependencies to their latest safe versions.
brin updateFlags:
| Flag | Description |
|---|---|
--dry-run | Show what would be updated without making changes |
Examples:
# Update all dependencies
brin update
# Preview updates without applying
brin update --dry-runOutput:
$ brin update --dry-run
📦 Available updates:
├─ express: 4.18.0 → 4.21.0 ✅
├─ lodash: 4.17.20 → 4.17.21 ✅
└─ axios: 1.5.0 → 1.6.0 ✅
Run without --dry-run to apply updates.Behavior:
- Reads current dependencies from
package.json(JavaScript) orrequirements.txt/pyproject.toml/Pipfile(Python) - Checks latest version for each package via the brin API
- Compares current vs latest versions
- If
--dry-run: shows available updates and stops - If not: updates each package using your package manager
- Each update goes through the same security checks as
brin add
brin why
Show why a package exists in your dependency tree.
brin why <package>Arguments:
package- Package name to trace
Examples:
# Find why lodash is installed
brin why lodash
# Trace a transitive dependency
brin why minimistOutput:
$ brin why minimist
minimist@1.2.8
├─ mkdirp@0.5.6
│ └─ your-project
└─ optimist@0.6.1
└─ handlebars@4.7.7
└─ your-projectBehavior:
- Detects your package manager
- Delegates to the underlying package manager's why command
- Pretty-prints the dependency chain with highlighting
brin skills check
Check a skill's security posture without installing it. Scans the SKILL.md from a GitHub repository for threats and chain-loading patterns.
brin skills check <skill>Arguments:
skill- A skill identifier in one of two forms:owner/repo— Check all skills in a repository (e.g.anthropic/skills)owner/repo/skill-name— Check a specific skill (e.g.anthropic/skills/mcp-builder)
Examples:
# Check all skills in a repository
brin skills check owner/repo
# Check a specific skill
brin skills check owner/repo/skill-nameOutput:
$ brin skills check acme/tools/code-review
🔍 checking skill acme/tools/code-review...
📋 acme/tools/code-review
├─ repo: github.com/acme/tools
├─ trust score: 87/100
├─ chain-loading: none detected
└─ threats: none
✅ skill looks clean
$ brin skills check risky-org/agent-helpers/setup
🔍 checking skill risky-org/agent-helpers/setup...
📋 risky-org/agent-helpers/setup
├─ repo: github.com/risky-org/agent-helpers
├─ trust score: 34/100
├─ chain-loading: ⚠️ 2 references detected
│ ├─ installs npm package: unknown-pkg
│ └─ loads skill: other-org/repo/helper
└─ threats:
└─ ⚠️ patterns consistent with data exfiltration (confidence: 0.78)
⚠️ skill flagged for reviewBehavior:
- Resolves the skill identifier to a GitHub repository and locates the
SKILL.mdfile(s) - Fetches the skill content via the
SkillsAdapter(GitHub-hosted skills registry) - Runs threat detection — initial scan uses
minimax-m2p5for speed, with Opus verification for flagged threats - Checks for chain-loading patterns — instructions that tell agents to install other skills or packages
- Displays a tailored output showing repo, trust score, and threats (instead of the CVE/download-focused output used for npm/PyPI packages)
- Opus-verified threats are marked as
Verifiedand affect the overall risk level; unverified threats are shown as indicators for manual review
brin skills add
Install a skill after running safety checks. Works like brin add but for Agent Skills instead of packages.
brin skills add <skill>Arguments:
skill- A skill identifier:owner/repo/skill-name(e.g.anthropic/skills/mcp-builder)
Flags:
| Flag | Description |
|---|---|
--yolo | Skip all safety checks and install regardless of risk level |
--strict | Block installation if the skill has any warnings (not just critical) |
Examples:
# Install a skill with security checks
brin skills add owner/repo/skill-name
# Skip all safety checks (not recommended)
brin skills add owner/repo/skill-name --yolo
# Block on any warning
brin skills add owner/repo/skill-name --strictOutput:
$ brin skills add acme/tools/code-review
🔍 checking skill acme/tools/code-review...
📋 acme/tools/code-review
├─ repo: github.com/acme/tools
├─ trust score: 87/100
├─ chain-loading: none detected
└─ threats: none
✅ skill looks clean
📦 installing skill...
✓ skill installed successfullyBehavior:
- Runs the same security assessment as
brin skills check - For Clean skills: installs automatically
- For Warning skills: prompts for confirmation (unless
--strict, which blocks) - For Critical skills: blocks installation (unless
--yolo) - Installs the skill into your project
Skill Identifier Format
Skills use the format owner/repo or owner/repo/path to reference GitHub-hosted Agent Skills (SKILL.md files).
Examples:
anthropic/skills/mcp-builder— themcp-builderskill ingithub.com/anthropic/skillsacme/tools— all skills ingithub.com/acme/tools
Chain-Loading Detection:
Chain-loading is when a skill instructs an AI agent to install additional skills or packages. This is a supply-chain risk unique to the agent ecosystem because:
- A seemingly harmless skill can pull in assessed-as-high-risk dependencies
- Nested skill references can create deep trust chains that are difficult to audit manually
- Package installations triggered by skills bypass the normal
brin addsecurity checks
Both skills check and skills add automatically detect and report chain-loading patterns. Nested skills referenced by chain-loading are automatically queued for scanning.
Global Options
These options work with all commands:
| Option | Description |
|---|---|
--api-url | Use a custom API endpoint (default: https://api.brin.sh) |
--help | Show help for the command |
--version | Show brin version |
Environment Variables:
| Variable | Description |
|---|---|
BRIN_API_URL | Default API endpoint (overridden by --api-url) |
RUST_LOG | Log level for debugging (e.g., brin=debug) |
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Critical issues found (scan) or installation blocked |
| 2 | Command error or invalid arguments |
On this page