Skip to content

[Gap]: CLI guides gap analysis #654

Closed

Description

@danbarr

Summary

A systematic comparison of the CLI guides (docs/toolhive/guides-cli/) against the auto-generated CLI reference (docs/toolhive/reference/cli/) and the ToolHive source code reveals a number of documentation gaps. This issue captures the full analysis for prioritization.

Related issues and PRs


High-priority gaps

Entire features or commands with no coverage in CLI guides.

1. Skills system

The thv skill command tree (build, install, list, info, validate, push, uninstall) has no guide in guides-cli/. PR #641 adds thv skill install docs but only in the vMCP context. The CLI needs its own skills guide covering the full workflow.

Addressed by #656 — added guides-cli/skills-management.mdx covering the full thv skill workflow.

2. Audit logging

--enable-audit and --audit-config flags on thv run are not mentioned in any CLI guide.

Addressed by #936 (merged).

3. thv serve OIDC authentication

api-server.mdx states the API server has "no auth/authz" - this is now inaccurate. The thv serve command has full OIDC flags: --oidc-issuer, --oidc-client-id, --oidc-audience, --oidc-jwks-url, --oidc-introspection-url, --oidc-scopes. The guide needs to be corrected and the auth capability documented.

Addressed by #935 (merged).

4. Registry login/logout

thv registry login and thv registry logout commands exist in the CLI reference but are not mentioned in registry.mdx.

In progress: #934 (open).

5. Export to Kubernetes format

thv export --format k8s generates MCPServer YAML for Kubernetes. run-mcp-servers.mdx only documents JSON export.

Addressed by #936 (merged).

6. Image verification

--image-verification flag on thv run (values: warn, enabled, disabled) controls container image trust verification. Not documented in any guide.

Addressed by #936 (merged).

7. Bearer token support

Tracked in #456. --remote-auth-bearer-token and --remote-auth-bearer-token-file flags on thv run.

Addressed by #932 (merged); also tracked in #456.

8. Build auth files for custom registries

thv config set-build-auth-file (with get-build-auth-file / unset-build-auth-file) injects npmrc, netrc, or yarnrc files into the build stage for authenticating to private package registries. This is distinct from the set-build-env credential path.

In progress: #933 (open) documents both the set-build-env credential path (closing #359) and the set-build-auth-file family.


Medium-priority gaps

Missing flags or options in existing guides.

# Gap Affected guide Details
1 --publish / -p flag run-mcp-servers.mdx Port publishing (hostPort:containerPort) not documented
2 --network flag run-mcp-servers.mdx Network mode (host, custom network, bridge) not documented
3 --env-file / --env-file-dir run-mcp-servers.mdx Loading env vars from files not documented; only -e is shown
4 --foreground / -f flag run-mcp-servers.mdx, manage-mcp-servers.mdx Foreground mode not documented for thv run or thv start
5 --runtime-image / --runtime-add-package build-containers.mdx, run-mcp-servers.mdx Build/runtime customization flags not documented
6 thv status command manage-mcp-servers.mdx Detailed server status command not mentioned; only thv list is shown
7 thv logs prune manage-mcp-servers.mdx Log pruning subcommand not documented
8 environment secrets provider secrets-management.mdx TOOLHIVE_SECRET_* env var provider not documented; only encrypted and 1Password shown
9 thv secret provider command secrets-management.mdx Direct provider setting for scripted/CI deployments not documented
10 Registry OIDC auth on set-registry registry.mdx --issuer, --client-id, --audience, --scopes flags on thv config set-registry not documented
11 --allow-private-ip on set-registry registry.mdx Private IP flag not documented

Lower-priority gaps

Niche or advanced flags that may not need dedicated guide coverage but should be considered.

# Gap Details
1 --label / -l Container labels on thv run
2 --trust-proxy-headers Trust X-Forwarded-* headers
3 --endpoint-prefix SSE endpoint path prefix
4 --allow-docker-gateway Allow Docker gateway connections with network isolation
5 --jwks-allow-private-ip, --jwks-auth-token-file JWKS flags for private deployments
6 --oidc-insecure-allow-http Allow HTTP OIDC for development
7 --resource-url RFC 9728 explicit resource URL
8 --remote-auth-callback-port OAuth callback port customization
9 --oidc-introspection-url Token introspection endpoint
10 --stop --timeout Configurable stop timeout
11 --list --label filter Label-based filtering on list

Inaccuracies in existing docs

# Issue Location Details
1 API server described as having "no auth/authz" api-server.mdx thv serve now has full OIDC flags (see high-priority # 3 above). Fixed by #935 (merged)

Methodology

This analysis compared three sources:

  1. CLI guides in docs/toolhive/guides-cli/ (20 files)
  2. Auto-generated CLI reference in docs/toolhive/reference/cli/ (kept in sync with the CLI)
  3. ToolHive CLI source code (command definitions and flag registrations)

Excluded from scope: thv proxy / thv proxy tunnel (the main use case is covered by thv run for remote servers; thv proxy stdio is already documented in the client compatibility reference).

Activity

  1. added
    documentation
    enhancement
    on Mar 30, 2026
  2. danbarr commented on Jun 12, 2026

    @danbarr
    CollaboratorAuthor

    Triage of medium- and lower-priority gaps

    How-to guides aim to cover common user flows, not every flag. Triage below; esoteric knobs outside typical workflows are intentionally declined. Gap numbers below (#N) refer to the medium/lower lists in the description, not other issues.

    Document (real common-flow value)

    • Medium #3 --env-file / --env-file-dir (run-mcp-servers) - common for servers with many env vars.
    • Medium #6 thv status (manage-mcp-servers) - core operational command; readers only have thv list today.
    • Medium #8 environment secrets provider - document in secrets-management.mdx under "Secrets providers" (alongside encrypted and 1Password; that's the provider catalog / single source of truth). CI/CD is the main use case, but the definition belongs with its peers, not in advanced-cicd.mdx.

    Brief mention (slots cheaply into existing content)

    • Medium #1 --publish / -p (run-mcp-servers) - secondary to the proxy port; verify semantics before writing.
    • Medium #4 --foreground / -f (run + start) - useful for debugging/log-watching.
    • Medium #9 thv secret provider - pair with #8 in secrets-management.
    • Medium #10 set-registry OIDC flags (registry) - complements the registry-login work in Document thv registry login and logout #934 (set-registry can pre-seed the issuer/client-id that login reuses).
    • Medium #5 --runtime-image / --runtime-add-package (build-containers) - niche but real for protocol-scheme builds.
    • Medium #7 thv logs prune (manage) - one-liner in the logs area.
    • Lower #6 --oidc-insecure-allow-http - one line in the serve OIDC section; genuinely useful for local dev.

    Already covered

    Skip (esoteric / not common flows)

    • Medium #2 --network - advanced network mode (host/bridge/custom).
    • Lower #1 --label / #11 --list --label - advanced organizational feature.
    • Lower #2 --trust-proxy-headers, #3 --endpoint-prefix, #4 --allow-docker-gateway - deployment/networking edge cases.
    • Lower #5 --jwks-allow-private-ip / --jwks-auth-token-file, #7 --resource-url - private-JWKS / RFC 9728 esoterica.
    • Lower #8 --remote-auth-callback-port, #10 --stop --timeout - rarely-touched knobs.

    Suggested grouping

    • secrets-management.mdx: environment provider (#8) + thv secret provider (#9)
    • manage-mcp-servers.mdx: thv status (#6) + thv logs prune (#7) + --foreground for start (#4)
    • registry.mdx: set-registry OIDC (#10)
    • build-containers.mdx: --runtime-image / --runtime-add-package (#5)
    • run-mcp-servers.mdx: --env-file (#3), --publish (#1), --foreground (#4) - defer until the page split (Split the CLI "Run MCP servers" guide into run-mode and configuration pages #937) rather than add to a page we're about to carve up.
  3. danbarr commented on Jun 22, 2026

    @danbarr
    CollaboratorAuthor

    All gaps have been addressed. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions