Repository navigation
feat: add auth0 docs search command for documentation discovery - #1686
Merged
Merged
Conversation
Add a new 'auth0 docs' parent command with a 'search' subcommand (alias 'find') that queries the public Auth0 documentation search index and prints matching pages with their titles, sections, types, and URLs. No authentication is required. - Query can be passed as an argument or entered interactively when omitted. - Results are sorted by descending relevance score. - --language (en/fr/ja, default en) selects the docs language and rejects unsupported values up front. - Output formats: default human table plus --json, --json-compact, and --csv. A single human-mode result renders as a key/value detail view with a snippet. - Agent mode emits machine-readable JSON with raw-markdown .md URLs and a stable field order. - --open opens a result in the browser (interactive picker in a TTY, top result otherwise); in agent mode it fetches the top result's markdown and prints it as JSON instead. - Long section breadcrumbs are collapsed in the table view for readability.
Copilot stopped work on behalf of
developerkunal due to an error
September 23, 2026 04:54
Provider 1.58.0 added token_lifetime_for_anonymous_access_tokens with a validation range of 86400-2592000, but the Management API returns 0 for the built-in Management API resource server, so terraform plan rejected its own generated config. Cap the generated required_providers version at < 1.58.0 so tf generate stays plannable.
- Suppress the interactive open picker when a machine output format (--json/--json-compact/--csv) is set, so --json --open no longer prints JSON and then launches a prompt over it. The picker gate is extracted into docsShouldPromptForResult and unit tested. - Skip the spinner in agent mode at both fetch sites so stderr stays clean and machine-readable, matching the rest of the CLI. - Cap search and markdown response reads with io.LimitReader. - Build page URLs with url.JoinPath to avoid a double slash on leading-slash paths, and handle a single-token openapi value instead of mislabeling it. - Hoist the duplicated docsResultURL call in the picker loop.
--open opens a result in a browser and, in a terminal, lets a human pick which one. An agent can do neither, and previously it just fetched the top result's markdown, which is an arbitrary guess. Agents already get every result's raw-markdown .md URL in the normal JSON output and can fetch pages directly, so fail fast with unsupported_in_agent_mode instead, matching the acul dev pattern. Removes the now-dead markdown-fetch code and its test.
developerkunal
enabled auto-merge (squash)
September 24, 2026 13:07
ramya18101
approved these changes
Sep 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔧 Changes
Adds a new
auth0 docsparent command with asearchsubcommand (aliasfind) so users and agents can discover Auth0 documentation directly from the terminal. It queries the public Auth0 documentation search index and prints matching pages with their titles, types, and URLs. No authentication is required.--json,--json-compact, and--csv(mutually exclusive). A single human-mode result renders as a key/value detail view showing a content snippet..mdform, with a stable field order (title, type, url, snippet, score).--openopens a result in the browser: an interactive picker in a TTY when there are multiple results, otherwise the top result. When a machine output format (--json/--json-compact/--csv) is set, the picker is suppressed and the top result opens so the emitted output is not clobbered. It is not supported in agent mode and fails fast with a clear error; agents fetch a page directly using the raw-markdown.mdURL already present in the JSON output.🔬 Testing
--openrejection.make docs,make test-unit, andmake buildall pass; lint is clean for the new files.📝 Checklist