cli

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2026 License: MIT Imports: 17 Imported by: 0

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

func Run(args []string) int

Run dispatches the cli subcommand tree. args is everything after the leading "cli" token (so args[0] is the subcommand name).

func RunWithConfig

func RunWithConfig(args []string, configPath string) int

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL