Skip to main content

Vigolium Audit CLI

Vigolium Audit CLI

olium talks to a provider (Claude / OpenAI / a local model), and two specialised drivers, vigolium-audit and piolium, run on top of it for source-code audits. All settings live in ~/.vigolium/vigolium-configs.yaml. You can edit it directly, or use vigolium config set <key> <value>.

1. Olium agent, the engine everything runs on

olium is the in-process agent runtime (pkg/olium/) that backs every vigolium agent … subcommand. Setting it up means picking one provider and giving it credentials. The supported providers: Verify any setup with:
If that returns a model name, the provider is wired correctly. From there, vigolium agent autopilot, vigolium agent swarm, etc. all work.
If you already use OpenAI’s Codex CLI, vigolium reuses the same OAuth credential file. No API key needed, refresh handled automatically.
~/.codex/auth.json is read on every run; the JWT is auto-refreshed when it expires, so you don’t have to re-login.

3. Claude (Anthropic)

Prefer the official Claude Code client. The recommended way to drive Claude from olium is through Anthropic’s own client — the Agent SDK bridge (anthropic-claude-sdk-bridge, 3a below, the default) or the claude CLI shell-out (anthropic-cli, 3b). Both ride your existing Claude Code subscription through the sanctioned path. The raw OAuth token (3c) and API key (3d) options talk to the Messages API directly — a Pro/Max token used that way lands you in rate-limit / overage territory almost immediately, and the API key bills per token at the highest rates of any provider listed here — so reach for them only if you need direct-API billing (see the warnings on each).
Four options, in order of preference. The first two ride the official Claude Code client; the last two hit the Messages API directly.

3a. Claude Code Agent SDK (anthropic-claude-sdk-bridge)

This is the recommended default way to use Claude with vigolium. It drives Claude Code through the Claude Agent SDK by shelling out to the vigolium-audit bridge sidecar (from vigolium/vigolium-audit) — no API key, it uses your logged-in Claude Code subscription. The run is a controlled, reproducible SDK invocation that always loads the vigolium-scanner skill so the agent knows the vigolium CLI.
The vigolium-audit binary that hosts the bridge is embedded in vigolium — no separate install. Override it with vigolium config set agent.olium.bridge_binary /path/to/vigolium-audit or the per-run --bridge-bin flag. When agent.olium.llm_api_key / oauth_token is set it’s forwarded to the bridge; otherwise the ambient subscription is used.
Unlike the claude CLI shell-out (3b), the SDK bridge does not load your personal ~/.claude config or a project’s CLAUDE.md — it’s a self-contained, reproducible run that behaves the same on any machine (CI, containers). Pick the CLI shell-out below when you want your full personal Claude Code environment applied to the current directory.

3b. Anthropic CLI (claude shell-out)

If you’d rather have vigolium delegate to the claude binary on $PATH (so it uses whatever auth claude itself is configured with, plus your personal CLAUDE.md, MCP servers, and installed skills):
This mode spawns a fresh claude -p subprocess per turn (slower than the SDK bridge above), but it’s the way to apply your full personal Claude Code environment to the current directory.
Note on permissions. vigolium invokes claude -p with --permission-mode bypassPermissions so Bash / Read / WebFetch tool calls execute without interactive approval (the wrapper is non-interactive, there’s no TTY for you to confirm prompts on). This is equivalent to running claude --dangerously-skip-permissions and applies for the duration of the subprocess only.

3c. Claude OAuth (Claude Pro/Max subscribers)

claude setup-token mints an OAuth bearer token tied to your Claude subscription. No per-token billing.
anthropic-oauth reads agent.olium.oauth_token first, then falls back to $ANTHROPIC_API_KEY. The env var is the path of least resistance.
Heads-up, enable extra usage on your Claude account. Pro/Max subscriptions ship with the OAuth token capped to the in-app Claude Code allowance. Driving the same token from vigolium (or any third-party client) hits the Messages API directly and is rejected with 429 rate_limit_error until you turn on extra usage / pay-as-you-go overage in the Anthropic Console (Settings → Billing → Usage limits). Without that toggle the verify call above will fail even with a valid token.

3d. Anthropic API key

For users billing through the standard Anthropic API.

4. Custom LLM Backend (OpenAI/Anthropic Compatible API)

vigolium can drive any custom LLM backend — a cloud gateway or a local LLM API — through two provider drivers that share the same agent.olium.custom_provider config block, differing only in the wire format they speak:
  • openai-compatible — endpoints that speak the OpenAI Chat Completions format: Ollama, LM Studio, vLLM, OpenRouter, Together, Groq, LocalAI, or any custom proxy.
  • anthropic-compatible — endpoints that speak the Anthropic Messages (/v1/messages) format: a self-hosted gateway or LiteLLM-style proxy fronting Claude (or other) models.
Both read custom_provider.base_url (required), custom_provider.model_id, an optional custom_provider.api_key (empty = no auth header, for local servers), and custom_provider.extra_headers. Pick whichever matches your backend’s wire format — everything below applies to both.

Ollama (local, no key)

Empty api_key means no Authorization header is sent, required for Ollama.

OpenRouter

LM Studio

Anthropic-compatible gateway

If your backend speaks the Anthropic Messages API (/v1/messages) rather than OpenAI Chat Completions — a self-hosted gateway or a LiteLLM-style proxy fronting Claude — switch the provider to anthropic-compatible. The custom_provider block is identical:
base_url accepts a full /v1/messages URL, a /v1 root (/messages is appended), or a bare host (/v1/messages is appended). Use extra_headers to switch to a Bearer scheme or pin a specific anthropic-version — entries are applied after the standard headers.

Custom headers (auth, routing, observability)

Some OpenAI- and Anthropic-compatible backends need extra headers, non-Bearer auth schemes, tenant/routing signals, request tagging for cost analytics, etc. extra_headers takes a list of curl-style "Key: Value" entries that are applied after the standard headers, so they can override Authorization (or x-api-key) when needed.
Or edit ~/.vigolium/vigolium-configs.yaml directly:
Notes:
  • ${VAR} references are expanded from the environment when the config is loaded, so credentials don’t need to be checked into the file.
  • On duplicate keys the last entry wins (matches http.Header.Set semantics).
  • Malformed entries (no :) are logged at warn level and skipped, the agent keeps running.
  • To replace the whole list, run .clear "" first, then .add each entry.
You can also pass these as one-shot overrides without touching the config:
extra_headers has no CLI flag, set it once in YAML (or via config set ... .add) and it sticks across runs.
Tool-calling caveat. OpenAI-style function tools are part of the wire format but only some models actually emit them. gemma4, qwen2.5-coder, llama3.1-instruct, and mistral-nemo work well. Smaller models often ignore tool definitions and reply in prose, if the agent never calls tools, switch model.

5. Vigolium audit, source-code driver

vigolium agent audit runs a whitebox source-code audit. The harness (agents, commands, skills) ships embedded in the vigolium binary, no extra install. It drives the claude or codex CLI under the hood (resolved from agent.olium.provider), so you need a working Claude or Codex setup from section 2 or section 3.
Audit modes: lite (3 phases, CI-friendly), balanced (9 phases, default for --audit=balanced), deep (12 phases, full audit). All produce findings under the same parser/schema as native scanner output and are ingested into the vigolium DB. Findings land under ~/.vigolium/agent-sessions/<scan-uuid>/vigolium-results/. See Agentic Security Audit for the full reference.

6. Piolium audit, Pi-native driver

vigolium agent audit --driver=piolium runs a separate, more thorough audit (17 phases at deep) via the Pi coding-agent runtime. Unlike vigolium-audit, piolium is not embedded, you install it once and vigolium drives the pi binary.
Vigolium runs a one-turn preflight against pi before the audit to catch auth/quota errors early. If preflight fails you’ll see the upstream error (e.g. No API key found for google-vertex. Use /login to log into a provider) and the audit won’t start. By default vigolium uses pi’s per-user install at ~/.pi/agent. To use a system-wide install instead, export PIOLIUM_HOME=/opt/piolium (or any other path). See Agentic Security Audit for modes, intensity presets, and the full flag reference.

vigolium-audit vs piolium

You can also run both side-by-side with vigolium agent audit --driver both --source …, that dispatches vigolium-audit then piolium under a single parent scan with project-wide deduplication.

7. Verifying the full stack

After whichever sections you set up, run these in order. Each one fails fast with a useful error if a piece is missing:
If any of these errors out, the message points at the missing piece, usually an unset env var, a wrong agent.olium.provider, or a missing binary.

Where to go next