---
title: thv llm
hide_title: true
description: Reference for ToolHive CLI command `thv llm`
last_update:
  author: autogenerated
slug: thv_llm
mdx:
  format: md
---

## thv llm

Manage LLM gateway authentication

### Synopsis

Configure and manage authentication for OIDC-protected LLM gateways.

The llm command bridges AI coding tools to LLM gateways by handling OIDC
authentication transparently. Two modes are supported:

  Proxy mode    — a localhost reverse proxy injects fresh tokens for tools
                  that only accept static API keys (e.g. Cursor).
  Token helper  — "thv llm token" prints a fresh JWT suitable for use as
                  apiKeyHelper or auth.command in OIDC-capable tools
                  (e.g. Claude Code).

To configure the gateway connection settings, use:

  thv llm config set --gateway-url https://llm.example.com \
                     --issuer https://auth.example.com \
                     --client-id my-client-id

Use "thv llm config show" to view the current configuration.

### Options

```
  -h, --help   help for llm
```

### Options inherited from parent commands

```
      --debug   Enable debug mode
```

### SEE ALSO

* [thv](thv.md)	 - ToolHive (thv) is a lightweight, secure, and fast manager for MCP servers
* [thv llm config](thv_llm_config.md)	 - Manage LLM gateway configuration
* [thv llm proxy](thv_llm_proxy.md)	 - Manage the LLM gateway localhost proxy
* [thv llm setup](thv_llm_setup.md)	 - Configure detected AI tools to use the LLM gateway
* [thv llm teardown](thv_llm_teardown.md)	 - Remove LLM gateway configuration from all (or one) configured tools
* [thv llm token](thv_llm_token.md)	 - Print a fresh LLM gateway access token to stdout

