Repository navigation
Releases
Releases · echocat/cli4g
v0.3.1
What's Changed
- Bump jdx/mise-action from 5.2.0 to 5.2.4 by @dependabot[bot] in #31
- Bump the codeql-actions group across 1 directory with 2 updates by @dependabot[bot] in #28
- Bump jdx/mise-action from 5.2.4 to 5.2.5 by @dependabot[bot] in #34
- Bump github.com/alecthomas/kong in /_benchmarks by @dependabot[bot] in #33
- Bump go.yaml.in/yaml/v3 in / by @dependabot[bot] in #32
- Bump jdx/mise-action from 5.2.5 to 5.2.6 by @dependabot[bot] in #35
- Bump the codeql-actions group with 2 updates by @dependabot[bot] in #36
- Bump jdx/mise-action from 5.2.6 to 5.2.7 by @dependabot[bot] in #37
- Bump the codeql-actions group with 2 updates by @dependabot[bot] in #38
- Bump github.com/spf13/pflag in /_benchmarks by @dependabot[bot] in #39
- Bump peter-evans/create-pull-request from 8.1.1 to 8.1.3 by @dependabot[bot] in #42
- Bump jdx/mise-action from 5.2.7 to 5.2.8 by @dependabot[bot] in #45
- Bump golang.org/x/mod in / by @dependabot[bot] in #43
- Bump golang.org/x/term in / by @dependabot[bot] in #44
Full Changelog: v0.3.0...v0.3.1
v0.3.0
What's Changed
- Add context-aware shell completion by @blaubaer in #26
- Bump jdx/mise-action from 5.0.1 to 5.2.0 by @dependabot[bot] in #21
- Bump github.com/spf13/pflag in /_benchmarks by @dependabot[bot] in #22
- Bump github/codeql-action/init from 4.38.2 to 4.39.0 by @dependabot[bot] in #23
- Bump golang.org/x/tools in /_benchmarks by @dependabot[bot] in #24
Full Changelog: v0.2.1...v0.3.0
v0.2.1
What's Changed
- Optimize default codec binding and CLI lifecycle allocations by @blaubaer in #15
- Add framework comparison matrix to README by @blaubaer in #16
- Improve help formatting and value placeholders by @blaubaer in #17
- Bump golang.org/x/mod in / by @dependabot[bot] in #18
New Contributors
- @dependabot[bot] made their first contribution in #18
Full Changelog: v0.2.0...v0.2.1
v0.2.0
v0.1.4
v0.1.3
v0.1.2
v0.1.1
v0.1.0
The first release of cli4g, a Go library for typed command-line applications with extensible codecs and invocation-scoped resource management.
Highlights
- Typed options: define flags and positional arguments through struct tags or explicit builders, and receive typed options in handlers.
- Commands and subcommands: build nested command trees with inherited flags and typed access to parent options.
- Predictable input handling: explicit CLI, environment, and default precedence; required inputs, aliases, short flags, and repeatable values.
- Ordered lifecycle: resolve and validate selected options before initialization, then execute handlers from application to leaf command.
- Managed resources: invocation-owned files and custom resources, with child-to-parent cleanup on success and returned errors, including partial initialization failures.
- Extensible codecs: built-in support for numeric values, strings, booleans, durations, dates, date-times, files, and slices, plus adapters for custom value types.
- Customizable help and errors: automatic help, configurable templates, and distinct handling of invalid input, cancellation, and operational failures.
- Reusable definitions: compile an application once and create independent invocations for repeated or concurrent parsing.
Installation
Requires Go 1.27.0 or later.
go get github.com/echocat/cli4g@v0.1.0
Documentation and examples
- Getting started
- API documentation
- Struct-tag reference
- 26 runnable examples
- Benchmarks and methodology, covering one-shot and reused execution, allocations, code size, and cognitive complexity