config

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package config handles CLI flag parsing and validation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BaseRef          string            // --base; default: "" (resolved to @{upstream})
	HeadRef          string            // --head; default: "" (working tree mode; set to "HEAD" for committed-only)
	Mode             model.CompareMode // --mode; default: CompareThreeDot
	IgnoreWhitespace bool              // --ignore-whitespace; default: false

	// Watch mode (v0.2).
	Watch         bool          // --watch; default: false
	WatchInterval time.Duration // --watch-interval; default: 2s, min: 500ms

	// Commit generation (v0.2).
	Commit         bool   // --commit; default: false
	CommitProvider string // --commit-provider; default: "claude"
	CommitModel    string // --commit-model; default: ""
	CommitAuto     bool   // --commit-auto; default: false (requires --commit)

	// Worktree dashboard (v0.2).
	Worktrees bool // --worktrees; default: false
}

Config is parsed from CLI flags and threaded into app bootstrap.

func Parse

func Parse(args []string) (Config, error)

Parse parses CLI args into a Config. Returns an error for unknown flags or invalid values (caller should exit with code 2).

Jump to

Keyboard shortcuts

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