cli

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package cli implements the embyfin-mcp command line interface: the cobra commands, flag and config handling, and the MCP server exposing Emby and Jellyfin library tools to AI clients.

Index

Constants

This section is empty.

Variables

View Source
var DefaultToolsets = []string{"core"}

DefaultToolsets is what the binary registers when --toolsets is not given: enough to find things and read them, and nothing that writes. The whole surface is thousands of tokens of tool definitions before a question is asked, which is a poor thing to spend a client's context on by default. Ask for more with --toolsets, or --toolsets all for everything.

Functions

func Make

func Make() (*cobra.Command, error)

func ValidateParams

func ValidateParams(params []string) func(cmd *cobra.Command, args []string) error

Types

type FlagData

type FlagData struct {
	Backend      string   `mapstructure:"backend"`
	Server       string   `mapstructure:"server"`
	Token        string   `mapstructure:"token"`
	ReadOnly     bool     `mapstructure:"read-only"`
	EnableDelete bool     `mapstructure:"enable-delete"`
	Toolsets     []string `mapstructure:"toolsets"`
	AllowTools   []string `mapstructure:"allow-tools"`
	DenyTools    []string `mapstructure:"deny-tools"`
	Listen       string   `mapstructure:"listen"`
	AuthToken    string   `mapstructure:"auth-token"`
	AllowNoAuth  bool     `mapstructure:"allow-no-auth"`
	TMDBKey      string   `mapstructure:"tmdb-key"`
}

func GetFlags

func GetFlags() *FlagData

GetFlags returns the fully populated FlagData. We must unmarshal from Viper instead of using globally bound pflags variables because pflags only parses command-line arguments. Viper merges environment variables (and config files) on top of the CLI flags.

func (*FlagData) NewClient

func (f *FlagData) NewClient() (*embyfin.Client, error)

func (*FlagData) ToolOptions

func (f *FlagData) ToolOptions() tools.Options

ToolOptions maps the flags onto the tool registration options.

Jump to

Keyboard shortcuts

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