gh cybros extension
A GitHub CLI extension that brings Cybros to your
terminal via gh cybros .... It's a single Bash script wrapping the REST API
with curl + jq, and it shares ~/.cybros/config.toml with the Python
cybros CLI — log in with either and both are authenticated.
Requirements
Install
# From the published repo:
gh extension install ayushtenguria/gh-cybros
# Or from a local checkout:
cd clients/gh-cybros && gh extension install .
Verify:
gh cybros help
gh cybros --version
Authenticate
Credentials resolve env → config file (first hit wins):
| What | Env | Config (~/.cybros/config.toml) |
|---|---|---|
| API key | CYBROS_API_KEY | api_key |
| Base URL | CYBROS_API_URL | base_url (default: prod) |
gh cybros login # verifies the key, writes ~/.cybros/config.toml (0600)
# or, for a session:
export CYBROS_API_KEY=cybros_sk_...
Commands
gh cybros <command> [flags]
| Command | Description |
|---|---|
login | Store your API key in ~/.cybros/config.toml. |
whoami | Show the authenticated user / org. |
scan [--repo NAME] | Scan the current (or named) repo, poll, print a summary. |
report <scan_id> | Print the report for a scan. |
findings <scan_id> | List findings for a scan (--severity to filter). |
audit | Compliance overview across frameworks. |
ai-review --scan <id> | Run / fetch the AI analysis for a scan. |
help | Show help. |
--version | Print the extension version. |
Flags
| Flag | Applies to | Description |
|---|---|---|
--json | all read commands | Emit the raw API response to stdout. |
--repo OWNER/NAME | scan | Target repo full name. |
--ref REF | scan | Git ref to scan. |
--severity S | findings | Filter by severity. |
--scan ID | ai-review | Scan id to analyze. |
Diagnostics go to stderr, so --json keeps stdout clean for piping.
Repo resolution
gh cybros scan figures out which repository to scan by:
--repo OWNER/NAMEif provided, elsegh repo view --json nameWithOwner(the current GitHub repo), else- the
origingit remote.
It matches that full_name against GET /repositories, calls POST /scans,
polls until terminal, and prints a severity summary.
Examples
gh cybros login
gh cybros whoami
gh cybros scan # scan the current repo
gh cybros scan --repo octo-org/api --json | jq '.findings_summary'
gh cybros report scan_123
gh cybros findings scan_123 --severity high
gh cybros audit
gh cybros audit --json | jq '.frameworks[] | {framework, score}'
gh cybros ai-review --scan scan_123
Graceful degradation
- Missing
curl/jq→ a clear "X is required" error with an install hint. - Missing API key → prompts you to run
gh cybros loginor setCYBROS_API_KEY. - Unreachable API → "network request failed (is the API reachable?)".
- Missing
ghwhen resolving the repo → falls back to the gitoriginremote.
See also
- GitHub Actions recipes — using this extension (or the CLI) in CI.
cybrosCLI — the fuller-featured Python CLI.