Skip to content

docs: emphasize bunx usage and ultra-small bundle size advantage#242

Merged
ryoppippi merged 3 commits intomainfrom
docs/update-installation-bunx
Jul 3, 2025
Merged

docs: emphasize bunx usage and ultra-small bundle size advantage#242
ryoppippi merged 3 commits intomainfrom
docs/update-installation-bunx

Conversation

@ryoppippi
Copy link
Owner

@ryoppippi ryoppippi commented Jul 3, 2025

Summary

  • Update installation documentation to emphasize using bunx over npx for speed
  • Highlight that installation is optional due to incredibly small bundle size
  • Add bundle size as a key differentiating feature

Changes

README.md

  • Reorder installation methods to put bunx first as recommended option
  • Add inline bundle size badge to emphasize small size
  • Add tip about bunx speed advantage
  • Mark local installation as optional
  • Add feature bullet about ultra-small bundle size

Documentation Site

  • Add section explaining why no installation is needed
  • Include performance comparison table for different runtimes
  • Highlight bundle size optimization as first key feature
  • Add tips and info boxes for better user guidance

Context

Based on the creator's tweets about ccusage:

  • Bundle size is quite small, so installation is not necessary
  • bunx is recommended over npx for massive speed difference
  • Deno is also an option for security-conscious users

This PR makes these advantages more visible to users discovering ccusage.

Summary by CodeRabbit

  • Documentation
    • Updated documentation to highlight the ultra-small bundle size of the CLI tool.
    • Expanded Quick Start and installation instructions with examples for bunx, npx, and deno, recommending bunx for speed.
    • Added a new section explaining why installation is optional and included a performance comparison of different runtimes.
    • Clarified and renamed installation sections to emphasize the optional nature of global installation.

ryoppippi added 3 commits July 3, 2025 16:13
- Add bunx as the primary recommended installation method

- Highlight the small bundle size advantage with inline badge

- Add deno run option with security flags

- Mark local installation as optional since bundle is small

- Add tip about bunx speed advantage over npx

- Add feature bullet point about ultra-small bundle size
- Add section explaining why installation is not needed

- Reorder runtime options to put bunx first as recommended

- Add tip about bunx speed advantage

- Add info about deno security benefits

- Mark global installation as optional

- Emphasize ultra-small bundle size advantage
- Add dedicated section for bundle size advantage

- Mention running directly with bunx without installation

- Position it as the first key feature to emphasize importance
@coderabbitai
Copy link

coderabbitai bot commented Jul 3, 2025

Walkthrough

Documentation for the ccusage CLI tool was updated to emphasize its ultra-small bundle size, including new sections and callouts in the README and guides. Quick start instructions now prioritize bunx for speed, and installation guidance clarifies that installation is optional due to the minimal bundle size. A performance comparison table was added.

Changes

Files / Group Change Summary
README.md Expanded Quick Start with bunx, npx, and deno examples; highlighted small bundle; clarified installation as optional.
docs/guide/index.md Added "Ultra-Small Bundle Size" feature under Key Features.
docs/guide/installation.md Added rationale for no installation, reordered runtimes, added performance table, clarified installation as optional.

Sequence Diagram(s)

sequenceDiagram
    User->>ccusage: Executes via bunx/npx/deno
    ccusage-->>User: Runs instantly (no install needed)
Loading

Possibly related PRs

Poem

🐇
I trimmed my docs and made them neat,
Boasting a bundle small and fleet.
With bunx or npx, you’re ready to run,
No install required—just instant fun!
So hop along, try ccusage today,
Lightning-fast, the rabbit way!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @ryoppippi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the user onboarding experience by clarifying and emphasizing the recommended ways to use the tool. My changes aim to make the performance benefits of bunx and the convenience of the tool's small bundle size immediately apparent to new and existing users, streamlining the quick start process and highlighting key differentiators.

Highlights

  • Emphasize bunx and Optional Installation: I've updated the documentation to strongly recommend bunx for running the tool due to its speed advantages over npx. Additionally, I've highlighted that local installation is entirely optional, thanks to the tool's extremely small bundle size, encouraging direct execution.
  • Showcase Ultra-Small Bundle Size: I've added a new feature bullet and dedicated sections in the documentation to emphasize the tool's ultra-small bundle size. This includes an inline badge in the README and a detailed explanation of its benefits (e.g., near-instant startup, minimal overhead, no global pollution).
  • Improved Installation Guidance: I've restructured the installation guides to prioritize bunx and provide a clearer understanding of different execution methods, including Deno for security-conscious users. A performance comparison table has been added to illustrate the speed differences between various runtimes.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jul 3, 2025

Open in StackBlitz

npm i https://pkg.pr.new/ryoppippi/ccusage@242

commit: 7942510

@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
ccusage-guide 7942510 Jul 03 2025, 03:17 PM

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (5)
docs/guide/index.md (1)

44-47: Add missing comma & tighten wording for smoother flow

Static-analysis correctly flagged a missing comma before the non-restrictive clause. While touching the sentence, we can also shave a couple of extra words.

-Unlike other CLI tools, we pay extreme attention to bundle size. ccusage achieves an incredibly small footprint even without minification, which means you can run it directly without installation using `bunx ccusage` for instant access.
+Unlike other CLI tools, we pay extreme attention to bundle size. ccusage achieves an incredibly small footprint even without minification, which means you can run it directly, without installing, via `bunx ccusage` for instant access.
README.md (2)

16-18: Provide descriptive alt text for accessibility compliance

The screenshot <img> is missing an alt attribute, making it invisible to screen-reader users.

-<img src="https://cdn.jsdelivr.net/gh/ryoppippi/ccusage@main/docs/public/screenshot.png">
+<img src="https://cdn.jsdelivr.net/gh/ryoppippi/ccusage@main/docs/public/screenshot.png" alt="ccusage daily usage report screenshot">

25-36: Minor consistency tweak: keep comment style uniform

In the quick-start snippet the bunx section is annotated with a comment, but the npx/deno lines are not. Either drop the first comment or add similar comments to all three blocks to avoid the perception that the remainder is “commented out”.

Example:

-# Using npx
+npx # using npx

(or simply delete the # Using bunx … header).

docs/guide/installation.md (2)

7-13: Grammar polish: article agreement & parallelism

Small wording tweaks improve readability and keep the bullet list parallel.

-Thanks to ccusage's incredibly small bundle size, you don't need to install it globally. Unlike other CLI tools, we pay extreme attention to bundle size optimization, achieving an impressively small footprint even without minification. This means:
+Thanks to ccusage's incredibly small bundle size, you don't need to install it globally. Unlike other CLI tools, we pay extreme attention to bundle-size optimisation, achieving an impressively small footprint even without minification. This means:
 
-- ✅ Near-instant startup times
-- ✅ Minimal download overhead
-- ✅ Always use the latest version
-- ✅ No global pollution of your system
+- ✅ Near-instant startup times  
+- ✅ Minimal download overhead  
+- ✅ Always running the latest version  
+- ✅ No global pollution of your system

20-26: Label clarity inside code-group

The code-group label bunx (Recommended) looks good, but for symmetry the npx block could read npx (Slower) or similar, or you could drop the parenthetical from both. This avoids implicitly favouring one runtime in the label itself when the “Speed Recommendation” tip already explains it.

No code change shown; just wording advice.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1ef68c7 and 7942510.

📒 Files selected for processing (3)
  • README.md (2 hunks)
  • docs/guide/index.md (1 hunks)
  • docs/guide/installation.md (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`docs/**/*.md`: Always place screenshots immediately after the main heading (H1)...

docs/**/*.md: Always place screenshots immediately after the main heading (H1) in documentation pages
Use relative paths like /screenshot.png for images stored in /docs/public/
Always include descriptive alt text for accessibility in screenshots

📄 Source: CodeRabbit Inference Engine (CLAUDE.md)

List of files the instruction was applied to:

  • docs/guide/index.md
  • docs/guide/installation.md
🪛 LanguageTool
docs/guide/index.md

[uncategorized] ~46-~46: Possible missing comma found.
Context: ...h means you can run it directly without installation using bunx ccusage for instant access...

(AI_HYDRA_LEO_MISSING_COMMA)

README.md

[style] ~86-~86: Using many exclamation marks might seem excessive (in this case: 4 exclamation marks for a text that’s 2354 characters long)
Context: ...credibly small even without minification! ## Documentation Full documentation i...

(EN_EXCESSIVE_EXCLAMATION)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Workers Builds: ccusage-guide

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request significantly improves the documentation by emphasizing the use of bunx and the tool's small bundle size. The changes in README.md and the documentation site make the installation instructions clearer and more user-friendly. My review focuses on further improving the clarity and cross-platform compatibility of the newly added deno command examples. I've suggested adding more context and platform-specific notes to ensure all users can follow the instructions easily.

# Using npx
npx ccusage@latest

# Using deno (with security flags)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The use of $HOME in the deno command is not cross-platform. On Windows, the equivalent environment variable is typically %USERPROFILE%. To avoid confusion and ensure the command works for Windows users, it would be helpful to clarify this in the comment.

Suggested change
# Using deno (with security flags)
# Using deno (with security flags; on Windows, use %USERPROFILE% for $HOME)

```

### Local Installation
> 💡 **Tip**: We recommend using `bunx` instead of `npx` for a massive speed improvement!
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The deno command is quite complex due to its security flags. While the installation.md guide provides a great explanation, users reading only the README might be confused. It would be beneficial to link to the more detailed guide for users who want to understand the different runtimes and security options.

Consider expanding the tip to include a link to the installation guide. A relative link is fine for GitHub, but an absolute URL to the deployed documentation site would be even better if available.

Suggested change
> 💡 **Tip**: We recommend using `bunx` instead of `npx` for a massive speed improvement!
> 💡 **Tip**: We recommend using `bunx` instead of `npx` for a massive speed improvement! For more details on runtimes, including security considerations for Deno, see the [Installation Guide](docs/guide/installation.md).

Comment on lines +42 to +44
::: info Deno Security
Consider using `deno run` if you want additional security controls. Deno allows you to specify exact permissions, making it safer to run tools you haven't audited.
:::
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This is a great explanation of Deno's security benefits. However, the deno command example in this document uses $HOME, which is not standard on Windows (where %USERPROFILE% is common). To ensure the instructions are clear for all platforms, it would be helpful to add a note about this for Windows users.

Suggested change
::: info Deno Security
Consider using `deno run` if you want additional security controls. Deno allows you to specify exact permissions, making it safer to run tools you haven't audited.
:::
::: info Deno Security
Consider using `deno run` if you want additional security controls. Deno allows you to specify exact permissions, making it safer to run tools you haven't audited.
**Note for Windows users:** You may need to replace `$HOME` in the command with `%USERPROFILE%`.
:::

@ryoppippi ryoppippi merged commit af6b625 into main Jul 3, 2025
9 checks passed
@ryoppippi ryoppippi deleted the docs/update-installation-bunx branch July 3, 2025 17:29
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