Documentation
¶
Overview ¶
Package config loads ~/.config/unpause/config.toml and discovers Claude Code config roots.
Index ¶
Constants ¶
const CoworkLabel = "cowork"
CoworkLabel is the Account every Claude Desktop Cowork root is listed under.
Variables ¶
This section is empty.
Functions ¶
func DefaultRoot ¶ added in v0.1.1
func DefaultRoot() string
DefaultRoot is the directory Claude Code uses when CLAUDE_CONFIG_DIR is unset.
func EnvFor ¶ added in v0.1.1
EnvFor returns the CLAUDE_CONFIG_DIR value to launch a session under root with. It is empty for the default root: Claude Code must run with the variable UNSET there, because with it set it looks for .claude.json inside the directory instead of at ~/.claude.json and starts the login wizard.
Types ¶
type Config ¶
type Config struct {
// Opener is "auto", "tab", "tmux" or "inplace".
Opener string `toml:"opener"`
// Claude is the binary to run; defaults to "claude" from PATH.
Claude string `toml:"claude"`
// Roots overrides or extends the auto-detected list.
Roots []Root `toml:"roots"`
// NoAutoDetect turns off the ~/.claude* scan; only Roots are used.
NoAutoDetect bool `toml:"no_auto_detect"`
// MCP configures `unpause mcp`.
MCP MCP `toml:"mcp"`
// Recap configures Recaps.
Recap Recap `toml:"recap"`
}
Config is the on-disk configuration. Every field is optional.
func (*Config) ResolveRoots ¶
ResolveRoots merges auto-detected ~/.claude* dirs, $CLAUDE_CONFIG_DIR and configured roots. Configured labels win over derived ones for the same path.
type MCP ¶ added in v0.6.0
type MCP struct {
// Exclude holds globs on the folders a Session worked in; matching Sessions are
// invisible to the MCP server. Load expands ~, cleans each pattern and rejects bad ones.
Exclude []string `toml:"exclude"`
}
MCP is the [mcp] table.
type Recap ¶ added in v0.8.0
type Recap struct {
// Enabled turns Recaps on. Off by default, because each Recap sends part of a
// Session's talk to Claude Haiku (ADR 0012).
Enabled bool `toml:"enabled"`
}
Recap is the [recap] table.
type Root ¶
type Root struct {
Label string `toml:"label"`
Path string `toml:"path"`
// Cowork marks a root found under Claude Desktop's Cowork folder. Its sessions are read-only.
Cowork bool `toml:"-"`
}
Root is one Claude Code config directory (what CLAUDE_CONFIG_DIR points at) with a human label.