JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 184
  • Score
    100M100P100Q98059F
  • License MIT

Driftgard CLI — governance-as-code for AI compliance

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@driftgard/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @driftgard/cli

    Governance-as-code CLI for Driftgard — manage AI compliance control packs from your terminal and CI pipelines.

    Install

    npm install -g @driftgard/cli

    Setup

    export DRIFTGARD_API_KEY=dg_your_api_key
    export DRIFTGARD_PROJECT_ID=proj_your_project_id

    Commands

    Pull active control pack

    driftgard pull --format yaml
    driftgard pull --pack ./control-packs/prod.json --format json

    Push a new version

    driftgard push --pack ./control-packs/prod.yaml

    Activate a version

    driftgard activate --pack-id my_pack --version 3

    Validate locally (no upload)

    driftgard validate --pack ./control-packs/prod.yaml

    Diff latest two versions

    driftgard diff

    Run CI benchmark

    driftgard benchmark --max-violation-rate 0.05 --max-blocked 10

    CI/CD Example

    # .github/workflows/governance.yml
    name: Governance Check
    on: [push]
    jobs:
      check:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v4
          - run: npx @driftgard/cli validate --pack ./control-packs/prod.yaml
          - run: npx @driftgard/cli push --pack ./control-packs/prod.yaml
            env:
              DRIFTGARD_API_KEY: ${{ secrets.DRIFTGARD_API_KEY }}
              DRIFTGARD_PROJECT_ID: ${{ secrets.DRIFTGARD_PROJECT_ID }}
          - run: npx @driftgard/cli benchmark --max-violation-rate 0.05
            env:
              DRIFTGARD_API_KEY: ${{ secrets.DRIFTGARD_API_KEY }}
              DRIFTGARD_PROJECT_ID: ${{ secrets.DRIFTGARD_PROJECT_ID }}