config

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 8 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

Overview

Package config loads ~/.config/unpause/config.toml and discovers Claude Code config roots.

Index

Constants

View Source
const CoworkLabel = "cowork"

CoworkLabel is the Account every Claude Desktop Cowork root is listed under.

Variables

This section is empty.

Functions

func CachePath

func CachePath() string

CachePath returns where the session index cache lives.

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

func EnvFor(root string) string

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.

func Path

func Path() string

Path returns the config file location.

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 Load

func Load() (*Config, error)

Load reads the config file; a missing file yields defaults.

func (*Config) ResolveRoots

func (c *Config) ResolveRoots() []Root

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.

Jump to

Keyboard shortcuts

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