cli

package
v3.0.1-alpha9 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package cli provides a public wrapper around the internal weos CLI for use by downstream services that embed the weos binary as a library.

The primary CLI implementation lives in weos/internal/cli. Go's internal package rules prevent that package from being imported outside the weos module, so this thin re-export exists to give downstream binaries a stable public entry point.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

Execute runs the weos CLI root command.

Downstream services embedding weos typically call this from main() after loading environment variables and calling presets.Register() for any custom presets they want to plug into the default registry.

func RegisterEchoConfigurer

func RegisterEchoConfigurer(c internalcli.EchoConfigurer)

RegisterEchoConfigurer registers a function that customizes the serve command's *echo.Echo after core and preset routes are wired and before the dynamic resource catch-all. Use this from a downstream binary's main() (or an init()) to add plain Echo routes without forking serve.go. Must be called before Execute().

func RegisterFxOptions

func RegisterFxOptions(opts ...fx.Option)

RegisterFxOptions appends fx options to be merged into the serve command's fx graph. Use this from a downstream binary's main() to plug in app-specific providers, invokes, or modules without forking serve.go. Must be called before Execute().

func RegisterMCPConfigurer

func RegisterMCPConfigurer(c func(server *mcp.Server, deps MCPConfigurerDeps))

RegisterMCPConfigurer registers a function that adds custom tools to the MCP server, on every transport (stdio and Streamable HTTP), after the built-in tool groups. Use this from a downstream binary's init() to expose a custom, non-CRUD tool — e.g. one that writes through a behavior pipeline rather than directly to projection tables. Must be called before Execute(). Mirrors RegisterEchoConfigurer for HTTP.

Types

type MCPConfigurerDeps

type MCPConfigurerDeps = mcpserver.ConfigurerDeps

MCPConfigurerDeps re-exports the dependency bundle handed to a custom MCP tool configurer (see RegisterMCPConfigurer).

Jump to

Keyboard shortcuts

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