Documentation
¶
Overview ¶
Package config provides path resolution for Flow's directory structure.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveFlowConfig ¶
func SaveFlowConfig(path string, fc *FlowConfig) error
SaveFlowConfig writes a FlowConfig to disk as YAML.
Types ¶
type Config ¶
type Config struct {
Home string // Root directory (~/.flow or $FLOW_HOME)
WorkspacesDir string // ~/.flow/workspaces/
ReposDir string // ~/.flow/repos/
AgentsDir string // ~/.flow/agents/
ConfigFile string // ~/.flow/config.yaml
FlowConfig *FlowConfig // loaded global config
}
Config holds resolved paths for Flow's directory structure.
func New ¶
New creates a Config with resolved paths. Respects $FLOW_HOME if set, otherwise defaults to ~/.flow.
func (*Config) BareRepoPath ¶
BareRepoPath returns the bare clone path for a repo URL. e.g., github.com/org/repo → ~/.flow/repos/github.com/org/repo.git Handles URLs that already end in .git (e.g., git@github.com:org/repo.git).
func (*Config) ClaudeAgentDir ¶
ClaudeAgentDir returns the path for the shared Claude agent directory.
func (*Config) EnsureDirs ¶
EnsureDirs creates the top-level directories if they don't exist. It also creates the default config file if missing, and loads the config.
func (*Config) WorkspacePath ¶
WorkspacePath returns the path for a named workspace.
type FlowConfig ¶
FlowConfig represents the global flow configuration file.
func DefaultFlowConfig ¶
func DefaultFlowConfig() *FlowConfig
DefaultFlowConfig returns a FlowConfig with default values.
func LoadFlowConfig ¶
func LoadFlowConfig(path string) (*FlowConfig, error)
LoadFlowConfig reads and parses a flow config file from disk.