cli

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExitCodeOK   = 0
	ExitCodeFail = 1

	DefaultExceedThreshold = 4000

	DefaultOpenAIModel = "gpt-5-nano"
	DefaultGeminiModel = "gemini-2.0-flash-lite"
)

Variables

View Source
var (
	Version string
)

Functions

This section is empty.

Types

type CLI

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

CLI holds the input/output streams and the Translator.

func NewCLI

func NewCLI(outStream, errStream io.Writer, inputStream io.Reader, tr Translator, isStdinTerminal bool) *CLI

NewCLI returns a new CLI instance.

func (*CLI) Run

func (c *CLI) Run(args []string) int

Run parses CLI arguments and executes the appropriate functionality.

func (*CLI) RunDump added in v0.1.7

func (c *CLI) RunDump(repoPath, description string) error

RunDump processes the repository path and writes its contents to standard output.

type GeminiTranslator added in v0.2.0

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

GeminiTranslator implements the Translator interface using the Gemini API client.

func NewGeminiTranslator added in v0.2.0

func NewGeminiTranslator(apiKey string) (*GeminiTranslator, error)

NewGeminiTranslator creates a new GeminiTranslator with the given API key.

type Translator

type Translator interface {
	// contains filtered or unexported methods
}

Translator is the interface used to request a response.

func NewOpenAITranslator added in v0.2.0

func NewOpenAITranslator(apiKey string) (Translator, error)

NewOpenAITranslator creates a new translator using the OpenAI API.

Jump to

Keyboard shortcuts

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