cli

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: MIT Imports: 14 Imported by: 0

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

View Source
const Version = "v0.1.0-dev"

Version is the CLI's reported version.

Variables

This section is empty.

Functions

func LoadDotEnv

func LoadDotEnv(path string) error

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.

func NewOpenRouterClient

func NewOpenRouterClient() (llm.Client, error)

NewOpenRouterClient is the default ClientFactory: it reads the API key from the environment and constructs an openrouter.Client.

Types

type ClientFactory

type ClientFactory func() (llm.Client, error)

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.

Jump to

Keyboard shortcuts

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