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/cliSetup
export DRIFTGARD_API_KEY=dg_your_api_key
export DRIFTGARD_PROJECT_ID=proj_your_project_idCommands
Pull active control pack
driftgard pull --format yaml
driftgard pull --pack ./control-packs/prod.json --format jsonPush a new version
driftgard push --pack ./control-packs/prod.yamlActivate a version
driftgard activate --pack-id my_pack --version 3Validate locally (no upload)
driftgard validate --pack ./control-packs/prod.yamlDiff latest two versions
driftgard diffRun CI benchmark
driftgard benchmark --max-violation-rate 0.05 --max-blocked 10CI/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 }}