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, 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)
-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
-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

Interactive governance review of unmitigated exposures — accept, remediate, or skip

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
-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)
--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

Sync agent instruction files with current threat model — keeps ALL coding agents up to date

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.0.0

guardlink-mcp --help, printed verbatim

guardlink-mcp 2.0.0
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.