@olydi/cli
v0.1.1
Published
OLYDI DevSecOps CLI — scan your code from the terminal
Downloads
19
Readme
@olydi/cli
OLYDI DevSecOps CLI — scan your code from the terminal.
Install
# npm (global)
npm install -g @olydi/cli
# npx (no install)
npx @olydi/cli scan --wait
# From source
git clone https://github.com/olydi/autonomous-workflow-harness
cd autonomous-workflow-harness/cli && npm linkRequires Node.js 18+ (uses built-in fetch). Zero npm dependencies.
Quick Start
# 1. Authenticate with your API key
olydi login --token olydi_sk_your_key_here
# 2. Run a scan (auto-detects repo from git remote)
olydi scan --wait
# 3. View findings
olydi findings --severity critical,high
# 4. Auto-fix critical findings
olydi fix --severity criticalCommands
olydi scan
Trigger a security scan on your repository.
olydi scan # queue scan, exit immediately
olydi scan --wait # wait for scan to complete
olydi scan --repo owner/repo --wait # explicit repo
olydi scan --format json # machine-readable outputOptions:
| Flag | Description |
|------|-------------|
| --repo <owner/repo> | Target repository. Auto-detected from git remote if omitted. |
| --wait | Poll until the scan completes, then print the findings summary. |
| --sarif <path> | Write findings as SARIF 2.1.0 to <path>. Implies --wait. |
| --fail-on <level> | Exit 1 if findings at/above this severity exist. Implies --wait. |
| --format text\|json | Output format. Default: text. |
olydi findings
List findings from your latest scan.
olydi findings # all findings
olydi findings --severity critical # critical only
olydi findings --severity critical,high # critical + high
olydi findings --gate secrets # filter by gate
olydi findings --format json # JSON output for scriptingOptions:
| Flag | Description |
|------|-------------|
| --severity <level> | Filter by severity. Comma-separated: critical,high,medium,low. |
| --gate <name> | Filter by security gate. Comma-separated. |
| --limit <n> | Max findings to return. Default: 50. |
| --format text\|json | Output format. Default: text. |
olydi fix
Request auto-remediation for findings.
olydi fix --severity critical # fix all critical findings
olydi fix --finding fp_a1b2c3d4 # fix a specific finding
olydi fix --finding fp_abc,fp_def # fix multiple findingsOptions:
| Flag | Description |
|------|-------------|
| --severity <level> | Fix all findings at this severity level. |
| --finding <id> | Fix specific finding(s) by ID. Comma-separated. |
| --format text\|json | Output format. Default: text. |
olydi login
Authenticate with OLYDI.
olydi login --token olydi_sk_your_key_here
olydi login --token $OLYDI_TOKEN --api-url https://custom.api.example.comCredentials are saved to ~/.config/olydi/credentials.json (mode 0600).
Options:
| Flag | Description |
|------|-------------|
| --token <api-key> | API key for authentication. Generate at app.olydi.com/settings/api-keys. |
| --api-url <url> | Override the API base URL. |
olydi status
Show current authentication and repository context.
olydi statusAuthentication
The CLI resolves auth tokens in this order:
--tokenflag (highest priority)OLYDI_TOKENenvironment variable~/.config/olydi/credentials.jsonfile
CI/CD Usage
Set the OLYDI_TOKEN environment variable in your CI pipeline:
# GitHub Actions
- name: OLYDI Scan
env:
OLYDI_TOKEN: ${{ secrets.OLYDI_TOKEN }}
run: npx @olydi/cli scan --wait --format json# GitLab CI
olydi-scan:
script:
- npx @olydi/cli scan --wait --format json
variables:
OLYDI_TOKEN: $OLYDI_TOKENJSON Output
All commands support --format json for scripting and CI integration:
# Scan and capture run ID
RUN_ID=$(olydi scan --format json | jq -r '.run_id')
# Get critical findings as JSON
olydi findings --severity critical --format json | jq '.items[]'
# Count findings by severity
olydi findings --format json | jq '.total'Environment Variables
| Variable | Description |
|----------|-------------|
| OLYDI_TOKEN | API authentication token |
| OLYDI_API_URL | Override the API base URL (default: https://api.olydi.com) |
| VALTY_URL | Override the API base URL. Takes priority over OLYDI_API_URL (and the saved api_url). Opt-in only — unset by default, so behavior is unchanged unless set explicitly. |
| NO_COLOR | Disable colored output (no-color.org) |
License
Apache-2.0
