cli

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package cli implements the pluckr command-line interface using cobra.

Commands stay narrow: each one is a thin layer that wires user input into the registry, pipeline, retriever, or MCP server. Heavy lifting belongs in those packages, not here.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeriveName

func DeriveName(spec, kind string) string

DeriveName is the exported wrapper of deriveName.

func DetectKind

func DetectKind(spec string) string

DetectKind is the exported wrapper of detectKind so the MCP server's add_source tool can share the same logic without duplicating it.

func NewRoot

func NewRoot(version string) *cobra.Command

NewRoot returns the configured root cobra command.

func SetMCPRunner

func SetMCPRunner(fn MCPRunner)

SetMCPRunner registers the runner. internal/mcp.Register() calls this from main.go.

Types

type Globals

type Globals struct {
	CacheRoot string
}

Globals carries the values flags collect at the root level so each subcommand can grab them via a context-friendly accessor without re-parsing.

type MCPRunner

type MCPRunner func(ctx context.Context, g *Globals) error

MCPRunner is the function internal/mcp registers so the CLI can invoke it without importing the MCP package directly (which would create a cycle once the MCP server starts pulling in pipeline / retriever / store helpers that already live downstream of cli).

Jump to

Keyboard shortcuts

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