cobra-cmd-with-docs

CobraCMD with GenMarkdownTree

Experiment with the GenMarkdownTree method available with cobrago.

Actions

The command line utility can be executed by running:

bazel run //cmd/cobradocs version

The markdown tree for the docs can be generated by running:

bazel run //docs/cobradocs -- --dir $PWD

Notes

  • Markdown or YAML generated from the docs works fairly nice
  • Better fit would be YAML, then providing it to a markdown templator (or alternative tools)
  • Feels like having an OpenAPI spec for the CLI would make this process easier (build docs from the OpenAPI spec)
  • Need to have a reference to the command object for the CLI
  • Files are written into a directory, or dumped to a buffer & stdout
  • Can be good for getting some docs out, but is this the ideal direction?