gemini

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package gemini provides the Gemini CLI command adapter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct{}

Adapter converts between canonical Command and Gemini CLI command format.

func (*Adapter) DefaultDir

func (a *Adapter) DefaultDir() string

DefaultDir returns the default directory name for Gemini commands.

func (*Adapter) FileExtension

func (a *Adapter) FileExtension() string

FileExtension returns the file extension for Gemini commands.

func (*Adapter) Marshal

func (a *Adapter) Marshal(cmd *core.Command) ([]byte, error)

Marshal converts canonical Command to Gemini command TOML bytes.

func (*Adapter) Name

func (a *Adapter) Name() string

Name returns the adapter identifier.

func (*Adapter) Parse

func (a *Adapter) Parse(data []byte) (*core.Command, error)

Parse converts Gemini command TOML bytes to canonical Command.

func (*Adapter) ReadFile

func (a *Adapter) ReadFile(path string) (*core.Command, error)

ReadFile reads a Gemini command TOML file and returns canonical Command.

func (*Adapter) WriteFile

func (a *Adapter) WriteFile(cmd *core.Command, path string) error

WriteFile writes canonical Command to a Gemini command TOML file.

type ArgumentToml

type ArgumentToml struct {
	Name        string `toml:"name"`
	Type        string `toml:"type,omitempty"`
	Required    bool   `toml:"required,omitempty"`
	Default     string `toml:"default,omitempty"`
	Hint        string `toml:"hint,omitempty"`
	Description string `toml:"description,omitempty"`
}

ArgumentToml represents an argument in TOML format.

type CommandSection

type CommandSection struct {
	Name        string `toml:"name"`
	Description string `toml:"description"`
}

CommandSection contains command metadata.

type ContentSection

type ContentSection struct {
	Instructions string `toml:"instructions"`
}

ContentSection contains the command instructions.

type ExampleToml

type ExampleToml struct {
	Description string `toml:"description,omitempty"`
	Input       string `toml:"input"`
	Output      string `toml:"output,omitempty"`
}

ExampleToml represents an example in TOML format.

type GeminiCommand

type GeminiCommand struct {
	Command   CommandSection `toml:"command"`
	Arguments []ArgumentToml `toml:"arguments,omitempty"`
	Content   ContentSection `toml:"content"`
	Process   []string       `toml:"process,omitempty"`
	Examples  []ExampleToml  `toml:"examples,omitempty"`
}

GeminiCommand represents a Gemini CLI command in TOML format.

Jump to

Keyboard shortcuts

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