profile

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultPath

func DefaultPath() string

DefaultPath returns the default profiles file location (~/.aimux/profiles.json).

Types

type Profile

type Profile struct {
	Name     string `json:"name"`
	Provider string `json:"provider,omitempty"`
	Dir      string `json:"dir,omitempty"`
	Model    string `json:"model,omitempty"`
	Mode     string `json:"mode,omitempty"`
}

Profile stores a named bundle of flags (provider, dir, model, mode).

type Store

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

Store manages a collection of named profiles persisted to a JSON file.

func NewStore

func NewStore(path string) *Store

NewStore creates a new Store backed by the given file path.

func (*Store) Delete

func (s *Store) Delete(name string) error

Delete removes a profile by name and persists to disk.

func (*Store) Get

func (s *Store) Get(name string) (Profile, bool)

Get returns a profile by name.

func (*Store) List

func (s *Store) List() []Profile

List returns all profiles sorted alphabetically by name.

func (*Store) Load

func (s *Store) Load() error

Load reads profiles from disk. Missing file is not an error.

func (*Store) Names

func (s *Store) Names() []string

Names returns all profile names sorted alphabetically.

func (*Store) Save

func (s *Store) Save(p Profile) error

Save adds or updates a profile and persists to disk.

Jump to

Keyboard shortcuts

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