install

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 23 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 DownloadProgress added in v0.5.1

type DownloadProgress struct {
	Kind    DownloadProgressKind
	Path    string
	Current int64
	Total   int64
}

type DownloadProgressKind added in v0.5.1

type DownloadProgressKind string
const (
	DownloadProgressStart  DownloadProgressKind = "start"
	DownloadProgressUpdate DownloadProgressKind = "update"
	DownloadProgressDone   DownloadProgressKind = "done"
)

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)

func (OSCommandRunner) Run added in v0.5.1

func (OSCommandRunner) Run(ctx context.Context, stdout, stderr io.Writer, name string, args ...string) 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
	DownloadWhisperModels bool
	DownloadFile          func(context.Context, string, string, string) error
	DownloadProgress      func(DownloadProgress)
	CommandOutput         io.Writer
}

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 {
	ImportXBookmarks        bool
	ImportGitHubStars       bool
	ImportYouTubeWatchLater bool
	ImportYouTubeLiked      bool
	ImportFeeds             bool
	EnableAppleNotes        bool
	EnableSafariTabs        bool
	SafariTabsDevice        string
	SyncBrowser             string
	SyncProfile             string
	EnableScheduler         bool
	EnableTailscale         bool
	TSNetHostname           string
	EnableGitHubLogin       bool
	AuthBaseURL             string
	GitHubClientID          string
	UseKeychain             bool
	SummaryModel            string
	CategorizeModel         string
	OCRModel                string
	SkipXPhotoOCR           bool
	SkipCategorize          bool
	TranscriptionBackend    string
	TranscriptionLanguage   string
	WhisperModelPath        string
	WhisperVADModelPath     string
	GitHubTokenConfigured   bool
	Secrets                 map[SecretKind]string
}

func SeedSelectionsFromConfig added in v0.4.3

func SeedSelectionsFromConfig(selections Selections, data []byte) (Selections, error)

SeedSelectionsFromConfig restores the effective import and browser selections represented by an existing config before a reinstall applies explicit flags or presents the interactive checklist. Configs without sync_all.imports retain the legacy sync all defaults.

type StreamingCommandRunner added in v0.5.1

type StreamingCommandRunner interface {
	Run(ctx context.Context, stdout, stderr io.Writer, name string, args ...string) error
}

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"
	ToolWhisperCPP    ToolID = "whisper_cpp_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"
	ToolSummarize     ToolID = "summarize"
	ToolOnePassword   ToolID = "onepassword"
	ToolSecurity      ToolID = "security"
)

Jump to

Keyboard shortcuts

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