feat: add sponsors command#662
Conversation
📝 WalkthroughWalkthroughAdds a new top-level ChangesSponsors Feature
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
Greptile SummaryThis PR adds a
Confidence Score: 5/5Purely 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
Reviews (3): Last reviewed commit: "docs(sponsors): render cli assets" | Re-trigger Greptile |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
cli/src/cli/sponsors.rs (1)
7-9: 💤 Low valueConsider improving string literal readability.
The long single-line string with embedded
\nescapes 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
📒 Files selected for processing (3)
README.mdcli/src/cli/mod.rscli/src/cli/sponsors.rs
There was a problem hiding this comment.
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
📒 Files selected for processing (6)
cli/assets/fig.tscli/assets/usage.1cli/usage.usage.kdldocs/cli/reference/commands.jsondocs/cli/reference/index.mddocs/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
| \fBsponsors\fR | ||
| Show the companies sponsoring usage and the en.dev project family | ||
| .TP |
There was a problem hiding this comment.
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.
| \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.
Summary
sponsorscommand that acknowledges 37signals and links to the canonical en.dev sponsor pagesVerification
Note
Low Risk
Informational output and documentation only; no changes to parsing, execution, or security-sensitive paths.
Overview
Adds a
usage sponsorstop-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 canonicalusage.usage.kdlspec, 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
sponsorsCLI command that displays sponsor details.Documentation
sponsorscommand.