Skip to content

feat: add sponsors command#662

Merged
jdx merged 3 commits into
mainfrom
codex/add-sponsors-cli-readme
Jun 2, 2026
Merged

feat: add sponsors command#662
jdx merged 3 commits into
mainfrom
codex/add-sponsors-cli-readme

Conversation

@jdx

@jdx jdx commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a sponsors command that acknowledges 37signals and links to the canonical en.dev sponsor pages
  • acknowledge 37signals in the root README

Verification

  • cargo check -q
  • cargo run -q -p usage-cli -- sponsors

Note

Low Risk
Informational output and documentation only; no changes to parsing, execution, or security-sensitive paths.

Overview
Adds a usage sponsors top-level subcommand that prints a fixed message naming 37signals and linking to https://en.dev/sponsors.html.

The command is wired through clap (cli/src/cli/sponsors.rs, mod.rs), the canonical usage.usage.kdl spec, and regenerated CLI/docs artifacts (man page, Fig spec, commands.json, reference markdown).

The root README gains a Sponsors section that credits 37signals.

Reviewed by Cursor Bugbot for commit e82d404. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • New Features

    • Added a sponsors CLI command that displays sponsor details.
  • Documentation

    • Added a Sponsors section to the README.
    • Updated man pages, CLI reference, and completion specs to document the new sponsors command.

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a new top-level sponsors CLI subcommand (implementation + wiring) and updates completion, manpage, usage spec, CLI reference docs, and README to document the command and sponsorship attribution.

Changes

Sponsors Feature

Layer / File(s) Summary
Sponsors subcommand implementation
cli/src/cli/sponsors.rs
Sponsors clap Args type and run() implementation that prints a fixed sponsorship notice.
CLI module integration
cli/src/cli/mod.rs
Declare sponsors module, add Command::Sponsors(sponsors::Sponsors) variant, and dispatch to Sponsors::run().
Completion spec and manpage updates
cli/assets/fig.ts, cli/assets/usage.1
Add sponsors to Fig completion spec and the man page COMMANDS section.
Usage spec and reference docs
cli/usage.usage.kdl, docs/cli/reference/commands.json, docs/cli/reference/index.md, docs/cli/reference/sponsors.md
Insert sponsors into CLI usage spec; add JSON entry and reference page; add subcommand index entry linking to sponsors reference.
README addition
README.md
Adds a Sponsors section crediting 37signals for sponsoring the project.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🐰 A small hop, a gentle cheer,
Sponsors named, their kindness clear,
A README line, a command to run,
I nibble code till work is done,
🥕 Thanks to friends who help the fun!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding a sponsors command to the CLI, which is the primary objective across all modified files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/add-sponsors-cli-readme

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.99%. Comparing base (ed8dc7f) to head (e82d404).

Files with missing lines Patch % Lines
cli/src/cli/sponsors.rs 0.00% 4 Missing ⚠️
cli/src/cli/mod.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #662      +/-   ##
==========================================
- Coverage   73.17%   72.99%   -0.18%     
==========================================
  Files          49       50       +1     
  Lines        7596     7603       +7     
  Branches     7596     7603       +7     
==========================================
- Hits         5558     5550       -8     
- Misses       1308     1315       +7     
- Partials      730      738       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@greptile-apps

greptile-apps Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a sponsors CLI subcommand that prints acknowledgment of 37signals and a link to the en.dev sponsor page, and adds a matching Sponsors section to the root README.

  • New cli/src/cli/sponsors.rs implements the command as a zero-field clap struct with a single hardcoded println!; it is correctly wired into the Command enum and run() match in mod.rs.
  • All supporting artifacts (man page, Fig completion spec, usage KDL spec, docs JSON, reference index, and a new reference Markdown page) are updated consistently and in correct alphabetical order.

Confidence Score: 5/5

Purely additive change — a new informational CLI subcommand and README text with no logic, data handling, or auth changes. Safe to merge.

All nine changed files are either generated documentation or a minimal Rust implementation that prints a hardcoded string. The command is correctly registered in the enum and match arm, the man page and completion spec are updated in alphabetical order, and the docs JSON schema matches all existing entries. No runtime paths, configuration, or existing behaviour is modified.

No files require special attention.

Important Files Changed

Filename Overview
cli/src/cli/sponsors.rs New file implementing the sponsors command — simple struct with a hardcoded println; correct miette::Result return type.
cli/src/cli/mod.rs Registers the sponsors module and adds the Sponsors variant to both the Command enum and the run() match arm correctly.
README.md Adds a Sponsors section crediting 37signals with a link; no issues.
cli/assets/fig.ts Adds the sponsors entry to the Fig completion spec in alphabetical order; consistent with existing entries.
cli/assets/usage.1 Adds sponsors entry to the man page in correct alphabetical position between powershell and zsh.
cli/usage.usage.kdl Adds sponsors command definition to the usage spec; correctly placed.
docs/cli/reference/sponsors.md New auto-generated reference page for the sponsors command; consistent with other command reference pages.
docs/cli/reference/commands.json Adds sponsors entry to the JSON reference with all required fields matching the existing schema.
docs/cli/reference/index.md Adds sponsors link to the reference index in alphabetical order.

Reviews (3): Last reviewed commit: "docs(sponsors): render cli assets" | Re-trigger Greptile

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (1)
cli/src/cli/sponsors.rs (1)

7-9: 💤 Low value

Consider improving string literal readability.

The long single-line string with embedded \n escapes is harder to read and maintain. Consider using a multi-line string literal for better clarity.

♻️ Proposed refactor for better readability
-        println!(
-            "usage and the en.dev project family are sponsored by:\n\n  37signals - https://37signals.com\n\nView all sponsors: https://en.dev/sponsors.html"
-        );
+        println!(
+            "usage and the en.dev project family are sponsored by:\n\
+             \n\
+               37signals - https://37signals.com\n\
+             \n\
+             View all sponsors: https://en.dev/sponsors.html"
+        );
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cli/src/cli/sponsors.rs` around lines 7 - 9, Replace the long single-line
println! string in sponsors.rs with a multi-line string literal (or raw string)
to improve readability: locate the println! invocation that prints the sponsors
message and rewrite the message as a contiguous multi-line string so embedded
"\n" escapes are removed and the visual structure (line breaks and indentation)
is preserved; ensure you keep the exact output text and spacing when converting
the single-line string to the multi-line literal.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@cli/src/cli/sponsors.rs`:
- Around line 7-9: Replace the long single-line println! string in sponsors.rs
with a multi-line string literal (or raw string) to improve readability: locate
the println! invocation that prints the sponsors message and rewrite the message
as a contiguous multi-line string so embedded "\n" escapes are removed and the
visual structure (line breaks and indentation) is preserved; ensure you keep the
exact output text and spacing when converting the single-line string to the
multi-line literal.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0da5dda7-8b59-450e-b4b4-8c5455e9acff

📥 Commits

Reviewing files that changed from the base of the PR and between ed8dc7f and be01bff.

📒 Files selected for processing (3)
  • README.md
  • cli/src/cli/mod.rs
  • cli/src/cli/sponsors.rs

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cli/assets/usage.1`:
- Around line 78-80: Add a detailed "USAGE SPONSORS" subsection mirroring the
format used by other commands: create a heading "USAGE SPONSORS" and a paragraph
describing the sponsors command purpose, expected behavior, options (if any),
and examples; place this new subsection immediately after the brief sponsors
entry (the "sponsors" command block) so it follows the same pattern as "USAGE
BASH"/"USAGE EXEC" etc., ensuring the subsection title and content match the man
page style used elsewhere in usage.1.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 79007859-ce55-40ca-817c-0a16c11ddda5

📥 Commits

Reviewing files that changed from the base of the PR and between be01bff and e82d404.

📒 Files selected for processing (6)
  • cli/assets/fig.ts
  • cli/assets/usage.1
  • cli/usage.usage.kdl
  • docs/cli/reference/commands.json
  • docs/cli/reference/index.md
  • docs/cli/reference/sponsors.md
✅ Files skipped from review due to trivial changes (3)
  • docs/cli/reference/index.md
  • cli/assets/fig.ts
  • docs/cli/reference/sponsors.md

Comment thread cli/assets/usage.1
Comment on lines +78 to +80
\fBsponsors\fR
Show the companies sponsoring usage and the en.dev project family
.TP

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add a detailed "USAGE SPONSORS" subsection to match the man page structure.

All other top-level commands (bash, exec, fish, generate, lint, powershell, zsh) have detailed subsections following the brief COMMANDS list (e.g., "USAGE BASH" at line 83, "USAGE EXEC" at line 134). The sponsors command should follow the same pattern for consistency.

📝 Proposed subsection to add after the COMMANDS section

Insert after line 80 and before line 81:

 \fBsponsors\fR
 Show the companies sponsoring usage and the en.dev project family
+.SH "USAGE SPONSORS"
+Show the companies sponsoring usage and the en.dev project family
+.PP
+\fBUsage:\fR usage sponsors
 .TP
 \fBzsh\fR
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
\fBsponsors\fR
Show the companies sponsoring usage and the en.dev project family
.TP
\fBsponsors\fR
Show the companies sponsoring usage and the en.dev project family
.SH "USAGE SPONSORS"
Show the companies sponsoring usage and the en.dev project family
.PP
\fBUsage:\fR usage sponsors
.TP
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cli/assets/usage.1` around lines 78 - 80, Add a detailed "USAGE SPONSORS"
subsection mirroring the format used by other commands: create a heading "USAGE
SPONSORS" and a paragraph describing the sponsors command purpose, expected
behavior, options (if any), and examples; place this new subsection immediately
after the brief sponsors entry (the "sponsors" command block) so it follows the
same pattern as "USAGE BASH"/"USAGE EXEC" etc., ensuring the subsection title
and content match the man page style used elsewhere in usage.1.

@jdx jdx merged commit adc6741 into main Jun 2, 2026
8 checks passed
@jdx jdx deleted the codex/add-sponsors-cli-readme branch June 2, 2026 19:32
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