Documentation
¶
Overview ¶
Package cli exposes the sourcemux engine layer (Grok pool, Jina Reader, Tavily) as a non-MCP one-shot CLI. It is invoked via `sourcemux cli <subcommand> [flags]` and mirrors the MCP tool surface: search / fetch / map / crawl / doctor / probe / config / setup / plan / research / smart-answer.
Design notes:
- The CLI calls engine.* directly; it deliberately does NOT go through internal/tools because those are tightly bound to mark3labs/mcp-go's CallToolRequest. Sharing engine.* keeps both surfaces honest about a single source of behavior.
- Every subcommand supports --json so callers can parse output reliably.
- Run never panics; it returns a Unix-style exit code (0=ok, 1=runtime failure, 2=usage error, 3=config gate) and lets main.go translate to os.Exit.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run dispatches the cli subcommand tree. args is everything after the leading "cli" token (so args[0] is the subcommand name).
func RunWithConfig ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.