Skip to content

Add a branded header to CLI help - #867

Merged
jviotti merged 8 commits into
sourcemeta:mainfrom
HarshPopat23:feat/cli-help-banner
Sep 19, 2026
Merged

jviotti merged 8 commits into
sourcemeta:mainfrom
HarshPopat23:feat/cli-help-banner

Conversation

@HarshPopat23

@HarshPopat23 HarshPopat23 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Replaces the minimal single-line CLI help header with a high-impact, branded ASCII-art header featuring both the official JSON Schema geometric octagonal logo and the Sourcemeta interwoven chevron emblem, styled with ANSI colors.


Commands Displaying the Logo Header

The branded logo header is rendered whenever help documentation is requested or displayed by default. Specifically, it appears on the following command invocations:

  1. Zero-Argument Invocation (Default behavior):
    jsonschema
1. **Explicit Help Command:**:
   ```bash
  jsonschema help
  1. Long Help Option :
    jsonschema --help
1. **Short Help Option** :
   ```bash
   jsonschema -h

Signed-off-by: HarshPopat23 <musichk61@gmail.com>
@augmentcode

augmentcode Bot commented Sep 17, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR replaces the compact CLI help title with a branded five-line ASCII banner.

Changes:

  • Adds `print_help_header()` to render the JSON Schema and Sourcemeta marks, title, version, and tagline.
  • Invokes the shared header from the global help command, including zero-argument invocation.
  • Applies the existing bold-cyan terminal styling policy to banner marks and title.
  • Updates help CLI fixtures for normal, short, long, forced-color, and no-argument help output.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@jviotti

jviotti commented Sep 17, 2026

Copy link
Copy Markdown
Member

@HarshPopat23 For these PRs do you mind showing a screenshot of how it looks like on your terminal? Just to make it a bit easier to review without having to clone, compile, and run myself :)

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Re-trigger cubic

Signed-off-by: HarshPopat23 <musichk61@gmail.com>
Signed-off-by: HarshPopat23 <musichk61@gmail.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread test/help_option_long.clitest Outdated
Comment thread src/main.cc Outdated
Comment thread src/main.cc Outdated
Signed-off-by: HarshPopat23 <musichk61@gmail.com>
@HarshPopat23

Copy link
Copy Markdown
Contributor Author

@jviotti PTAL:

jsonschema_terminal_output

Signed-off-by: HarshPopat23 <musichk61@gmail.com>
… checks

Signed-off-by: HarshPopat23 <musichk61@gmail.com>
Signed-off-by: HarshPopat23 <musichk61@gmail.com>
Comment thread src/main.cc Outdated
std::println();
std::println("by Sourcemeta");
std::println();
std::println("Validate, lint, format, test, and bundle JSON Schemas.");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CLI does more than this though, and will do even more in the future. Can we keep this more generic and open-ended? Maybe take inspiration from how we describe it in the README and repo description?

Comment thread src/main.cc Outdated
constexpr auto LOGO_STYLE{TerminalStyle::Bold | TerminalStyle::Cyan};
constexpr auto TITLE_STYLE{TerminalStyle::Bold | TerminalStyle::Cyan};

std::println("{}", paint(" ======== ========", LOGO_STYLE));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ASCII art is huge. If we do some ASCII art it has to be relatively small. Also keep in mind that nowadays, people run this CLI a lot through LLMs, and you will probably consume a good amount of tokens parsing this massive ASCII art.

Maybe something simpler? It doesn't need to be the JSON Schema logo. Can be something else that looks cool

… tagline

Signed-off-by: HarshPopat23 <musichk61@gmail.com>
@HarshPopat23

HarshPopat23 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

Hi @jviotti,

Thanks for the feedback.
I've updated the PR:

  1. Compact & Token-Friendly: Simplified the ASCII art to a minimal, lightweight 3-row Sourcemeta chevron mark matching our official repo banner. It takes up minimal vertical space and consumes under 10 tokens for LLM parsing.
  2. Generic & Open-Ended Tagline: Replaced the specific command list with the official description from the README/banner: "The CLI for working with JSON Schema, the world's most popular schema language."

Here is how it looks on the terminal:

image

@jviotti jviotti left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Looks super cool! Thanks for this!

@jviotti
jviotti merged commit cffff64 into sourcemeta:main Sep 19, 2026
16 checks passed
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.

2 participants