Skip to content

feat(cli): example config in releases and cdd config init/path/edit - #85

Merged
hammadmajid merged 6 commits into
mainfrom
feat/70-config-example
Oct 1, 2026
Merged

hammadmajid merged 6 commits into
mainfrom
feat/70-config-example

Conversation

@hammadmajid

Copy link
Copy Markdown
Contributor

What

  • config.example.toml at the repo root: every key (defaults as real values) plus commented Action recipes (VS Code detach, lazygit, remapping enter, overriding and unbinding a built-in).
  • Embedded via a tiny root package (cdd.ConfigExample), since //go:embed cannot reach above a package directory.
  • cdd config init [--force], path, edit ($VISUAL, $EDITOR, vi; runs init first if the file is missing). config.Path() is now exported and used by Load.
  • config joins the Wrapper passthrough (derived from the cobra tree).
  • .goreleaser.yaml archives.files lists README.md, LICENSE and config.example.toml.
  • README points to cdd config init.

Verified

  • gofmt, go vet, golangci-lint clean; go test ./... passes (except the known local fish TestScriptExecution cases).
  • A test loads the embedded bytes via config.LoadFrom, as shipped and with all Action examples uncommented.
  • init, --force, refusal and edit tested against a temp XDG_CONFIG_HOME; the binary was smoke-tested too.
  • goreleaser release --snapshot --clean --skip=publish: the linux_amd64 tarball contains LICENSE, README.md, config.example.toml and cdd.

Closes #70

@hammadmajid
hammadmajid merged commit de0205d into main Oct 1, 2026
3 checks passed
@hammadmajid
hammadmajid deleted the feat/70-config-example branch October 1, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(cli): example config in releases and cdd config init/path/edit

1 participant