config

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package config handles agentree configuration from .agentreerc and global config

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PostCreateScripts []string
	// Package manager specific overrides
	PnpmSetup    string
	NpmSetup     string
	YarnSetup    string
	DefaultSetup string

	// Environment file configuration
	EnvConfig EnvConfig
}

Config holds agentree configuration

func LoadGlobalConfig

func LoadGlobalConfig() (*Config, error)

LoadGlobalConfig loads configuration from ~/.config/agentree/config

func LoadProjectConfig

func LoadProjectConfig(projectRoot string) (*Config, error)

LoadProjectConfig loads configuration from .agentreerc in the project root

func MergeConfig added in v1.2.0

func MergeConfig(globalCfg, projectCfg *Config) *Config

MergeConfig merges configurations with proper precedence: CLI flags > project config > global config > defaults

type EnvConfig added in v1.2.0

type EnvConfig struct {
	// Whether to copy environment files (default: true)
	Enabled bool
	// Additional patterns to include beyond gitignore
	IncludePatterns []string
	// Patterns to exclude even if found in gitignore
	ExcludePatterns []string
	// Whether to search recursively in monorepos (default: true)
	Recursive bool
	// Whether to use gitignore as source of truth (default: true)
	UseGitignore bool
	// Custom environment file patterns (overrides defaults if set)
	CustomPatterns []string
}

EnvConfig holds environment file copying configuration

Jump to

Keyboard shortcuts

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