Documentation
¶
Overview ¶
Package cli wires the aikido command-line tool. The exported NewApp returns a *cli.Command (urfave/cli v3) parameterized by a ClientFactory so tests can substitute a stub llm.Client for the real OpenRouter client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadDotEnv ¶
LoadDotEnv reads simple KEY=VALUE lines from path and sets each key in the process environment if it isn't already set. Lines starting with '#' and blank lines are skipped. Quoted values ("..." or '...') are unwrapped. A missing file is not an error.
func NewApp ¶
func NewApp(factory ClientFactory) *urfavecli.Command
NewApp returns the root *cli.Command tree. factory runs only when a subcommand needs a client, so --help and --version work without a key.
func NewOpenRouterClient ¶
NewOpenRouterClient is the default ClientFactory: it reads the API key from the environment and constructs an openrouter.Client. It returns an error if OPENROUTER_API_KEY is unset. OPENROUTER_BASE_URL, when set, replaces openrouter.DefaultBaseURL: a proxy, or the end-to-end suite's fake server.
Types ¶
type ClientFactory ¶
ClientFactory builds the llm.Client used by every subcommand.
Production wiring uses NewOpenRouterClient (reads OPENROUTER_API_KEY from the env after .env is loaded). Tests inject a stub.