Skip to content

Add custom help documentation and fix JSON output - #39

Merged
Boomatang merged 2 commits into
mainfrom
help
Jun 28, 2026
Merged

Add custom help documentation and fix JSON output#39
Boomatang merged 2 commits into
mainfrom
help

Conversation

@Boomatang

Copy link
Copy Markdown
Owner

Summary

Replace auto-generated clap help output with manually formatted help strings for the main, get, and diff commands. Each subcommand now has a dedicated help page with usage patterns, descriptions, requirements, and flag documentation. The README has been updated to reflect the new subcommand-based help layout.

Additionally, fix a bug where the JSON output for individual resources produced invalid JSON by appending an extra closing brace (}}instead of }).

Changes

  • Introduce a help.zig module containing hand-crafted help text for the main CLI, get, and diff subcommands
  • Wire up --help in main.zig, get.zig, and diff.zig to use the new help module instead of clap's auto-generated output
  • Change version output to write to stdout instead of going through the logging system
  • Fix Resource.toJson which was appending }} (two closing braces) instead of a single }, producing malformed JSON
  • Rename allocator parameter to gpa in several functions for consistency with the rest of the codebase

There was an extra } added to the json objects causing malformed json
strings.

Also some renaming of the allocator to gpa has being done.

Signed-off-by: Jim Fitzpatrick <jimfity@gmail.com>
The documentation has being updated to have clearer guidance.

Signed-off-by: Jim Fitzpatrick <jimfity@gmail.com>
@Boomatang
Boomatang merged commit 33943ac into main Jun 28, 2026
2 checks passed
@Boomatang
Boomatang deleted the help branch June 28, 2026 13:07
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.

1 participant