Skip to content

Add minimal YAML config for runtime defaults and auto-capture targets #4

@melonattacker

Description

@melonattacker

Motivation

As logira adds run summaries and AI agent auto-capture, users need a small persistent configuration file.

CLI flags are useful for one-off runs, but repeated local use should not require passing the same options every time.

Goal

Add a minimal YAML configuration file for local runtime defaults.

This should stay intentionally small for v0.3.0.

Proposed config path

Default:

~/.config/logira/config.yaml

Optional override:

LOGIRA_CONFIG=/path/to/config.yaml

Proposed config example

run:
  summary: auto

watch:
  targets:
    - claude
    - codex

output:
  color: auto

Commands

Add:

logira config init
logira config validate
logira config path

Behavior:

logira config init

creates a default config if it does not exist.

logira config validate

validates the active config and prints useful errors.

logira config path

prints the active config path.

Precedence

Define precedence clearly:

CLI flags > environment variables > config file > built-in defaults

Scope

Initial config should cover only:

  • run.summary
  • watch.targets
  • output.color

Additional fields can be added later.

Non-goals

This issue should not implement:

  • team policy distribution
  • remote config
  • cloud sync
  • organization-level rules
  • complex rule-pack management
  • full watch/session configuration
  • profile presets

Acceptance criteria

  • logira can read ~/.config/logira/config.yaml

  • config path can be overridden with LOGIRA_CONFIG

  • missing config falls back to built-in defaults

  • invalid config produces actionable errors

  • CLI flags override config values

  • logira config init creates a usable default config

  • logira config validate validates the active config

  • tests cover:

    • missing config
    • valid config
    • invalid YAML
    • unknown fields
    • CLI override behavior

Notes

This is a must-have for v0.3.0 because auto-capture targets need persistent local configuration.

The schema should stay small in v0.3.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:configConfiguration files, defaults, and validationpriority:mustRequired for the target milestonetype:featureNew functionality or user-visible behavior change

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions