cli

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Write = func(format string, a ...any) {
		if !strings.HasSuffix(format, "\n") {
			format += "\n"
		}
		fmt.Printf(format, a...)
	}
	WriteInfo            = func(format string, a ...any) { Write(fmt.Sprintf("\x1b[90m%v\x1b[0m", format), a...) }
	WriteError           = func(format string, a ...any) { Write(fmt.Sprintf("\x1b[31m%v\x1b[0m", format), a...) }
	WriteRaw             = func(format string, a ...any) { fmt.Printf(format, a...) }
	Reader     io.Reader = os.Stdin
)

Functions

func Generate

func Generate(cfg gemini.Config, args Args, quiet bool, promptText, schema string, filePaths []string)

func ListSessions

func ListSessions(records []session.Record)

ListSessions displays the current and any saved sessions

Types

type Args

type Args struct {
	CustomURL         *string
	CustomUploadURL   *string
	Version           *bool
	DeleteAllSessions *bool
	DisableGrounding  *bool
	Stats             *bool
	AppDir            *string
	CustomModel       *string
	ProModel          *bool
	MaxTokens         *int
	Temperature       *float64
	TopP              *float64
	SystemPrompt      *string
	UseCase           *string
	// contains filtered or unexported fields
}

Args defines all command line arguments

func ReadArgs

func ReadArgs(homeDir, app, proModel string) Args

func (Args) AccessToken added in v1.3.5

func (args Args) AccessToken() string

func (Args) ContinueSession added in v1.3.6

func (args Args) ContinueSession() bool

func (Args) Debug

func (args Args) Debug() bool

func (Args) DeleteSession

func (args Args) DeleteSession() int

func (Args) ExecutionApproval added in v1.3.3

func (args Args) ExecutionApproval() bool

func (Args) ExecutionEnabled added in v1.3.3

func (args Args) ExecutionEnabled() bool

func (Args) FilePaths added in v1.3.3

func (args Args) FilePaths() string

func (Args) GCPProject

func (args Args) GCPProject() string

func (Args) GCSBucket

func (args Args) GCSBucket() string

func (Args) ListSessions

func (args Args) ListSessions() bool

func (Args) Quiet added in v1.3.6

func (args Args) Quiet() bool

func (Args) RestoreSession

func (args Args) RestoreSession() int

func (Args) SchemaDefinition

func (args Args) SchemaDefinition() string

Jump to

Keyboard shortcuts

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