settings

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package settings provides configuration loading for Entire. This package is separate from cli to allow strategy package to import it without creating an import cycle (cli imports strategy).

Index

Constants

View Source
const (
	// EntireSettingsFile is the path to the Entire settings file
	EntireSettingsFile = ".entire/settings.json"
	// EntireSettingsLocalFile is the path to the local settings override file (not committed)
	EntireSettingsLocalFile = ".entire/settings.local.json"
)
View Source
const DefaultStrategyName = "manual-commit"

DefaultStrategyName is the default strategy when none is configured. This is duplicated here to avoid importing the strategy package (which would create a cycle).

Variables

This section is empty.

Functions

func IsSummarizeEnabled

func IsSummarizeEnabled() bool

IsSummarizeEnabled checks if auto-summarize is enabled in settings. Returns false by default if settings cannot be loaded or the key is missing.

Types

type EntireSettings

type EntireSettings struct {
	// Strategy is the name of the git strategy to use
	Strategy string `json:"strategy"`

	// Enabled indicates whether Entire is active. When false, CLI commands
	// show a disabled message and hooks exit silently. Defaults to true.
	Enabled bool `json:"enabled"`

	// LocalDev indicates whether to use "go run" instead of the "entire" binary
	// This is used for development when the binary is not installed
	LocalDev bool `json:"local_dev,omitempty"`

	// LogLevel sets the logging verbosity (debug, info, warn, error).
	// Can be overridden by ENTIRE_LOG_LEVEL environment variable.
	// Defaults to "info".
	LogLevel string `json:"log_level,omitempty"`

	// StrategyOptions contains strategy-specific configuration
	StrategyOptions map[string]any `json:"strategy_options,omitempty"`

	// Telemetry controls anonymous usage analytics.
	// nil = not asked yet (show prompt), true = opted in, false = opted out
	Telemetry *bool `json:"telemetry,omitempty"`
}

EntireSettings represents the .entire/settings.json configuration

func Load

func Load() (*EntireSettings, error)

Load loads the Entire settings from .entire/settings.json, then applies any overrides from .entire/settings.local.json if it exists. Returns default settings if neither file exists. Works correctly from any subdirectory within the repository.

func (*EntireSettings) IsMultiSessionWarningDisabled

func (s *EntireSettings) IsMultiSessionWarningDisabled() bool

IsMultiSessionWarningDisabled checks if multi-session warnings are disabled. Returns false (show warnings) by default if the key is missing.

func (*EntireSettings) IsSummarizeEnabled

func (s *EntireSettings) IsSummarizeEnabled() bool

IsSummarizeEnabled checks if auto-summarize is enabled in this settings instance.

Jump to

Keyboard shortcuts

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