cli

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package cli implements the `pano` command tree. Every command is a thin client of the control API; rendering lives here, behaviour lives in the daemon.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(h Hooks)

Execute runs the CLI.

func New

func New(h Hooks) *cobra.Command

New builds the root command.

func Version

func Version() string

Version returns the version string.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App holds shared state for commands.

type DaemonOverrides

type DaemonOverrides struct {
	Port    int
	MCPPort int
	Bind    string
}

DaemonOverrides carry CLI flags into the daemon.

type Hooks

type Hooks struct {
	// Daemon runs the proxy daemon in the foreground until ctx is done.
	Daemon func(ctx context.Context, paths config.Paths, cfg config.Config, overrides DaemonOverrides) error
	// MCP runs the stdio MCP server.
	MCP func(ctx context.Context, c *client.Client, paths config.Paths) error
	// Watchdog waits for pid to exit and restores system proxy settings.
	Watchdog func(ctx context.Context, pid int, statePath string) error
}

Hooks are entrypoints implemented outside this package (to avoid import cycles): the daemon, the MCP server and the watchdog.

Jump to

Keyboard shortcuts

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