config

package
v1.46.2 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BufferDir

func BufferDir() string

func ClaudeHookDir added in v1.9.2

func ClaudeHookDir() string

ClaudeHookDir returns the directory where Quil writes the Claude Code SessionStart hook scripts it passes via --settings. Lives under Quil's own home so we never touch the user's ~/.claude/ config.

func ConfigPath

func ConfigPath() string

func DefaultQuilDir added in v1.18.6

func DefaultQuilDir() string

DefaultQuilDir returns the production default data dir (~/.quil), ignoring QUIL_HOME. Used by dev builds to detect an inherited production-pointing QUIL_HOME.

func EventsDir added in v1.16.0

func EventsDir() string

EventsDir returns the directory where Claude / opencode hooks append per-pane JSONL event spool files (<paneID>.jsonl). The daemon's hookEventsWatcher polls these files on a 200 ms ticker, parses new lines, and feeds them through hookevents.Ingester → eventQueue → IPC fan-out. Truncated at daemon start (no replay of stale events); files for destroyed panes are unlinked.

func InstancesPath

func InstancesPath() string

func IsDefaultQuilDir added in v1.18.6

func IsDefaultQuilDir(dir string) bool

IsDefaultQuilDir reports whether dir resolves to the production default data dir. Case-insensitive on Windows.

func MCPLogDir

func MCPLogDir(cfg MCPConfig) string

func NotesDir

func NotesDir() string

NotesDir returns the directory where per-pane notes are stored.

func PasteDir added in v1.3.0

func PasteDir() string

PasteDir returns the directory where Quil writes clipboard images that are pasted into a pane. Used by the image-paste proxy that works around Claude Code's broken Windows clipboard reader (see anthropics/claude-code#32791) — Quil reads the image, saves a PNG here, and pastes the absolute path into the PTY.

func PidPath

func PidPath() string

func PluginsDir

func PluginsDir() string

func QuilDir

func QuilDir() string

func RecentCWDsPath added in v1.41.0

func RecentCWDsPath(dest string) string

RecentCWDsPath returns the file storing the last-used working directories offered as a quick pick in the pane setup dialog. TUI-owned, single writer.

dest scopes the file to one remote destination. Empty — the local case — keeps the historical name exactly, so existing installs need no migration. Without the scoping, one flat list mixed laptop and server directories: after a remote session the local picker offered paths that exist only on the server, and vice versa.

func Save

func Save(path string, cfg Config) error

Save writes the config to disk atomically (write .tmp then rename).

func SessionsDir added in v1.9.2

func SessionsDir() string

SessionsDir returns the directory where the Claude Code SessionStart hook writes per-pane session id files (<paneID>.id). Read on daemon restore by resumeTemplateFor so panes reattach to the latest session id after /clear, compaction, or /resume rotations.

func SocketPath

func SocketPath() string

func UpdateDir added in v1.37.0

func UpdateDir() string

UpdateDir returns the root directory of the auto-update pipeline: staged binaries, the daemon-owned state.json, and the TUI-owned notified.json all live under it.

func UpdateNotifiedPath added in v1.37.0

func UpdateNotifiedPath() string

UpdateNotifiedPath is the TUI-owned once-per-version startup-dialog marker. The daemon never writes it.

func UpdateStagingDir added in v1.37.0

func UpdateStagingDir(version string) string

UpdateStagingDir returns the directory a given release version is staged into. The stager writes manifest.json into it LAST — its presence is the atomic "staging complete" marker.

func UpdateStagingRoot added in v1.37.0

func UpdateStagingRoot() string

UpdateStagingRoot returns the directory that holds one subdirectory per staged release version.

func UpdateStatePath added in v1.37.0

func UpdateStatePath() string

UpdateStatePath is the daemon-owned check/stage status file. The TUI never writes it (single-writer-per-file rule).

func WindowStatePath

func WindowStatePath() string

func WorkspacePath

func WorkspacePath() string

Types

type Config

type Config struct {
	Daemon       DaemonConfig       `toml:"daemon"`
	GhostBuffer  GhostBufferConfig  `toml:"ghost_buffer"`
	Logging      LoggingConfig      `toml:"logging"`
	Security     SecurityConfig     `toml:"security"`
	UI           UIConfig           `toml:"ui"`
	Keybindings  KeybindingsConfig  `toml:"keybindings"`
	MCP          MCPConfig          `toml:"mcp"`
	Notification NotificationConfig `toml:"notification"`
	Update       UpdateConfig       `toml:"update"`
	Remote       RemoteConfig       `toml:"remote"`
}

func Default

func Default() Config

func Load

func Load(path string) (Config, error)

func (*Config) ClearRemoteBinary added in v1.46.2

func (c *Config) ClearRemoteBinary(dest string)

ClearRemoteBinary forgets the recorded quil path for dest.

Called only when the host probe has ANSWERED and reported no quil at all: the record is then known-false, and keeping it means the next launch runs the same missing path and fails identically. A probe that errored is not evidence — see healRemoteRecord in cmd/quil.

Deleting from a nil map is a no-op in Go, so a config predating the [remote] section needs no special case. That matters here rather than being a curiosity: this runs on the failure path, where a panic would replace a diagnosable error with a crash.

func (*Config) RemoteBinary added in v1.44.0

func (c *Config) RemoteBinary(dest string) string

RemoteBinary returns the recorded quil path for dest, or "" when none has been recorded — in which case the caller falls back to a bare `quil`, which works only if the remote's non-interactive PATH can see it.

func (*Config) SetRemoteBinary added in v1.44.0

func (c *Config) SetRemoteBinary(dest, binary string)

SetRemoteBinary records where quil lives on dest, creating the map on first use so callers need not care whether the config predates this section.

type DaemonConfig

type DaemonConfig struct {
	SnapshotInterval string `toml:"snapshot_interval"`
	AutoStart        bool   `toml:"auto_start"`
}

type GhostBufferConfig

type GhostBufferConfig struct {
	MaxLines int  `toml:"max_lines"`
	Dimmed   bool `toml:"dimmed"`
}

type HookNotificationsConfig added in v1.16.0

type HookNotificationsConfig struct {
	Claude   string `toml:"claude"`
	OpenCode string `toml:"opencode"`
}

HookNotificationsConfig controls which hook-driven events get spool-emitted per source. Tier values are "default" / "verbose" / "off". Daemon passes the resolved value to the hook scripts via the QUIL_HOOK_MODE env var at pane spawn so the script can branch on it (default → forward the v1 tier; verbose → also forward tool-use + pre/post events; off → no spool writes at all). Unset = "default" downstream.

type KeybindingsConfig

type KeybindingsConfig struct {
	Quit            string `toml:"quit"`
	NewTab          string `toml:"new_tab"`
	ClosePane       string `toml:"close_pane"`
	CloseTab        string `toml:"close_tab"`
	SplitHorizontal string `toml:"split_horizontal"`
	SplitVertical   string `toml:"split_vertical"`
	// Linear pane cycling. Empty string = unbound (the default) — users
	// now navigate spatially via PaneLeft/Right/Up/Down. Keeping the fields
	// for backward compat so existing configs that set e.g. next_pane = "tab"
	// continue to work (though that would re-intercept Tab from the PTY).
	NextPane string `toml:"next_pane"`
	PrevPane string `toml:"prev_pane"`
	// Spatial pane navigation — focus the neighbor in a given direction.
	// Defaults are Alt+Arrow. Tab and Shift+Tab are deliberately NOT used
	// so shell completion and Claude Code mode cycling reach the PTY
	// unmolested. Plain Alt+H / Alt+V are also free for the PTY (claude-code
	// uses Alt+V to paste an image); splits live on Alt+Shift+H / Alt+Shift+V
	// instead. Vim users can rebind to "alt+h"/"alt+l"/"alt+k"/"alt+j" in
	// config.toml if they want the classic hjkl motion.
	PaneLeft  string `toml:"pane_left"`
	PaneRight string `toml:"pane_right"`
	PaneUp    string `toml:"pane_up"`
	PaneDown  string `toml:"pane_down"`

	RenameTab          string `toml:"rename_tab"`
	RenamePane         string `toml:"rename_pane"`
	CycleTabColor      string `toml:"cycle_tab_color"`
	ScrollPageUp       string `toml:"scroll_page_up"`
	ScrollPageDown     string `toml:"scroll_page_down"`
	Paste              string `toml:"paste"`
	JSONTransform      string `toml:"json_transform"`
	QuickActions       string `toml:"quick_actions"`
	FocusPane          string `toml:"focus_pane"`
	NotificationToggle string `toml:"notification_toggle"`
	NotificationFocus  string `toml:"notification_focus"`
	// MutePane toggles notification mute on the active pane (idle/bell/exit
	// events stop firing). Useful for `npm test --watch` and other chatty
	// processes that would otherwise flood the sidebar.
	MutePane string `toml:"mute_pane"`
	// RestartPane kills and respawns the active pane's process in place
	// (same pane, same plugin resume strategy — AI panes resume their
	// session via the recorded session id). Recovery for a child that
	// stopped reading stdin ("Pane not accepting input").
	RestartPane string `toml:"restart_pane"`
	GoBack      string `toml:"go_back"`
	NotesToggle string `toml:"notes_toggle"`
	// Redraw forces a full screen repaint (tea.ClearScreen). Recovery key
	// for rendering artifacts left behind by cell-diff drift — width
	// disagreements between Quil and the host terminal (most common on
	// Windows) scramble characters until something repaints everything.
	Redraw string `toml:"redraw"`
	// ToggleEager flips the active pane's eager-restore flag. Eager panes
	// respawn immediately on daemon restart (vs the default lazy deferral) and
	// show a ● marker on their tab.
	ToggleEager string `toml:"toggle_eager"`
	// CommandHistory opens the per-pane input-history modal (list of submitted
	// prompts; Enter opens one full-text read-only). Only meaningful for panes
	// whose plugin sets record_history (claude-code).
	CommandHistory string `toml:"command_history"`
	// ToggleLazygit opens/hides the per-tab lazygit overlay for the git
	// repo resolved from the active pane's CWD.
	ToggleLazygit string `toml:"toggle_lazygit"`
	// ToggleWrap switches the active wide-canvas pane's preview between
	// left-edge crop (default) and soft-wrap. Only meaningful for panes
	// whose plugin sets [display] wide_canvas; no-op elsewhere.
	ToggleWrap string `toml:"toggle_wrap"`
	// CommandPalette opens the fuzzy command palette — a modal, centered
	// launcher for every action plus jump-to-tab/pane. Default is alt+shift+p:
	// ctrl+shift+p is intercepted by many terminals' own command palette
	// (Windows Terminal, VS Code's terminal) before it reaches Quil, so it is
	// deliberately NOT a default. Add it back in config.toml if your terminal
	// leaves it free (e.g. `command_palette = "ctrl+shift+p,alt+shift+p"`).
	CommandPalette string `toml:"command_palette"`
}

type LoggingConfig

type LoggingConfig struct {
	Level string `toml:"level"`

	// MaxSizeMB and MaxFiles drive log rotation via logger.RotatingWriter.
	// When the active quild.log / quil.log would exceed MaxSizeMB it is
	// rotated to a timestamped archive (stem-YYYYMMDD-HHMMSS.log) and a
	// fresh base file is opened. The newest MaxFiles archives are kept;
	// older ones are pruned by modification time. Implemented natively in
	// internal/logger/rotate.go — no external dependency.
	MaxSizeMB int `toml:"max_size_mb"`
	MaxFiles  int `toml:"max_files"`
}

type MCPConfig

type MCPConfig struct {
	HighlightDuration string `toml:"highlight_duration"` // e.g., "10s"
	LogDir            string `toml:"log_dir"`            // empty = ~/.quil/mcp-logs/
}

type NotificationConfig

type NotificationConfig struct {
	SidebarWidth int                     `toml:"sidebar_width"` // default 30
	MaxEvents    int                     `toml:"max_events"`    // default 200
	Hooks        HookNotificationsConfig `toml:"hooks"`
}

type RemoteConfig added in v1.44.0

type RemoteConfig struct {
	Hosts map[string]RemoteHost `toml:"hosts"`
}

RemoteConfig holds per-destination settings for `quil --remote`, keyed by the destination string exactly as the user types it — an ssh_config Host alias, a hostname, or user@host.

type RemoteHost added in v1.44.0

type RemoteHost struct {
	// Binary is the absolute path to quil on that host, as resolved by
	// `quil remote setup`. It is used verbatim as the ssh remote command,
	// which is what makes attaching work when the non-interactive PATH cannot
	// see the install directory — the normal case for ~/.local/bin on Debian
	// and Ubuntu, where ~/.bashrc returns before reaching any PATH line.
	Binary string `toml:"binary"`
}

RemoteHost pins how to reach quil on one remote destination.

type SecurityConfig

type SecurityConfig struct {
	EncryptTokens bool `toml:"encrypt_tokens"`
	RedactSecrets bool `toml:"redact_secrets"`
}

type UIConfig

type UIConfig struct {
	TabDock          string `toml:"tab_dock"`
	Theme            string `toml:"theme"`
	MouseScrollLines int    `toml:"mouse_scroll_lines"`
	PageScrollLines  int    `toml:"page_scroll_lines"`
	// LogViewerPageLines controls the cursor jump distance for Alt+Up /
	// Alt+Down inside the F1 → log viewer. 0 falls back to the default 40.
	LogViewerPageLines int  `toml:"log_viewer_page_lines"`
	ShowDisclaimer     bool `toml:"show_disclaimer"`
}

type UpdateConfig added in v1.37.0

type UpdateConfig struct {
	Check bool `toml:"check"`
	Auto  bool `toml:"auto"`
}

UpdateConfig controls the auto-update pipeline. Check gates the daily GitHub release check (one unauthenticated GET to api.github.com); Auto gates background download + staging of a newer release. auto = false degrades to notify-only. Dev builds (version.IsRelease() == false) skip the pipeline regardless of these settings.

Jump to

Keyboard shortcuts

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