Skip to content
Generated from guardlink --help. Report problems against guardlink, not this page.

Agent and AI commands

The commands that hand the model to a coding agent or an LLM, check declared agent reach against a code graph and observed tool use, plus the MCP server executable.

Launch a coding agent to add GuardLink security annotations

guardlink annotate [options] <prompt> [dir]

Arguments

Argument Description
prompt Annotation instructions (e.g., “annotate auth endpoints for OWASP Top 10”)
dir Project directory (default: “.”)

Options

Option Description
-p, --project <n> Project name (default: the name in .guardlink/config.json)
--mode <mode> Annotation placement mode: inline (default) or external (externalized .gal files) (default: “inline”)
--claude-code Launch Claude Code in foreground
--codex Launch Codex CLI in foreground
--gemini Launch Gemini CLI in foreground
--cursor Open Cursor IDE with prompt on clipboard
--windsurf Open Windsurf IDE with prompt on clipboard
--clipboard Copy annotation prompt to clipboard only
--stdout Print annotation prompt to stdout and exit (for piping)
--playbook <id> The method: map, exploitable, chains, diff, coverage, verify, logic (inferred from the prompt when omitted; exploitable by default)
--since <ref> For the diff playbook: the ref the changed-file list is taken from (default HEAD)
--no-gate Skip the acceptance check after a terminal agent returns
--gate-retries <n> How many times to re-prompt the agent with the gate’s violations before stripping what still fails (default: “1”)
--no-code-graph Do not read a code graph for the entry-point worklist, even when codegraph-mcp or bravos is installed (also: GUARDLINK_CODEGRAPH=off)
-h, --help display help for command

Ask questions about this project, its threat model, and security posture

guardlink ask [options] [query...]

Arguments

Argument Description
query Question to answer

Options

Option Description
-d, --dir <dir> Project directory (default: “.”)
-p, --project <n> Project name (default: the name in .guardlink/config.json)
--claude-code Launch Claude Code in foreground
--codex Launch Codex CLI in foreground
--gemini Launch Gemini CLI in foreground
--cursor Open Cursor IDE with prompt on clipboard
--windsurf Open Windsurf IDE with prompt on clipboard
--clipboard Copy ask prompt to clipboard only
-h, --help display help for command

Generate an AI threat report using a framework or custom prompt

guardlink threat-report [options] [prompt...]

Arguments

Argument Description
prompt Framework (stride, dread, pasta, attacker, rapid, general) or custom prompt text

Options

Option Description
-d, --dir <dir> Project directory (default: “.”)
-p, --project <n> Project name (default: the name in .guardlink/config.json)
--provider <provider> LLM provider: anthropic, openai, google, openrouter, deepseek (auto-detected from env)
--model <model> Model name (default: provider-specific)
--api-key <key> API key (default: from env variable)
--no-stream Disable streaming output
--web-search Enable web search grounding (OpenAI only)
--thinking Enable extended thinking / reasoning (Anthropic, DeepSeek only)
--claude-code Run via Claude Code (inline)
--codex Run via Codex CLI (inline)
--gemini Run via Gemini CLI (inline)
--cursor Open Cursor IDE with prompt on clipboard
--windsurf Open Windsurf IDE with prompt on clipboard
--clipboard Copy threat report prompt to clipboard only
--shape <shape> Who the report is for: full, executive, pr, audit (default full — the framework’s own structure)
-h, --help display help for command

List saved AI threat reports

guardlink threat-reports [options]

Options

Option Description
-d, --dir <dir> Project directory (default: “.”)
-h, --help display help for command

Governance review of unmitigated exposures — accept, remediate, or skip. Interactive at a TTY; scriptable with –accept/–from. Every acceptance records who, why, and until when.

guardlink review [options] [dir]

Arguments

Argument Description
dir Project directory to scan (default: “.”)

Options

Option Description
-p, --project <n> Project name (default: the name in .guardlink/config.json)
--severity <levels> Filter by severity: critical,high,medium,low
--list Just list reviewable exposures without prompting
-f, --format <fmt> Output format for –list: text (default) or json (default: “text”)
--accept <id> Accept one exposure by id (non-interactive). Needs –by, –justification and –until — none of the three is defaulted
--remediate <id> Mark one exposure for remediation by id (non-interactive). Needs –justification
--skip <id> Record no decision for one exposure by id. Writes nothing; reported for symmetry with a batch file
--by <name> Human recording the decision. Never defaulted: a name nobody supplied is a fabricated signature
--until <date> Acceptance horizon, YYYY-MM-DD. Required — omitting it used to hand out the 365-day ceiling. At a TTY the prompt suggests 90 days
--justification <text> Why this risk is acceptable, or what the planned fix is
--from <file> Apply a JSON batch of decisions: {“decisions”:[{“id”,“decision”,“justification”,“by”,“until”}]}
-h, --help display help for command

Review proposed entitlements (@entitles) — accept, reject, or defer. Only acceptance writes to source, under the name of the human who accepted.

guardlink entitle [options] [dir]

Arguments

Argument Description
dir Project directory to scan (default: “.”)

Options

Option Description
-p, --project <n> Project name (default: the name in .guardlink/config.json)
--list List proposals without prompting
--status <states> Filter by status: proposed,accepted,rejected,deferred
--propose File a proposal instead of reviewing (needs –actor, –capability, –rationale, –file, –line)
--from-config With –propose: draft one proposal per coding-agent capability the repository’s agent configuration grants and no @entitles covers, each citing the line that grants it (narrow with –actor; the accepted annotation goes to –file/–line, default the definitions file)
--actor <ref> Actor being entitled — #id or a declared @actor name
--capability <id> Capability — one identifier, never prose (it is the join key)
--asset <ref> Optional “on <asset>” context
--threat <ref> Threat class the claim is meant to answer for (enables the ownership-class check)
--rationale <text> Why this is by design — must cite the authz code as file:line, or the claim is inert
--file <path> Source file an accepted @entitles should be written to
--line <n> Line in –file to anchor the annotation to
--proposed-by <name> Who or what is filing the proposal (default: “cli”)
--accept <id> Accept a proposal by id (non-interactive)
--reject <id> Reject a proposal by id (requires –note)
--defer <id> Defer a proposal by id
--by <name> Human recording the decision (defaults to git user.name)
--note <text> Decision note — required when rejecting
--acknowledge-inert Accept a proposal that cites no authz code, acknowledging the annotation will be inert (§3.4)
--acknowledge-ownership Accept a proposal the ownership-class check warned about, having read the warning (§3.5)
-h, --help display help for command

Check the declared @agents/@reaches/@effects/@gates against an optional code graph. With –drafts, print draft @agents/@effects for tool registrations that declare no reach. Prints text and writes nothing

guardlink reach [options] [dir]

Arguments

Argument Description
dir Project directory (default: “.”)

Options

Option Description
-p, --project <n> Project name (default: the name in .guardlink/config.json)
--drafts Print draft @agents and @effects lines for each agent tool registration with no declared reach, for review. Never writes source or the model
--json Output as JSON
-h, --help display help for command

Import a local observed-reach document; compare declarations and human description pins

guardlink attest [options] <doc> [dir]

Arguments

Argument Description
doc Observed-reach JSON file
dir Project directory (default: “.”)

Options

Option Description
-h, --help display help for command

Rewrite the stamped GuardLink block in the agent instruction files that exist, and .guardlink/README.md

guardlink sync [options] [dir]

Arguments

Argument Description
dir Project directory (default: “.”)

Options

Option Description
--dry-run Show what would be updated without modifying files
-h, --help display help for command

Manage LLM provider configuration

guardlink config [options] <action> [key] [value]

Arguments

Argument Description
action Action: set, show, clear
key Config key: provider, api-key, model, ai-mode, cli-agent, redact-evidence
value Value to set

Options

Option Description
--global Use global config (~/.config/guardlink/) instead of project
-h, --help display help for command

Start GuardLink MCP server (stdio transport) — for Claude Code, Cursor, etc.

guardlink mcp [options]

Options

Option Description
-h, --help display help for command

Interactive TUI — slash commands, AI chat, exposure triage

guardlink tui [options] [dir]

Arguments

Argument Description
dir project directory (default: “.”)

Options

Option Description
--provider <provider> LLM provider for this session (anthropic, openai, google, openrouter, deepseek)
--api-key <key> LLM API key for this session (not persisted)
--model <model> LLM model override
-h, --help display help for command

The package installs two executables. This is the MCP server a client starts; the tools it serves are at MCP tool reference.

guardlink-mcp --version

2.7.1

guardlink-mcp --help, printed verbatim

guardlink-mcp 2.7.1
GuardLink's threat model as an MCP server over stdio. Started by an MCP
client (Claude Code, Cursor, …), not usually by hand — it speaks JSON-RPC on
stdin/stdout and produces no output on its own.
Usage
guardlink-mcp Serve on stdio
guardlink-mcp --help Show this message
guardlink-mcp --version Print the version
Identical to `guardlink mcp`; both call the same server.
Client configuration
{"mcpServers": {"guardlink": {"command": "guardlink-mcp"}}}
Tools and resources are discovered over the protocol — run `guardlink gal`
or see https://guardlink.bugb.io for the annotation language itself.