Skip to content

Releases: mologie/nicecmd

v0.2.2

Choose a tag to compare

@mologie mologie released this 02 Aug 07:50

This release adds the ability to hide flags via the hidden option, or just their value from usage output via the secret option.

v0.2.1

Choose a tag to compare

@mologie mologie released this 30 Jul 20:37

This release improves the printenv command, detects flag name clashes, adds convenience functions for command groups, and fixes inheritance of custom env prefixes to sub-commands.

Full changelog: v0.2.0...v0.2.1

v0.2.0

Choose a tag to compare

@mologie mologie released this 27 Jul 19:48

This release of NiceCmd is a major rework of v0.1, while keeping the API mostly compatible. It integrates feedback from the folks at @authenticvision and is the first release I'm comfortable releasing into the wild.

Despite the zero-dot version tag, this release has full test coverage and is feature-complete. The API might still change slightly, or be promoted to 1.0.0 as-is.

Compared to v0.1, this release:

  • Adds dotenv file support for minimalistic configuration (call your-command printenv to generate a dotenv file from current flag vlaues)
  • Adds integration with pflag TextVarP, which replaces the textUnmarshalledVersion interface
  • Adds a check for unbound environment variables matching the root command's prefix
  • Adds a custom type registry to override parsing/serialization behavior of arbitrary types
  • Derives env prefixes automatically from the root command's usage line. Override with WithEnvPrefix("CUSTOM_PREFIX").
  • Renames various RunE types to Hook
  • Moves input processing to a pre-run hook, so that BindConfig can no longer fail if the code calling it is structurally sound
  • Fixes names derived for embedded struct fields (they now appear as if they were directly present on their parent struct)