@attest-it/cli
v0.10.1
Published
Command-line interface for the attest-it human-gated test attestation system.
Readme
@attest-it/cli
Command-line interface for the attest-it human-gated test attestation system.
Overview
This package provides the CLI for attest-it. Most users should install the attest-it umbrella package instead, which includes this CLI automatically.
Installation
npm install -g @attest-it/cliOr install the umbrella package:
npm install attest-itCommands
init
Initialize attest-it configuration in your project:
attest-it init
attest-it init --path .attest-it/config.yamlstatus
Show the current status of all attestations:
attest-it status
attest-it status --suite my-suite
attest-it status --jsonrun
Run tests and create a signed attestation:
attest-it run --suite my-suite
attest-it run --suite my-suite --yes # Skip confirmation
attest-it run --suite my-suite --no-attest # Run without attestingverify
Verify all attestations (for CI):
attest-it verify
attest-it verify --suite my-suite
attest-it verify --strict # Fail on warnings
attest-it verify --jsonprune
Remove stale attestations:
attest-it prune
attest-it prune --dry-run
attest-it prune --keep-days 90Global Options
All commands support these global options:
| Option | Description |
| --------------------- | ------------------- |
| -c, --config <path> | Path to config file |
| -v, --verbose | Verbose output |
| -q, --quiet | Minimal output |
| --help | Show help |
| --version | Show version |
Exit Codes
| Code | Constant | Meaning | | ---- | ------------ | ----------------------------------- | | 0 | SUCCESS | Operation completed successfully | | 1 | FAILURE | Tests failed or attestation invalid | | 2 | NO_WORK | Nothing needed attestation | | 3 | CONFIG_ERROR | Configuration or validation error | | 4 | CANCELLED | User cancelled the operation | | 5 | MISSING_KEY | Missing required key file |
Programmatic Usage
The CLI can also be used programmatically:
import { program } from '@attest-it/cli'
program.parse(['node', 'attest-it', 'status', '--json'])Documentation
Requirements
- Node.js 20+
- OpenSSL (for key generation and signing)
License
MIT
