Skip to content

Document thv registry login and logout#934

Open
danbarr wants to merge 3 commits into
mainfrom
docs-cli-registry-login
Open

Document thv registry login and logout#934
danbarr wants to merge 3 commits into
mainfrom
docs-cli-registry-login

Conversation

@danbarr

@danbarr danbarr commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Description

Documents the thv registry login and thv registry logout commands, which existed in the CLI reference but weren't covered in the registry guide. A new "Authenticate to a protected registry" subsection under "Set a remote registry" explains that ToolHive authenticates to protected remote registries with an interactive browser-based OAuth login backed by an OIDC identity provider, walks through running thv registry login (with no flags when config is already saved, or with --registry, --issuer, and --client-id to supply and persist the required values), documents all supported flags including the optional --audience and the default openid,offline_access scopes, notes that OAuth login applies only to remote registries and that supplying a new --registry URL clears previously saved credentials, and covers clearing cached tokens with thv registry logout. Every flag, default, and behavior was verified against the ToolHive source (cmd/thv/app/registry_login.go, registry_logout.go, and pkg/registry/auth/login.go) and the auto-generated CLI reference, and the section cross-links to the Registry Server authentication guide.

Type of change

  • Documentation update

Related issues/PRs

Addresses #654 (high-priority gap # 4: registry login/logout)

The registry login/logout commands existed in the CLI reference but
weren't covered in the registry guide, leaving readers without
instructions for authenticating to a protected remote registry.

Add an "Authenticate to a protected registry" subsection under
"Set a remote registry" that explains the interactive OAuth/OIDC
login flow, the required and optional flags, the credential-clearing
behavior when changing registries, and how to log out. Cross-link to
the Registry Server authentication guide.

Addresses docs-website issue #654 (high-priority gap #4).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 12, 2026 03:17
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-website Ready Ready Preview, Comment Jun 12, 2026 2:27pm

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds missing CLI guide coverage for authenticating to protected remote registries, aligning the guides-cli/registry.mdx how-to content with the existing auto-generated CLI reference for thv registry login / thv registry logout.

Changes:

  • Documented interactive OAuth/OIDC login flow for protected remote registries (thv registry login), including required configuration and supported flags.
  • Documented clearing cached registry credentials via thv registry logout.
  • Added a cross-link to the Registry Server’s authentication configuration guide for server-side setup details.

Comment thread docs/toolhive/guides-cli/registry.mdx Outdated
The section led with a bare `thv registry login`, which fails for a
first-time user with no saved configuration. Lead with the full
required-flags command and present the no-flags form as the follow-up
for subsequent logins, matching the actual command behavior.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@danbarr danbarr force-pushed the docs-cli-registry-login branch from 4cd459a to 0f5a041 Compare June 12, 2026 03:56
@danbarr danbarr marked this pull request as ready for review June 12, 2026 04:16
@danbarr danbarr requested a review from rdimitrov June 12, 2026 04:16
Add the --issuer/--client-id/--audience/--scopes OIDC flags and the
--allow-private-ip flag on thv config set-registry, with a pointer to
the registry login flow. Addresses medium-priority registry gaps in
#654.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants