install

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 21 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCategoriesTemplate []byte
View Source
var DefaultConfigTemplate []byte
View Source
var DefaultDbrainModelfile []byte

Functions

This section is empty.

Types

type Change

type Change struct {
	Kind    ChangeKind
	Path    string
	Message string
}

type ChangeKind

type ChangeKind string
const (
	ChangeCreated  ChangeKind = "created"
	ChangeUpdated  ChangeKind = "updated"
	ChangeSkipped  ChangeKind = "skipped"
	ChangePrepared ChangeKind = "prepared"
)

type CommandRunner added in v0.4.1

type CommandRunner interface {
	CombinedOutput(ctx context.Context, name string, args ...string) ([]byte, error)
}

type DetectionOptions

type DetectionOptions struct {
	GOOS    string
	HomeDir string
	Prober  Prober
	Timeout time.Duration
}

type FileSystem

type FileSystem interface {
	MkdirAll(path string, perm os.FileMode) error
	WriteFile(path string, data []byte, perm os.FileMode) error
	ReadFile(path string) ([]byte, error)
	Stat(path string) (os.FileInfo, error)
}

type KeychainSecretStore

type KeychainSecretStore struct{}

func (KeychainSecretStore) PutSecret

func (KeychainSecretStore) PutSecret(_ context.Context, service string, account string, value string) error

func (KeychainSecretStore) SecretExists added in v0.4.2

func (KeychainSecretStore) SecretExists(_ context.Context, service string, account string) (bool, error)

type OSCommandRunner added in v0.4.1

type OSCommandRunner struct{}

func (OSCommandRunner) CombinedOutput added in v0.4.1

func (OSCommandRunner) CombinedOutput(ctx context.Context, name string, args ...string) ([]byte, error)

type OSFS

type OSFS struct{}

func (OSFS) MkdirAll

func (OSFS) MkdirAll(path string, perm os.FileMode) error

func (OSFS) ReadFile

func (OSFS) ReadFile(path string) ([]byte, error)

func (OSFS) Stat

func (OSFS) Stat(path string) (os.FileInfo, error)

func (OSFS) WriteFile

func (OSFS) WriteFile(path string, data []byte, perm os.FileMode) error

type OSProber

type OSProber struct {
	Client *http.Client
}

func (OSProber) Get

func (p OSProber) Get(ctx context.Context, url string) ([]byte, error)

func (OSProber) LookPath

func (OSProber) LookPath(name string) (string, error)

func (OSProber) PathExists

func (OSProber) PathExists(path string) bool

type OllamaModelSetup added in v0.4.1

type OllamaModelSetup struct {
	Model         string
	PullModel     string
	Modelfile     []byte
	ModelfileName string
}

type Options

type Options struct {
	Config             config.Config
	ConfigTemplate     []byte
	CategoriesTemplate []byte
	Runtime            Runtime
	Selections         Selections
	OllamaModels       []OllamaModelSetup
	Tools              []Tool
	FS                 FileSystem
	CommandRunner      CommandRunner
	SecretStore        SecretStore
	Force              bool
	DryRun             bool
}

type Prober

type Prober interface {
	LookPath(name string) (string, error)
	PathExists(path string) bool
	Get(ctx context.Context, url string) ([]byte, error)
}

type Result

type Result struct {
	ConfigPath     string
	CategoriesPath string
	Tools          []Tool
	Changes        []Change
	Warnings       []string
	FS             FileSystem
}

func Run

func Run(ctx context.Context, opts Options) (Result, error)

type Runtime

type Runtime struct {
	GOOS    string
	HomeDir string
}

type SecretKind

type SecretKind string
const (
	SecretGitHubToken        SecretKind = "github_token"
	SecretOpenRouterAPIKey   SecretKind = "openrouter_api_key"
	SecretTSNetAuthKey       SecretKind = "tsnet_auth_key"
	SecretAuthSessionKey     SecretKind = "auth_session_key"
	SecretGitHubClientSecret SecretKind = "github_client_secret"
)

type SecretStore

type SecretStore interface {
	PutSecret(ctx context.Context, service string, account string, value string) error
	SecretExists(ctx context.Context, service string, account string) (bool, error)
}

type Selections

type Selections struct {
	EnableAppleNotes  bool
	EnableSafariTabs  bool
	EnableScheduler   bool
	EnableTailscale   bool
	TSNetHostname     string
	EnableGitHubLogin bool
	AuthBaseURL       string
	GitHubClientID    string
	UseKeychain       bool
	SummaryModel      string
	CategorizeModel   string
	OCRModel          string
	SkipXPhotoOCR     bool
	SkipCategorize    bool
	Secrets           map[SecretKind]string
}

type Tool

type Tool struct {
	ID        ToolID
	Name      string
	Available bool
	Path      string
	Endpoint  string
	Models    []string
	Detail    string
	Error     string
}

func DetectTools

func DetectTools(ctx context.Context, opts DetectionOptions) []Tool

type ToolID

type ToolID string
const (
	ToolMacWhisper    ToolID = "macwhisper_cli"
	ToolMacWhisperApp ToolID = "macwhisper_app"
	ToolOllama        ToolID = "ollama_cli"
	ToolOllamaAPI     ToolID = "ollama_api"
	ToolLMStudio      ToolID = "lmstudio_cli"
	ToolLMStudioAPI   ToolID = "lmstudio_api"
	ToolOMLX          ToolID = "omlx_cli"
	ToolOMLXAPI       ToolID = "omlx_api"
	ToolTesseract     ToolID = "tesseract"
	ToolFFprobe       ToolID = "ffprobe"
	ToolYTDLP         ToolID = "yt_dlp"
	ToolOnePassword   ToolID = "onepassword"
	ToolSecurity      ToolID = "security"
)

Jump to

Keyboard shortcuts

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