Pentify
Pentify Terminal

Command reference

Every Pentify Terminal command, the API calls it makes, the scopes it needs, the errors it can return, and what it costs in workspace tokens.

All commands accept the global flags --api-token, --workspace, and --json. Resolution order for the bearer token is documented under Security & token storage. Errors map to the same canonical codes the HTTP API returns — see Errors.

pentify login

Pair the Terminal with a Pentify workspace via the browser.

Synopsispentify login [--workspace <name>]
API callsOpens browser to app.pentify.io/auth/terminal-pair; polls GET /auth/terminal/poll.
Required scopesNone for /poll (public). The minted PAT carries scans:read, scans:write, targets:read, targets:write, reports:read, usage:read.
Retry-safe?Yes. The poll loop is idempotent server-side as long as the same device_id is used per pentify login invocation.
Token cost0 — the poll endpoint is not metered.
ErrorAction
not_paired_yet (404)Keep polling — the user hasn’t authorized yet.
pairing_consumed (410)Re-run pentify login.
validation_error (400)Bug in the client — file an issue.
rate_limited (429)Back off per Retry-After.

pentify logout

Clear the local OS keychain entry. Does not revoke the server-side PAT.

Synopsispentify logout
API callsNone. Purely local.
Required scopesn/a
ErrorsOS-level keychain access denied (not an API error).
Retry-safe?Yes. Idempotent — a second run on a logged-out terminal is a no-op.
Token cost0
Revoke the server-side key
Server-side revocation lives in app.pentify.io/settings/api-keys. pentify logout only removes the local credential.

pentify profile

Show the signed-in user, current workspace, and the API key in use.

Synopsispentify profile
API callsGET /v1/profile
Required scopesusage:read
Retry-safe?Yes. Idempotent GET.
Token cost1 token
ErrorAction
invalid_api_key (401)Run pentify login to re-pair.
insufficient_scope (403)Mint a wider key from Settings → API keys.
internal_error (5xx)Retry once with backoff.

pentify workspaces list

List all Pentify workspaces accessible to the current key’s owner. The active pairing is returned first.

Synopsispentify workspaces list
API callsGET /v1/workspaces
Required scopesusage:read
Retry-safe?Yes. Idempotent GET.
Token cost1 token
ErrorAction
invalid_api_key (401)Run pentify login.
insufficient_scope (403)Re-pair to mint a full-scope key.
clerk_unavailable (503)Retry with exponential backoff.

pentify scans create

Queue a new scan against a verified target.

Synopsispentify scans create <target> --type {quick|standard|compliance}[--idempotency-key <uuid>]
API callsPOST /v1/scans with an Idempotency-Key header. The Terminal auto-generates a UUIDv4 if --idempotency-key is omitted, and persists it across retries within one logical invocation.
Required scopesscans:write. The hostname must already be a verified Target in the workspace; if the Terminal needs to register one, targets:write is required for the sub-flow.
Retry-safe?Only with the same Idempotency-Key (24h server-side dedupe TTL). Without the header, retries double-bill.
Token costquick 1,000 / standard 5,000 / compliance 25,000. Held at create, committed on completion, refunded on fail or cancel.
ErrorAction
validation_error (400)Bad scan_type — only quick/standard/compliance.
target_not_verified (409)Run pentify targets verify <hostname> first.
insufficient_tokens (402)Surface details.top_up_url to the user, stop.
idempotency_key_conflict (409)Different body for the same key — generate a fresh UUID and retry.
rate_limited (429)Back off per Retry-After.
internal_error (5xx)Do not retry POST without the same Idempotency-Key.

pentify scans list

List recent scans for the current workspace, newest first.

Synopsispentify scans list [--status {running|queued|completed|failed|canceled}] [--limit N] [--cursor <opaque>]
API callsGET /v1/scans?status=&limit=&cursor=
Required scopesscans:read
ErrorsCanonical 401 / 403 / 429 / 5xx — see Errors page.
Retry-safe?Yes. Idempotent GET.
Token cost1 token per call. Cursor pagination — the Terminal must not auto-paginate without explicit user opt-in.

pentify scans get

Fetch the current status of a single scan.

Synopsispentify scans get <scan-id>
API callsGET /v1/scans/{id}
Required scopesscans:read
Retry-safe?Yes.
Token cost1
ErrorAction
not_found (404)Scan id is wrong, or the scan belongs to another workspace.

pentify findings list

List findings (severity, title, evidence URLs, remediation) for a completed scan.

Synopsispentify findings list <scan-id> [--severity {critical|high|medium|low|info}]
API callsGET /v1/scans/{id}/findings
Required scopesscans:read
Retry-safe?Yes.
Token cost1
ErrorAction
not_found (404)Wrong id or wrong workspace.
Scan still runningThe API returns the partial set; if status != completed, the Terminal surfaces “scan still running, findings may be incomplete”.
Evidence URL TTL
evidence_urls[] are R2 signed URLs with ~30 minute TTL. Download immediately — never cache the URL itself.

pentify reports open

Open the PDF report in the user’s default viewer.

Synopsispentify reports open <scan-id>
API callsGET /v1/scans/{id}/report.pdf → 302 redirect to a signed R2 URL. Terminal follows the redirect, pipes the bytes into a temp file, and invokes the platform-specific opener (open, xdg-open, start).
Required scopesreports:read (aliases scans:read).
Retry-safe?Yes. The redirect target rotates each call — the Terminal always re-fetches before opening.
Token cost1
ErrorAction
not_found (404)Wrong scan id.
Report not ready (409)Scan hasn’t completed yet — wait and retry.

Token cost summary

At-a-glance budget reference. Mirrors Tokens & pricing.

CommandCost (tokens)
pentify login0
pentify logout0
pentify profile1
pentify workspaces list1
pentify scans create --type quick1,000
pentify scans create --type standard5,000
pentify scans create --type compliance25,000
pentify scans list1 per page
pentify scans get1
pentify findings list1
pentify reports open1