cli

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	LogFormat string            `help:"Log format" enum:"json,text" default:"json" env:"LOG_FORMAT"`
	Color     bool              `help:"Enable color output" negatable:"" default:"true"`
	Debug     bool              `help:"Enable debug mode" env:"DEBUG"`
	ExtVar    map[string]string `help:"External variables external string values for Jsonnet" env:"EXT_VAR"`
	ExtCode   map[string]string `help:"External code external string values for Jsonnet" env:"EXT_CODE"`
	Project   string            `cmd:"" help:"Project directory" default:"./" env:"ESTELLM_PROJECT"`
	Prompts   string            `cmd:"" help:"Prompts directory" default:"./prompts" env:"ESTELLM_PROMPTS"`
	Includes  string            `cmd:"" help:"Includes directory" default:"./includes" env:"ESTELLM_INCLUDES"`
	Exec      ExecOption        `cmd:"" help:"Execute the estellm"`
	Render    RenderOption      `cmd:"" help:"Render prompt/config the estellm"`
	Docs      DocsOptoin        `cmd:"" help:"Show agents documentation"`
	Version   struct{}          `cmd:"" help:"Show version"`
}

func (*CLI) Run

func (c *CLI) Run(ctx context.Context) int

type DocsOptoin

type DocsOptoin struct {
}

type ExecOption

type ExecOption struct {
	PromptOption
	OutputFormat      string `help:"Output format" enum:"json,text" default:"text"`
	IncludeUpstream   bool   `help:"Include upstream dependencies" negatable:""`
	IncludeDownstream bool   `help:"Include downstream dependencies" default:"true" negatable:""`
	DumpMetadata      bool   `help:"Dump metadata if output format is text"`
	FileOutput        string `help:"Output file dir" default:"generated"`
}

type PromptOption

type PromptOption struct {
	PromptName string `arg:"" help:"Prompt name" default:""`
	Payload    []byte `help:"Execution Payload"`
}

func (*PromptOption) ParsePayload

func (e *PromptOption) ParsePayload() (map[string]any, error)

type RenderOption

type RenderOption struct {
	PromptOption
	Target  string `arg:"" help:"rendering target" default:""`
	Jsonnet bool   `help:"if render target is \"config\", render as jsonnet"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳