@astriguard/cli
v1.0.6
Published
AI-powered compliance scanning CLI for Astriguard
Readme
@astriguard/cli
AI-powered compliance scanning for your terminal.
About
Astriguard scans your pull requests for compliance violations using AI, covering SOC 2, HIPAA, GDPR, and the EU AI Act. The CLI brings those same checks to your local machine so you can catch issues before they ever reach code review.
Full documentation and dashboard at astriaguard.com.
Installation
npm install -g @astriguard/cliAuthentication
Before running any scans, authenticate with your GitHub account:
astria-cli loginThis opens a GitHub device flow in your browser and saves a token locally. Run astria-cli logout to revoke it at any time.
Commands
login
Authenticate with Astriguard via GitHub.
astria-cli loginlogout
Revoke your token and remove saved credentials.
astria-cli logoutscan --pre-push
Scan all commits about to be pushed to the remote.
astria-cli scan --pre-pushscan --file <path>
Scan a single file against compliance rules.
astria-cli scan --file src/auth/session.tsinstall-hooks
Install a pre-push git hook in the current repository. Once installed, a compliance scan runs automatically every time you push.
astria-cli install-hooksuninstall-hooks
Remove the pre-push hook installed by Astriguard.
astria-cli uninstall-hooksCompliance Frameworks
By default, scans run against SOC 2. Use --frameworks to target one or more standards:
| Flag value | Standard |
| ----------- | ------------- |
| SOC2 | SOC 2 Type II |
| HIPAA | HIPAA |
| GDPR | GDPR |
| EU_AI_ACT | EU AI Act |
# Single framework
astria-cli scan --pre-push --frameworks HIPAA
# Multiple frameworks
astria-cli scan --pre-push --frameworks SOC2,HIPAA,GDPRRecommended Workflow
Install the hook once per repository:
astria-cli install-hooksFrom that point on, every git push automatically runs astria-cli scan --pre-push. If violations are found, the push is blocked and findings are printed to the terminal. Fix the issues and push again.
Exit Codes
| Code | Meaning |
| ---- | ------------------- |
| 0 | No violations found |
| 1 | Violations found |
Exit codes make it straightforward to integrate the CLI into CI pipelines or custom scripts.
