Skip to main content

thv llm setup

Configure detected AI tools to use the LLM gateway

Synopsis

Detect installed AI coding tools (Claude Code, Gemini CLI, Cursor, VS Code, Xcode) and patch each tool's configuration to route through the LLM gateway.

Token-helper tools (Claude Code, Gemini CLI) are configured to call "thv llm token" to obtain a fresh OIDC token on demand.

Proxy-mode tools (Cursor, VS Code, Xcode) are configured to send requests to the localhost reverse proxy started by "thv llm proxy start".

Use --client to configure only a single named tool instead of all detected tools. An error is returned if the named client is not installed.

Inline flags (--gateway-url, --issuer, --client-id, etc.) are applied for this run and persisted to config only after login and tool patching succeed. This lets you combine "config set" and "setup" into a single command.

Run "thv llm teardown" to revert all changes.

thv llm setup [flags]

Options

--anthropic-path-prefix string Path prefix appended to the gateway URL when writing ANTHROPIC_BASE_URL for direct-mode tools (e.g. /anthropic). When omitted, the gateway is probed automatically.
--audience string OIDC audience (optional)
--callback-port int OIDC callback port (omit to keep current; default: ephemeral)
--client string Configure only this AI tool by name (e.g. claude-code, cursor). Omit to configure all detected tools.
--client-id string OIDC client ID
--gateway-url string LLM gateway base URL (must use HTTPS)
-h, --help help for setup
--issuer string OIDC issuer URL
--proxy-port int Localhost proxy listen port (omit to keep current; default: 14000)
--tls-skip-verify Skip TLS certificate verification for the upstream gateway (local dev only). For direct-mode tools (Claude Code, Gemini CLI) this sets NODE_TLS_REJECT_UNAUTHORIZED=0, disabling TLS for ALL of that tool's outbound connections. For proxy-mode tools only the proxy-to-gateway connection is affected.

Options inherited from parent commands

--debug Enable debug mode

SEE ALSO

  • thv llm - Manage LLM gateway authentication