CLI REFERENCE

CLI Commands

Most commands support --json for machine-readable output. Install with npm install -g brigs.

Auth

brigs auth loginno auth
brigs auth login --api-key <key>no auth
brigs auth logoutno auth
brigs auth statusno auth
brigs auth whoamiAPI key

Local Analysis

brigs agent-scan [dir]no auth
brigs ai-inventory [dir]no auth

Scanning

brigs scan runAPI key
brigs scan listAPI key
brigs scan get <id>API key
brigs scan watch <id>API key

Findings

brigs finding listAPI key
brigs finding get <id>API key
brigs finding dismiss <id>API key
brigs finding resolve <id>API key
brigs statusAPI key

Posture & Compliance

brigs postureAPI key
brigs posture [framework]API key

Repos

brigs repo listAPI key
brigs repo get <id>API key
brigs repo remove <id>API key

Controls & Evidence

brigs control listAPI key
brigs control get <key>API key
brigs evidence generateAPI key

Remediation

brigs remediate <finding-id>API key

Config & Keys

brigs config showno auth
brigs config set <k> <v>no auth
brigs config get <key>no auth
brigs config pathno auth
brigs config resetno auth
brigs api-key create <name>API key
brigs api-key listAPI key
brigs api-key revoke <id>API key

CI/CD Integration

Run governance scans in your pipeline. The CLI outputs JSON and SARIF for integration with GitHub Code Scanning and other tools.

GitHub Actions

name: Agent Governance
on: [push, pull_request]

jobs:
  brigs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm install -g brigs

      # Cloud scan (requires API key)
      - run: brigs scan run --json
        env:
          BRIGS_API_KEY: ${{ secrets.BRIGS_API_KEY }}

      # Or: local scan with SARIF upload (no API key)
      - run: brigs agent-scan . --sarif > results.sarif
      - uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: results.sarif

GitLab CI

brigs-scan:
  image: node:20
  script:
    - npm install -g brigs
    - brigs scan run --json
  variables:
    BRIGS_API_KEY: $BRIGS_API_KEY