cli-skeleton

module
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT

README

cli-skeleton

An opinionated framework for building golang cli tools on top of mitchellh/cli.

Why

While mitchellh/cli gives quite a bit of code to allow folks to build cli tools on top of it, it does not provide enough structure to allow folks to get started quickly. This project aims to fill that void by implementing a skeleton based upon those provided by the hashicorp suite of tools.

See Command Line Interface Guidelines for further reading on how to structure command line tools.

Examples

For examples on how to perform various tasks, see the following examples:

  • global: Shows how to implement "global" flags.
  • hello-world: The hello-world example.
  • human-readable-logging: The hello-world example with nicer log output.
  • nil: An example cli tool that does nothing. Useful for copying the nil.go command as a command template for your own cli tools.
  • zerolog-logging: The hello-world example with zerolog logger support.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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