Repository navigation
Closed
Description
Goal
Add a docs search command to the CLI that allows agents and users to search Elastic documentation semantically, without needing external API calls or authentication.
Implementation
The CLI should expose the public Elastic docs search API as a command. This allows:
- Agents to search documentation as part of their workflow
- Users to quickly find relevant docs from the CLI
- Real-time monitoring of which queries agents struggle with (valuable for product/SEO/AI optimization)
API Details
The public docs search API is already available and instrumented:
- Infrastructure: Fastly → AWS WAF → ECS → .NET service → Serverless backend
- Observability: Full instrumentation via AWS Firehose → EDOT
- Security: No backend tokens required in the CLI; WAF protects against DDoS
- Performance: Thin API layer, suitable for CLI use
Related Resources
- Reference implementation: See Go CLI prototype in Add
elastic docscommands: search, ask, and read #1 (includes demos/GIFs) - Public MCP server: Elastic docs search is also available through the public elastic-docs-mcp-server
- Documentation index: Available at https://elastic.co/llms.txt and https://elastic.co/docs/llm.zip
Example Usage
elastic docs search 'how to index documents'
# Returns search results with documentation snippets
elastic docs search 'authentication' --json
# JSON output for agent integrationAcceptance Criteria
- Command exists as
elastic docs search <query> - Returns documentation results with relevance ranking
- Supports
--jsonflag for agent use - Calls public docs search API (no authentication required)
- Handles API errors gracefully
Related Issues
- agentic-interface-program #5 - LLM documentation infrastructure
- agentic-interface-program #6 - Docs integration requirements
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]CLI: Docs search[/-][+]Docs search[/+]github-actions commentedon Apr 9, 2026
MattDevy commentedon Apr 22, 2026
All acceptance criteria are met — closing.
elastic docs search <query>is registered under thedocsgroup and available without any config or authentication.sort=relevanceon the API call).--jsonworks via the global flag; the handler always returns structured data.elastic.co/docs/_api/v1/searchendpoint is used directly — no tokens required.