docs: migrate to VitePress documentation system - #140
Conversation
Remove outdated image files from docs directory: - blocks-live.png - logo.png - logo.svg - mcp-claude-desktop.avif - screenshot.png These assets are being replaced with VitePress documentation structure
Add comprehensive VitePress-based documentation: - VitePress configuration and theme setup - Complete API documentation generation with TypeDoc - User guides for daily reports, live monitoring, MCP server - Cloudflare Pages deployment configuration - Documentation build and update scripts This replaces the old markdown-only documentation with an interactive, searchable documentation site
Update project configuration files to support VitePress documentation: - package.json: add documentation dependencies and scripts - bun.lock: lock file updates for new dependencies - eslint.config.js: configuration updates These changes enable the documentation build pipeline and maintain code quality standards
Update source code files to support documentation generation: - _macro.ts: macro utilities for documentation - calculate-cost.ts: cost calculation improvements - commands/blocks.ts: blocks command enhancements - data-loader.ts: data loading optimizations - debug.ts: debug functionality updates - index.ts: main entry point improvements - logger.ts: logging system enhancements - mcp.ts: MCP server functionality updates - pricing-fetcher.ts: pricing data fetching improvements These changes improve code organization, add documentation support, and enhance the overall functionality
Update core documentation files: - CLAUDE.md: enhanced development guidelines and architecture notes - README.md: updated project description and usage instructions These updates align the documentation with the new VitePress structure and provide clearer guidance for development
|
Warning Rate limit exceeded@ryoppippi has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 20 minutes and 38 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (3)
WalkthroughThis update introduces a comprehensive documentation system for the ccusage project, including a new VitePress-based documentation site, detailed user and configuration guides, API documentation generation, and supporting scripts and configurations. The README is condensed to a minimal overview, and internal code files receive improved documentation and import clarity without functional changes. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant DocsSite (VitePress)
participant Guides/API
participant MCP Server
participant ccusage CLI
User->>DocsSite: Visit documentation site
DocsSite->>Guides/API: Render navigation, guides, API docs
User->>Guides/API: Read usage/configuration/API info
User->>ccusage CLI: Run commands as per documentation
ccusage CLI->>MCP Server: (Optional) Integrate via MCP as documented
Note over User,DocsSite: Documentation guides user through installation, usage, configuration, and integration.
Possibly related PRs
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
commit: |
There was a problem hiding this comment.
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 overhauls the project's documentation infrastructure. The primary goal is to enhance the user experience by providing a modern, well-organized, and easily discoverable documentation portal. This change not only improves how users interact with the project's guides and API references but also streamlines the documentation maintenance process for developers.
Highlights
- Documentation System Migration: The project's documentation has been migrated from simple Markdown files to a comprehensive VitePress-based system, offering an interactive, searchable, and navigable documentation site.
- Automated API Documentation: Integrated TypeDoc for automated generation of a complete API reference, ensuring API documentation stays in sync with code changes.
- Comprehensive User Guides: Added extensive user guides covering all features, including daily/monthly/session/blocks reports, live monitoring, MCP server integration, and configuration options.
- Modern Deployment & Organization: Configured Cloudflare Pages for automated builds and fast global CDN delivery, alongside improved content organization and structured navigation within the new documentation site.
- Project Configuration Updates: Updated
package.jsonwith new documentation dependencies and scripts, adjusted ESLint configuration to include documentation files, and added TypeDoc configuration for API generation.
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
-
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. ↩
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the project documentation from plain markdown to a fully featured VitePress-based system, while also integrating automated API documentation with TypeDoc and enhancing deployment and configuration processes. Key changes include:
- Conversion of documentation files to VitePress formats along with new configuration files and scripts.
- Integration of TypeDoc via new configuration files and update scripts.
- Updates to project configuration files (package.json, ESLint, etc.) to support the new documentation workflow.
Reviewed Changes
Copilot reviewed 37 out of 46 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| typedoc.json | New TypeDoc configuration for API docs integration. |
| src/*.ts files | Added or updated header comments and import adjustments. |
| package.json, eslint.config.js | Updated project configuration to support documentation workspaces. |
| docs/** | Migration of markdown files into a VitePress structure with new guides, configuration, and deployment scripts. |
| CLAUDE.md | Updated documentation guidelines with new screenshot and asset instructions. |
Comments suppressed due to low confidence (1)
docs/typedoc.config.mjs:26
- Consider using a consistent naming convention for the group order by using 'Classes' instead of 'Class' to match the naming used in other configuration files.
groupOrder: ['Variables', 'Functions', 'Class'],
| const oldPattern = `| [${module}](${linkPath}) | - |`; | ||
| const newPattern = `| [${module}](${linkPath}) | ${description} |`; | ||
| content = content.replace(oldPattern, newPattern); |
There was a problem hiding this comment.
The current fixed-string matching for updating the API index may break if the formatting changes; consider using a regular expression for more robust and maintainable matching.
| const oldPattern = `| [${module}](${linkPath}) | - |`; | |
| const newPattern = `| [${module}](${linkPath}) | ${description} |`; | |
| content = content.replace(oldPattern, newPattern); | |
| const oldPattern = new RegExp(`\\|\\s*\\[${module}\\]\\(${linkPath}\\)\\s*\\|\\s*-\\s*\\|`, 'g'); | |
| content = content.replace(oldPattern, `| [${module}](${linkPath}) | ${description} |`); |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
ccusage-guide | d06e6b1 | Commit Preview URL | Jun 22 2025, 01:05 AM |
Replace console.log with console.error in update-api-index.mjs to comply with eslint no-console rule that only allows console.warn and console.error methods
There was a problem hiding this comment.
Code Review
Excellent pull request migrating documentation to VitePress. I've found a few minor issues, mostly related to consistency, broken links, and potentially redundant configuration. Addressing these will help polish the new documentation site and improve maintainability.
| ['meta', { property: 'og:locale', content: 'en' }], | ||
| ['meta', { property: 'og:title', content: 'ccusage | Claude Code Usage Analysis' }], | ||
| ['meta', { property: 'og:site_name', content: 'ccusage' }], | ||
| ['meta', { property: 'og:image', content: 'https://cdn.jsdelivr.net/gh/ryoppippi/ccusage@main/docs/logo.svg' }], |
There was a problem hiding this comment.
The og:image URL should be updated to reflect the new path of the logo, which is now in the docs/public/ directory.
| ['meta', { property: 'og:image', content: 'https://cdn.jsdelivr.net/gh/ryoppippi/ccusage@main/docs/logo.svg' }], | |
| ['meta', { property: 'og:image', content: 'https://cdn.jsdelivr.net/gh/ryoppippi/ccusage@main/docs/public/logo.svg' }], |
| echo $CLAUDE_CONFIG_DIR | ||
|
|
||
| # Test with explicit path | ||
| ccusage daily --path /path/to/claude/projects |
There was a problem hiding this comment.
The example uses a --path command-line argument, but the tool uses the CLAUDE_CONFIG_DIR environment variable to specify custom paths. Consider replacing this with an example that uses the CLAUDE_CONFIG_DIR environment variable for clarity.
| ccusage daily --path /path/to/claude/projects | |
| # Test with explicit environment variable | |
| export CLAUDE_CONFIG_DIR="/path/to/claude/projects" | |
| ccusage daily |
|
|
||
| ## Acknowledgments | ||
|
|
||
| Thanks to [@milliondev](https://note.com/milliondev) for the [original concept and approach](https://note.com/milliondev/n/n872c1c5b3ed8) to Claude Code usage analysis. |
There was a problem hiding this comment.
The link to the "original concept and approach" article appears to be incorrect. Please verify and correct the link to ensure it points to the right resource.
| Thanks to [@milliondev](https://note.com/milliondev) for the [original concept and approach](https://note.com/milliondev/n/n872c1c5b3ed8) to Claude Code usage analysis. | |
| Thanks to [@milliondev](https://note.com/milliondev) for the [original concept and approach](https://note.com/milliondev/n/n1d018da2d769) to Claude Code usage analysis. |
| const totals = calculateTotals(usageData); | ||
|
|
||
| // Get total tokens from usage entries | ||
| const totalTokens = getTotalTokens(usageEntries); |
There was a problem hiding this comment.
The variables usageData and usageEntries are used in these examples without being defined. Please provide a more complete, self-contained example.
| const totals = calculateTotals(usageData); | |
| // Get total tokens from usage entries | |
| const totalTokens = getTotalTokens(usageEntries); | |
| // Assume 'usageEntries' is an array of usage data objects | |
| const totals = calculateTotals(usageEntries); | |
| // Get total tokens from the same entries | |
| const totalTokens = getTotalTokens(usageEntries); |
|
|
||
| 1. [Session Reports](/guide/session-reports) to identify high-cost conversations | ||
| 2. [Live Monitoring](/guide/live-monitoring) to track real-time usage | ||
| 3. [Custom Scripts](/examples/custom-scripts) for automated analysis |
| { | ||
| "sessions": [ | ||
| { | ||
| "sessionId": "abc123-def", | ||
| "inputTokens": 4512, | ||
| "outputTokens": 350846, | ||
| "cacheCreationTokens": 512, | ||
| "cacheReadTokens": 1024, | ||
| "totalTokens": 356894, | ||
| "totalCost": 156.40, | ||
| "lastActivity": "2025-06-21", | ||
| "modelsUsed": ["opus-4", "sonnet-4"], | ||
| "modelBreakdowns": [ | ||
| { | ||
| "model": "opus-4", | ||
| "inputTokens": 2000, | ||
| "outputTokens": 200000, | ||
| "totalCost": 95.50 | ||
| } | ||
| ] | ||
| } | ||
| ], | ||
| "totals": { | ||
| "inputTokens": 9174, | ||
| "outputTokens": 720546, | ||
| "totalCost": 336.58 | ||
| } | ||
| } | ||
| ``` |
| - icon: 📅 | ||
| title: Monthly Reports | ||
| details: Analyze usage patterns over monthly periods with cost tracking | ||
| - icon: 💬 | ||
| title: Session Reports | ||
| details: Group usage by conversation sessions for detailed analysis | ||
| - icon: ⏰ | ||
| title: 5-Hour Blocks | ||
| details: Track usage within Claude's billing windows with active monitoring | ||
| - icon: 📈 | ||
| title: Live Monitoring | ||
| details: Real-time dashboard with progress bars and cost projections |
There was a problem hiding this comment.
Several features in this list are missing links to their corresponding guide pages, while others have them. For a better user experience and easier navigation, consider adding links for all features that have a dedicated documentation page.
| - icon: 📅 | |
| title: Monthly Reports | |
| details: Analyze usage patterns over monthly periods with cost tracking | |
| - icon: 💬 | |
| title: Session Reports | |
| details: Group usage by conversation sessions for detailed analysis | |
| - icon: ⏰ | |
| title: 5-Hour Blocks | |
| details: Track usage within Claude's billing windows with active monitoring | |
| - icon: 📈 | |
| title: Live Monitoring | |
| details: Real-time dashboard with progress bars and cost projections | |
| - icon: 📅 | |
| title: Monthly Reports | |
| details: Analyze usage patterns over monthly periods with cost tracking | |
| link: /guide/monthly-reports | |
| - icon: 💬 | |
| title: Session Reports | |
| details: Group usage by conversation sessions for detailed analysis | |
| link: /guide/session-reports | |
| - icon: ⏰ | |
| title: 5-Hour Blocks | |
| details: Track usage within Claude's billing windows with active monitoring | |
| link: /guide/blocks-reports | |
| - icon: 📈 | |
| title: Live Monitoring | |
| details: Real-time dashboard with progress bars and cost projections | |
| link: /guide/live-monitoring |
| }, | ||
| ignores: [ | ||
| 'docs/api/**', | ||
| 'docs/docs/**', |
| { | ||
| "$schema": "https://typedoc.org/schema.json", | ||
| "entryPoints": [ | ||
| "src/index.ts", | ||
| "src/data-loader.ts", | ||
| "src/calculate-cost.ts", | ||
| "src/mcp.ts", | ||
| "src/_types.ts" | ||
| ], | ||
| "out": "docs/api", | ||
| "hideGenerator": true, | ||
| "disableSources": false, | ||
| "sourceLinkTemplate": "https://github.com/ryoppippi/ccusage/blob/{gitRevision}/{path}#L{line}", | ||
| "gitRevision": "main", | ||
| "readme": "none", | ||
| "excludePrivate": true, | ||
| "excludeProtected": true, | ||
| "excludeInternal": true, | ||
| "categorizeByGroup": true, | ||
| "categoryOrder": [ | ||
| "Data Loading", | ||
| "Cost Calculation", | ||
| "MCP Integration", | ||
| "Type Definitions", | ||
| "*" | ||
| ], | ||
| "groupOrder": [ | ||
| "Functions", | ||
| "Classes", | ||
| "Interfaces", | ||
| "Type Aliases", | ||
| "Variables" | ||
| ], | ||
| "sort": [ | ||
| "source-order" | ||
| ], | ||
| "kindSortOrder": [ | ||
| "Document", | ||
| "Project", | ||
| "Module", | ||
| "Namespace", | ||
| "Enum", | ||
| "EnumMember", | ||
| "Class", | ||
| "Interface", | ||
| "TypeAlias", | ||
| "Constructor", | ||
| "Property", | ||
| "Variable", | ||
| "Function", | ||
| "Accessor", | ||
| "Method", | ||
| "Parameter", | ||
| "TypeParameter", | ||
| "TypeLiteral", | ||
| "CallSignature", | ||
| "ConstructorSignature", | ||
| "IndexSignature", | ||
| "GetSignature", | ||
| "SetSignature" | ||
| ], | ||
| "navigation": { | ||
| "includeCategories": true, | ||
| "includeGroups": true | ||
| }, | ||
| "searchInComments": true, | ||
| "cleanOutputDir": true | ||
| } |
Exclude docs/** from ESLint to avoid build-dependent linting issues: - docs directory contains generated content and VitePress config - TypeDoc sidebar and API files are generated during build - Prevents CI lint failures when docs are not yet built
Update og:image meta tag to point to correct logo location Changes logo path from docs/logo.svg to docs/public/logo.svg
Replace incorrect --path argument with CLAUDE_CONFIG_DIR environment variable Fix undefined variables in library usage example for consistency
Replace fragile fixed-string matching with regex pattern Makes the script more resilient to formatting changes in markdown tables
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (5)
docs/index.md (1)
24-36: Missing documentation links for features.
Several feature items lacklinkproperties, which hinders navigation to their detailed guides. Please add links for:
- Monthly Reports (
/guide/monthly-reports)- Session Reports (
/guide/session-reports)- 5-Hour Blocks (
/guide/blocks-reports)- Live Monitoring (
/guide/live-monitoring)typedoc.json (1)
1-68: Clarify the relationship between TypeDoc configurations.This configuration duplicates some functionality with
docs/typedoc.config.mjs. Consider consolidating to a single configuration file or clearly documenting when each should be used to avoid maintenance confusion.docs/guide/index.md (1)
99-99: Fix the incorrect link to the original concept.The link to the "original concept and approach" article appears to be incorrect. Please verify and correct the link to ensure it points to the right resource.
docs/.vitepress/config.ts (1)
21-21: Duplicate: OG image path updated
Theog:imagemeta tag now correctly points todocs/public/logo.svgvia CDN, matching the new asset location.docs/guide/session-reports.md (1)
123-151: Review JSON example for consistency withjson-output.md
The JSON structure shown here appears inconsistent with the schema documented injson-output.md. Please update this example to match the defined JSON output format.
🧹 Nitpick comments (28)
docs/index.ts (1)
1-5: Add documentation to clarify the purpose of this export.This appears to be a minimal API endpoint or entry point, but the purpose isn't clear from the code. Consider adding JSDoc comments to explain when and how this
fetchmethod is intended to be used.+/** + * Minimal API endpoint for the documentation site + * @returns Response containing the project name + */ export default { fetch() { return new Response('ccusage'); }, };package.json (1)
40-43: Streamline docs scripts
Consider using Bun’s--cwdflag instead ofcdto avoid shell-specific commands and improve cross-platform compatibility.- "docs:build": "cd docs && bun run build", - "docs:deploy": "cd docs && bun run deploy", - "docs:dev": "cd docs && bun run dev", - "docs:preview": "cd docs && bun run preview", + "docs:build": "bun --cwd docs run build", + "docs:deploy": "bun --cwd docs run deploy", + "docs:dev": "bun --cwd docs run dev", + "docs:preview": "bun --cwd docs run preview",docs/guide/sponsors.md (2)
7-8: Add alt text to sponsor badge
Images should include analtattribute for accessibility (e.g.,alt="GitHub Sponsors badge").- <img src="https://cdn.jsdelivr.net/gh/ryoppippi/sponsors@main/sponsors.svg"> + <img src="https://cdn.jsdelivr.net/gh/ryoppippi/sponsors@main/sponsors.svg" alt="GitHub Sponsors badge">
13-13: Use hyphen in compound adjective
Apply a hyphen for the compound modifier:open-source projects.- support the development of ccusage and other open source projects. + support the development of ccusage and other open-source projects.README.md (1)
14-15: Add alt text for screenshot.
The screenshot image lacks analtattribute, which is required for accessibility.Proposed fix:
- <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 CLI screenshot">docs/package.json (1)
4-4: Consider using a more appropriate version number.The version
15.0.0seems arbitrary for a documentation package. Consider using1.0.0or aligning with the main package version if this docs package version should track the main project.docs/guide/index.md (1)
92-92: Remove repeated adverb for better readability.The word "only" appears twice in this sentence, making it awkward to read.
-- **Local Files Only** - Only analyzes data from your current machine +- **Local Files Only** - Analyzes data from your current machinedocs/guide/configuration.md (2)
5-26: Suggest documenting theCCUSAGE_OFFLINEenvironment variableYou reference offline mode in CI/CD examples via
export CCUSAGE_OFFLINE=1, but it isn’t described here. Consider adding a brief entry under Environment Variables forCCUSAGE_OFFLINEto improve discoverability.
57-77: Use VitePresscode-groupfor CLI examplesTo maintain consistency with other guides (e.g., installation), wrap related command examples in a
::: code-groupblock instead of individual fences. This enhances readability and navigation in the VitePress UI.docs/guide/daily-reports.md (2)
98-109: Specify the language for the ASCII table blockThe daily report breakdown table is currently in a generic fenced block. Add a language specifier (e.g., ```text) to improve syntax highlighting and satisfy lint rules (MD040).
173-179: Consider cross-platform date exampleThe
date -d '7 days ago'syntax works on GNUdatebut not on macOS. You might add a macOS alternative (e.g.,date -v -7d +%Y%m%d) or note platform differences.docs/guide/json-output.md (2)
27-51: Replace tabs with spaces in JSON examplesThe JSON code blocks use hard tabs for indentation, triggering markdownlint warnings (MD010). Convert to spaces for consistent formatting.
205-236: Apply consistent spacing in breakdown JSON sampleSimilarly, the per-model breakdown JSON snippet contains hard tabs. Standardize on spaces to ensure consistent docs formatting.
docs/guide/mcp-server.md (1)
15-16: Minor grammar: add comma for clarityIn “The stdio transport is ideal for local integration where the client directly spawns the process.” consider adding a comma after “integration” for readability:
-The stdio transport is ideal for local integration where the client directly spawns the process. +The stdio transport is ideal for local integration, where the client directly spawns the process.docs/guide/monthly-reports.md (2)
13-13: Specify code block language for Example Output
The fenced block showing the ASCII table lacks a language label. Mark it as plain text for clarity and lint compliance:- ``` + ```text
123-132: Replace hard tabs with spaces in JSON example
The JSON snippet uses tab characters for indentation, which can fail lint rules. Convert to spaces (e.g., 2 spaces per level) to maintain consistency:- { + {docs/guide/live-monitoring.md (2)
65-66: Use en dash for numeric ranges
Replace hyphens in range descriptors with en dashes for typographic correctness:- **0.5-2 seconds** + **0.5–2 seconds** - **5-10 seconds** + **5–10 seconds**
229-231: Specify language for plain output block
The fenced block showingNo active session found…is untyped. Add a label liketextto improve readability and satisfy lint rules:- ``` + ```textdocs/guide/custom-paths.md (2)
142-142: Improve readability by adding a comma
Consider inserting a comma for clarity:- Invalid paths are automatically skipped with debug information available. + Invalid paths are automatically skipped, with debug information available.
295-310: Replace hard tabs with spaces in JSON example
The MCP integration JSON snippet uses tab characters for indentation. Convert these to spaces (e.g., 2 spaces per level) to ensure consistent formatting and lint compliance:- \t"mcpServers": { + "mcpServers": {docs/guide/blocks-reports.md (4)
7-9: Specify code block language for Basic Usage
The CLI command example is untyped. Label the block asbashto improve syntax highlighting:- ``` + ```bash
13-36: Label ASCII output block as plaintext
The example output block lacks a language spec. Usetextorplaintextfor clarity and lint compliance:- ``` + ```text
120-121: Use en dash for numeric ranges
Replace hyphens with en dashes in range descriptions for consistency:- every 1-60 seconds + every 1–60 seconds
308-316: Specify language for gap detection table
The fenced block showing the gap detection table is untyped. Addtextto improve readability and satisfy lint rules:- ``` + ```textdocs/guide/cost-modes.md (1)
40-48: Specify language for ASCII table code fences
The ASCII art tables are fenced with ``` but lack a language identifier. Adding a language (e.g.,text) will enable proper formatting and improve readability.Also applies to: 75-83, 109-118
docs/guide/session-reports.md (3)
13-30: Add language spec to ASCII table code block
The first ASCII art table after “Example Output” is fenced with ``` but missing a language (e.g.,text). Please add it for proper syntax highlighting.
102-112: Add language spec to breakdown ASCII table
The session breakdown example’s ASCII table uses a plain ``` fence. Include a language identifier (e.g.,text) to improve formatting.
124-149: Replace hard tabs with spaces
Indentation in the JSON example uses hard tabs, which triggers markdownlint warnings. Convert these to spaces to adhere to style guidelines.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (6)
bun.lockis excluded by!**/*.lockdocs/public/blocks-live.pngis excluded by!**/*.pngdocs/public/favicon.svgis excluded by!**/*.svgdocs/public/logo.pngis excluded by!**/*.pngdocs/public/logo.svgis excluded by!**/*.svgdocs/public/screenshot.pngis excluded by!**/*.png
📒 Files selected for processing (39)
CLAUDE.md(1 hunks)README.md(3 hunks)docs/.gitignore(1 hunks)docs/.vitepress/config.ts(1 hunks)docs/guide/blocks-reports.md(1 hunks)docs/guide/configuration.md(1 hunks)docs/guide/cost-modes.md(1 hunks)docs/guide/custom-paths.md(1 hunks)docs/guide/daily-reports.md(1 hunks)docs/guide/getting-started.md(1 hunks)docs/guide/index.md(1 hunks)docs/guide/installation.md(1 hunks)docs/guide/json-output.md(1 hunks)docs/guide/library-usage.md(1 hunks)docs/guide/live-monitoring.md(1 hunks)docs/guide/mcp-server.md(1 hunks)docs/guide/monthly-reports.md(1 hunks)docs/guide/related-projects.md(1 hunks)docs/guide/session-reports.md(1 hunks)docs/guide/sponsors.md(1 hunks)docs/index.md(1 hunks)docs/index.ts(1 hunks)docs/package.json(1 hunks)docs/tsconfig.json(1 hunks)docs/typedoc.config.mjs(1 hunks)docs/update-api-index.mjs(1 hunks)docs/wrangler.jsonc(1 hunks)eslint.config.js(1 hunks)package.json(1 hunks)src/_macro.ts(1 hunks)src/calculate-cost.ts(1 hunks)src/commands/blocks.ts(2 hunks)src/data-loader.ts(2 hunks)src/debug.ts(1 hunks)src/index.ts(1 hunks)src/logger.ts(1 hunks)src/mcp.ts(1 hunks)src/pricing-fetcher.ts(1 hunks)typedoc.json(1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/guide/getting-started.md
[uncategorized] ~72-~72: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...e these features: 1. Monthly Reports - See usage aggregated by month 2. *...
(HYPHENATED_LY_ADVERB_ADJECTIVE)
docs/guide/json-output.md
[uncategorized] ~148-~148: Loose punctuation mark.
Context: ...criptions ### Common Fields - models: Array of Claude model names used - `inp...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~160-~160: Loose punctuation mark.
Context: ...fic Fields #### Daily Reports - date: Date in YYYY-MM-DD format #### Monthly...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~164-~164: Loose punctuation mark.
Context: ... format #### Monthly Reports - month: Month in YYYY-MM format #### Session R...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~168-~168: Loose punctuation mark.
Context: ...ormat #### Session Reports - session: Session identifier - lastActivity: Da...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~173-~173: Loose punctuation mark.
Context: ...ion #### Blocks Reports - blockStart: ISO timestamp of block start - `blockEn...
(UNLIKELY_OPENING_PUNCTUATION)
docs/guide/live-monitoring.md
[typographical] ~67-~67: If specifying a range, consider using an en dash instead of a hyphen.
Context: ...ctive monitoring during heavy usage - 5-10 seconds: For casual monitoring or slo...
(HYPHEN_TO_EN)
docs/guide/mcp-server.md
[uncategorized] ~15-~15: Possible missing comma found.
Context: ... The stdio transport is ideal for local integration where the client directly spawns the pr...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~212-~212: Loose punctuation mark.
Context: ...ables as the CLI: - CLAUDE_CONFIG_DIR: Specify custom Claude data directory pa...
(UNLIKELY_OPENING_PUNCTUATION)
docs/guide/daily-reports.md
[uncategorized] ~189-~189: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ... ## Related Commands - Monthly Reports - Aggregate by month - [Session Report...
(HYPHENATED_LY_ADVERB_ADJECTIVE)
docs/guide/sponsors.md
[uncategorized] ~13-~13: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...rt the development of ccusage and other open source projects. ## Star History <a href="ht...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
docs/guide/blocks-reports.md
[typographical] ~121-~121: If specifying a range, consider using an en dash instead of a hyphen.
Context: ...eatures: - Real-time updates every 1-60 seconds (configurable) - **Automatic to...
(HYPHEN_TO_EN)
[uncategorized] ~343-~343: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...ated by calendar date - Monthly Reports - Monthly usage summaries - [Session R...
(HYPHENATED_LY_ADVERB_ADJECTIVE)
docs/guide/cost-modes.md
[style] ~149-~149: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...# Scenario 3: Billing Verification You want to verify Claude's official cost calculati...
(REP_WANT_TO_VB)
[uncategorized] ~248-~248: Possible missing preposition found.
Context: ... - Combining old and new usage data - Maximum accuracy - Best available cost inform...
(AI_HYDRA_LEO_MISSING_TO)
docs/guide/custom-paths.md
[uncategorized] ~142-~142: Possible missing comma found.
Context: ...ucture Invalid paths are automatically skipped with debug information available. ## C...
(AI_HYDRA_LEO_MISSING_COMMA)
docs/guide/index.md
[style] ~92-~92: This adverb was used twice in the sentence. Consider removing one of them or replacing them with a synonym.
Context: ...t Limitations - Local Files Only - Only analyzes data from your current machine...
(ADVERB_REPETITION_PREMIUM)
docs/guide/configuration.md
[uncategorized] ~144-~144: Possible missing preposition found.
Context: ...rks with restricted internet access - Corporate environments - Behind firewalls or pr...
(AI_HYDRA_LEO_MISSING_IN)
[style] ~150-~150: This adverb was used twice in the sentence. Consider removing one of them or replacing them with a synonym.
Context: ...Limitations - Claude models only - Only supports Claude models (Opus, Sonnet, e...
(ADVERB_REPETITION_PREMIUM)
[uncategorized] ~152-~152: Possible missing preposition found.
Context: ...on't get latest pricing information - New models - May not support newly releas...
(AI_HYDRA_LEO_MISSING_OF)
docs/guide/session-reports.md
[uncategorized] ~260-~260: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...ge aggregated by date - Monthly Reports - Monthly summaries - [Blocks Reports]...
(HYPHENATED_LY_ADVERB_ADJECTIVE)
🪛 markdownlint-cli2 (0.17.2)
docs/guide/json-output.md
29-29: Hard tabs
Column: 1
(MD010, no-hard-tabs)
30-30: Hard tabs
Column: 1
(MD010, no-hard-tabs)
31-31: Hard tabs
Column: 1
(MD010, no-hard-tabs)
32-32: Hard tabs
Column: 1
(MD010, no-hard-tabs)
33-33: Hard tabs
Column: 1
(MD010, no-hard-tabs)
34-34: Hard tabs
Column: 1
(MD010, no-hard-tabs)
35-35: Hard tabs
Column: 1
(MD010, no-hard-tabs)
36-36: Hard tabs
Column: 1
(MD010, no-hard-tabs)
37-37: Hard tabs
Column: 1
(MD010, no-hard-tabs)
38-38: Hard tabs
Column: 1
(MD010, no-hard-tabs)
39-39: Hard tabs
Column: 1
(MD010, no-hard-tabs)
40-40: Hard tabs
Column: 1
(MD010, no-hard-tabs)
41-41: Hard tabs
Column: 1
(MD010, no-hard-tabs)
42-42: Hard tabs
Column: 1
(MD010, no-hard-tabs)
43-43: Hard tabs
Column: 1
(MD010, no-hard-tabs)
44-44: Hard tabs
Column: 1
(MD010, no-hard-tabs)
45-45: Hard tabs
Column: 1
(MD010, no-hard-tabs)
46-46: Hard tabs
Column: 1
(MD010, no-hard-tabs)
47-47: Hard tabs
Column: 1
(MD010, no-hard-tabs)
48-48: Hard tabs
Column: 1
(MD010, no-hard-tabs)
49-49: Hard tabs
Column: 1
(MD010, no-hard-tabs)
57-57: Hard tabs
Column: 1
(MD010, no-hard-tabs)
58-58: Hard tabs
Column: 1
(MD010, no-hard-tabs)
59-59: Hard tabs
Column: 1
(MD010, no-hard-tabs)
60-60: Hard tabs
Column: 1
(MD010, no-hard-tabs)
61-61: Hard tabs
Column: 1
(MD010, no-hard-tabs)
62-62: Hard tabs
Column: 1
(MD010, no-hard-tabs)
63-63: Hard tabs
Column: 1
(MD010, no-hard-tabs)
64-64: Hard tabs
Column: 1
(MD010, no-hard-tabs)
65-65: Hard tabs
Column: 1
(MD010, no-hard-tabs)
66-66: Hard tabs
Column: 1
(MD010, no-hard-tabs)
67-67: Hard tabs
Column: 1
(MD010, no-hard-tabs)
68-68: Hard tabs
Column: 1
(MD010, no-hard-tabs)
69-69: Hard tabs
Column: 1
(MD010, no-hard-tabs)
70-70: Hard tabs
Column: 1
(MD010, no-hard-tabs)
71-71: Hard tabs
Column: 1
(MD010, no-hard-tabs)
72-72: Hard tabs
Column: 1
(MD010, no-hard-tabs)
73-73: Hard tabs
Column: 1
(MD010, no-hard-tabs)
74-74: Hard tabs
Column: 1
(MD010, no-hard-tabs)
75-75: Hard tabs
Column: 1
(MD010, no-hard-tabs)
76-76: Hard tabs
Column: 1
(MD010, no-hard-tabs)
77-77: Hard tabs
Column: 1
(MD010, no-hard-tabs)
85-85: Hard tabs
Column: 1
(MD010, no-hard-tabs)
86-86: Hard tabs
Column: 1
(MD010, no-hard-tabs)
87-87: Hard tabs
Column: 1
(MD010, no-hard-tabs)
88-88: Hard tabs
Column: 1
(MD010, no-hard-tabs)
89-89: Hard tabs
Column: 1
(MD010, no-hard-tabs)
90-90: Hard tabs
Column: 1
(MD010, no-hard-tabs)
91-91: Hard tabs
Column: 1
(MD010, no-hard-tabs)
92-92: Hard tabs
Column: 1
(MD010, no-hard-tabs)
93-93: Hard tabs
Column: 1
(MD010, no-hard-tabs)
94-94: Hard tabs
Column: 1
(MD010, no-hard-tabs)
95-95: Hard tabs
Column: 1
(MD010, no-hard-tabs)
96-96: Hard tabs
Column: 1
(MD010, no-hard-tabs)
97-97: Hard tabs
Column: 1
(MD010, no-hard-tabs)
98-98: Hard tabs
Column: 1
(MD010, no-hard-tabs)
99-99: Hard tabs
Column: 1
(MD010, no-hard-tabs)
100-100: Hard tabs
Column: 1
(MD010, no-hard-tabs)
101-101: Hard tabs
Column: 1
(MD010, no-hard-tabs)
102-102: Hard tabs
Column: 1
(MD010, no-hard-tabs)
103-103: Hard tabs
Column: 1
(MD010, no-hard-tabs)
104-104: Hard tabs
Column: 1
(MD010, no-hard-tabs)
105-105: Hard tabs
Column: 1
(MD010, no-hard-tabs)
106-106: Hard tabs
Column: 1
(MD010, no-hard-tabs)
114-114: Hard tabs
Column: 1
(MD010, no-hard-tabs)
115-115: Hard tabs
Column: 1
(MD010, no-hard-tabs)
116-116: Hard tabs
Column: 1
(MD010, no-hard-tabs)
117-117: Hard tabs
Column: 1
(MD010, no-hard-tabs)
118-118: Hard tabs
Column: 1
(MD010, no-hard-tabs)
119-119: Hard tabs
Column: 1
(MD010, no-hard-tabs)
120-120: Hard tabs
Column: 1
(MD010, no-hard-tabs)
121-121: Hard tabs
Column: 1
(MD010, no-hard-tabs)
122-122: Hard tabs
Column: 1
(MD010, no-hard-tabs)
123-123: Hard tabs
Column: 1
(MD010, no-hard-tabs)
124-124: Hard tabs
Column: 1
(MD010, no-hard-tabs)
125-125: Hard tabs
Column: 1
(MD010, no-hard-tabs)
126-126: Hard tabs
Column: 1
(MD010, no-hard-tabs)
127-127: Hard tabs
Column: 1
(MD010, no-hard-tabs)
128-128: Hard tabs
Column: 1
(MD010, no-hard-tabs)
129-129: Hard tabs
Column: 1
(MD010, no-hard-tabs)
130-130: Hard tabs
Column: 1
(MD010, no-hard-tabs)
131-131: Hard tabs
Column: 1
(MD010, no-hard-tabs)
132-132: Hard tabs
Column: 1
(MD010, no-hard-tabs)
133-133: Hard tabs
Column: 1
(MD010, no-hard-tabs)
134-134: Hard tabs
Column: 1
(MD010, no-hard-tabs)
135-135: Hard tabs
Column: 1
(MD010, no-hard-tabs)
136-136: Hard tabs
Column: 1
(MD010, no-hard-tabs)
137-137: Hard tabs
Column: 1
(MD010, no-hard-tabs)
138-138: Hard tabs
Column: 1
(MD010, no-hard-tabs)
139-139: Hard tabs
Column: 1
(MD010, no-hard-tabs)
140-140: Hard tabs
Column: 1
(MD010, no-hard-tabs)
206-206: Hard tabs
Column: 1
(MD010, no-hard-tabs)
207-207: Hard tabs
Column: 1
(MD010, no-hard-tabs)
208-208: Hard tabs
Column: 1
(MD010, no-hard-tabs)
209-209: Hard tabs
Column: 1
(MD010, no-hard-tabs)
210-210: Hard tabs
Column: 1
(MD010, no-hard-tabs)
211-211: Hard tabs
Column: 1
(MD010, no-hard-tabs)
212-212: Hard tabs
Column: 1
(MD010, no-hard-tabs)
213-213: Hard tabs
Column: 1
(MD010, no-hard-tabs)
214-214: Hard tabs
Column: 1
(MD010, no-hard-tabs)
215-215: Hard tabs
Column: 1
(MD010, no-hard-tabs)
216-216: Hard tabs
Column: 1
(MD010, no-hard-tabs)
217-217: Hard tabs
Column: 1
(MD010, no-hard-tabs)
218-218: Hard tabs
Column: 1
(MD010, no-hard-tabs)
219-219: Hard tabs
Column: 1
(MD010, no-hard-tabs)
220-220: Hard tabs
Column: 1
(MD010, no-hard-tabs)
221-221: Hard tabs
Column: 1
(MD010, no-hard-tabs)
222-222: Hard tabs
Column: 1
(MD010, no-hard-tabs)
223-223: Hard tabs
Column: 1
(MD010, no-hard-tabs)
224-224: Hard tabs
Column: 1
(MD010, no-hard-tabs)
225-225: Hard tabs
Column: 1
(MD010, no-hard-tabs)
226-226: Hard tabs
Column: 1
(MD010, no-hard-tabs)
227-227: Hard tabs
Column: 1
(MD010, no-hard-tabs)
228-228: Hard tabs
Column: 1
(MD010, no-hard-tabs)
229-229: Hard tabs
Column: 1
(MD010, no-hard-tabs)
230-230: Hard tabs
Column: 1
(MD010, no-hard-tabs)
231-231: Hard tabs
Column: 1
(MD010, no-hard-tabs)
232-232: Hard tabs
Column: 1
(MD010, no-hard-tabs)
233-233: Hard tabs
Column: 1
(MD010, no-hard-tabs)
234-234: Hard tabs
Column: 1
(MD010, no-hard-tabs)
290-290: Hard tabs
Column: 1
(MD010, no-hard-tabs)
README.md
14-14: Images should have alternate text (alt text)
null
(MD045, no-alt-text)
docs/guide/monthly-reports.md
13-13: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
103-103: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
123-123: Hard tabs
Column: 1
(MD010, no-hard-tabs)
124-124: Hard tabs
Column: 1
(MD010, no-hard-tabs)
125-125: Hard tabs
Column: 1
(MD010, no-hard-tabs)
126-126: Hard tabs
Column: 1
(MD010, no-hard-tabs)
127-127: Hard tabs
Column: 1
(MD010, no-hard-tabs)
128-128: Hard tabs
Column: 1
(MD010, no-hard-tabs)
129-129: Hard tabs
Column: 1
(MD010, no-hard-tabs)
130-130: Hard tabs
Column: 1
(MD010, no-hard-tabs)
131-131: Hard tabs
Column: 1
(MD010, no-hard-tabs)
132-132: Hard tabs
Column: 1
(MD010, no-hard-tabs)
docs/guide/daily-reports.md
99-99: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
121-121: Hard tabs
Column: 1
(MD010, no-hard-tabs)
122-122: Hard tabs
Column: 1
(MD010, no-hard-tabs)
123-123: Hard tabs
Column: 1
(MD010, no-hard-tabs)
124-124: Hard tabs
Column: 1
(MD010, no-hard-tabs)
125-125: Hard tabs
Column: 1
(MD010, no-hard-tabs)
126-126: Hard tabs
Column: 1
(MD010, no-hard-tabs)
127-127: Hard tabs
Column: 1
(MD010, no-hard-tabs)
128-128: Hard tabs
Column: 1
(MD010, no-hard-tabs)
129-129: Hard tabs
Column: 1
(MD010, no-hard-tabs)
130-130: Hard tabs
Column: 1
(MD010, no-hard-tabs)
docs/guide/sponsors.md
7-7: Images should have alternate text (alt text)
null
(MD045, no-alt-text)
docs/guide/blocks-reports.md
13-13: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
185-185: Hard tabs
Column: 1
(MD010, no-hard-tabs)
186-186: Hard tabs
Column: 1
(MD010, no-hard-tabs)
187-187: Hard tabs
Column: 1
(MD010, no-hard-tabs)
188-188: Hard tabs
Column: 1
(MD010, no-hard-tabs)
189-189: Hard tabs
Column: 1
(MD010, no-hard-tabs)
190-190: Hard tabs
Column: 1
(MD010, no-hard-tabs)
191-191: Hard tabs
Column: 1
(MD010, no-hard-tabs)
192-192: Hard tabs
Column: 1
(MD010, no-hard-tabs)
193-193: Hard tabs
Column: 1
(MD010, no-hard-tabs)
194-194: Hard tabs
Column: 1
(MD010, no-hard-tabs)
195-195: Hard tabs
Column: 1
(MD010, no-hard-tabs)
196-196: Hard tabs
Column: 1
(MD010, no-hard-tabs)
197-197: Hard tabs
Column: 1
(MD010, no-hard-tabs)
198-198: Hard tabs
Column: 1
(MD010, no-hard-tabs)
199-199: Hard tabs
Column: 1
(MD010, no-hard-tabs)
200-200: Hard tabs
Column: 1
(MD010, no-hard-tabs)
201-201: Hard tabs
Column: 1
(MD010, no-hard-tabs)
311-311: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
docs/guide/custom-paths.md
83-83: Emphasis used instead of a heading
null
(MD036, no-emphasis-as-heading)
93-93: Emphasis used instead of a heading
null
(MD036, no-emphasis-as-heading)
106-106: Emphasis used instead of a heading
null
(MD036, no-emphasis-as-heading)
120-120: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
295-295: Hard tabs
Column: 1
(MD010, no-hard-tabs)
296-296: Hard tabs
Column: 1
(MD010, no-hard-tabs)
297-297: Hard tabs
Column: 1
(MD010, no-hard-tabs)
298-298: Hard tabs
Column: 1
(MD010, no-hard-tabs)
299-299: Hard tabs
Column: 1
(MD010, no-hard-tabs)
300-300: Hard tabs
Column: 1
(MD010, no-hard-tabs)
301-301: Hard tabs
Column: 1
(MD010, no-hard-tabs)
302-302: Hard tabs
Column: 1
(MD010, no-hard-tabs)
303-303: Hard tabs
Column: 1
(MD010, no-hard-tabs)
304-304: Hard tabs
Column: 1
(MD010, no-hard-tabs)
305-305: Hard tabs
Column: 1
(MD010, no-hard-tabs)
306-306: Hard tabs
Column: 1
(MD010, no-hard-tabs)
307-307: Hard tabs
Column: 1
(MD010, no-hard-tabs)
308-308: Hard tabs
Column: 1
(MD010, no-hard-tabs)
309-309: Hard tabs
Column: 1
(MD010, no-hard-tabs)
310-310: Hard tabs
Column: 1
(MD010, no-hard-tabs)
docs/guide/configuration.md
192-192: Hard tabs
Column: 1
(MD010, no-hard-tabs)
193-193: Hard tabs
Column: 1
(MD010, no-hard-tabs)
194-194: Hard tabs
Column: 1
(MD010, no-hard-tabs)
195-195: Hard tabs
Column: 1
(MD010, no-hard-tabs)
196-196: Hard tabs
Column: 1
(MD010, no-hard-tabs)
197-197: Hard tabs
Column: 1
(MD010, no-hard-tabs)
198-198: Hard tabs
Column: 1
(MD010, no-hard-tabs)
199-199: Hard tabs
Column: 1
(MD010, no-hard-tabs)
200-200: Hard tabs
Column: 1
(MD010, no-hard-tabs)
208-208: Hard tabs
Column: 1
(MD010, no-hard-tabs)
209-209: Hard tabs
Column: 1
(MD010, no-hard-tabs)
210-210: Hard tabs
Column: 1
(MD010, no-hard-tabs)
211-211: Hard tabs
Column: 1
(MD010, no-hard-tabs)
212-212: Hard tabs
Column: 1
(MD010, no-hard-tabs)
213-213: Hard tabs
Column: 1
(MD010, no-hard-tabs)
214-214: Hard tabs
Column: 1
(MD010, no-hard-tabs)
docs/guide/session-reports.md
13-13: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
102-102: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
124-124: Hard tabs
Column: 1
(MD010, no-hard-tabs)
125-125: Hard tabs
Column: 1
(MD010, no-hard-tabs)
126-126: Hard tabs
Column: 1
(MD010, no-hard-tabs)
127-127: Hard tabs
Column: 1
(MD010, no-hard-tabs)
128-128: Hard tabs
Column: 1
(MD010, no-hard-tabs)
129-129: Hard tabs
Column: 1
(MD010, no-hard-tabs)
130-130: Hard tabs
Column: 1
(MD010, no-hard-tabs)
131-131: Hard tabs
Column: 1
(MD010, no-hard-tabs)
132-132: Hard tabs
Column: 1
(MD010, no-hard-tabs)
133-133: Hard tabs
Column: 1
(MD010, no-hard-tabs)
134-134: Hard tabs
Column: 1
(MD010, no-hard-tabs)
135-135: Hard tabs
Column: 1
(MD010, no-hard-tabs)
136-136: Hard tabs
Column: 1
(MD010, no-hard-tabs)
137-137: Hard tabs
Column: 1
(MD010, no-hard-tabs)
138-138: Hard tabs
Column: 1
(MD010, no-hard-tabs)
139-139: Hard tabs
Column: 1
(MD010, no-hard-tabs)
140-140: Hard tabs
Column: 1
(MD010, no-hard-tabs)
141-141: Hard tabs
Column: 1
(MD010, no-hard-tabs)
142-142: Hard tabs
Column: 1
(MD010, no-hard-tabs)
143-143: Hard tabs
Column: 1
(MD010, no-hard-tabs)
144-144: Hard tabs
Column: 1
(MD010, no-hard-tabs)
145-145: Hard tabs
Column: 1
(MD010, no-hard-tabs)
146-146: Hard tabs
Column: 1
(MD010, no-hard-tabs)
147-147: Hard tabs
Column: 1
(MD010, no-hard-tabs)
148-148: Hard tabs
Column: 1
(MD010, no-hard-tabs)
149-149: Hard tabs
Column: 1
(MD010, no-hard-tabs)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Workers Builds: ccusage-guide
🔇 Additional comments (42)
src/index.ts (1)
3-10: Approve file-level JSDoc addition
The JSDoc block clearly documents the purpose of this entry point (ccusageCLI main module) without altering functionality.eslint.config.js (1)
9-11: Approve ESLint ignore pattern for documentation
Theignores: ['docs/**']correctly excludes the VitePress documentation files from linting to prevent unnecessary errors.src/mcp.ts (1)
1-9: Approve file-level JSDoc for MCP server module
The added JSDoc provides a concise overview of the module’s responsibility and transport options, enhancing maintainability and consistency.src/debug.ts (1)
1-8: Approve file-level JSDoc for debug utilities
This comment accurately describes the module’s debugging tools for pricing mismatch validation without introducing any behavioral changes.docs/wrangler.jsonc (1)
1-13: Verify Wrangler config file location and format
Ensure that Cloudflare Wrangler supports JSONC configs in adocs/subdirectory. You may need to rename this towrangler.tomlat the project root or adjust your deployment pipeline accordingly.src/_macro.ts (1)
5-7: Good TypeScript practice: separating type-only imports.The refactoring to use
import typeforModelPricingwhile keepingmodelPricingSchemaas a regular import is a good practice that improves code clarity and type safety.docs/guide/related-projects.md (1)
1-16: Well-structured documentation showcasing the ccusage ecosystem.This documentation effectively organizes related projects into clear categories and encourages community contributions. The format is clean and user-friendly.
src/calculate-cost.ts (1)
1-10: Excellent module-level documentation addition.The comprehensive JSDoc fileoverview comment clearly explains the module's purpose, functionality, and capabilities. This enhances code maintainability and developer understanding.
docs/.gitignore (1)
1-17: Comprehensive gitignore configuration for documentation site.The gitignore patterns appropriately exclude VitePress build artifacts, generated documentation, dependencies, and temporary files. This ensures a clean repository while supporting the documentation build process.
docs/tsconfig.json (1)
1-14: LGTM! Well-configured TypeScript setup for VitePress documentation.The configuration appropriately extends the parent tsconfig while customizing for documentation needs. The compiler options are well-chosen:
noEmit: truefor type-checking only,allowJs: truefor mixed content, and appropriate include patterns for VitePress, TypeScript, and Markdown files.src/commands/blocks.ts (1)
1-1: Excellent type import optimization!Converting to
import typeforSessionBlockis the correct approach since it's only used for type annotations. This improves build performance and makes the type-only usage explicit.CLAUDE.md (1)
137-150: Well-structured documentation guidelines that promote consistency and accessibility.The screenshot usage guidelines are comprehensive and practical, covering placement, purpose, specific examples, and accessibility requirements. This will help maintain high-quality, consistent visual documentation across the project.
src/logger.ts (2)
1-9: Excellent JSDoc documentation!The comprehensive file-level documentation clearly describes the module's purpose and follows standard JSDoc practices with proper tags and structure.
10-11: Perfect import optimization with type separation.Correctly separates the type-only import (
ConsolaInstance) from the runtime import (consola), following TypeScript best practices for better tree-shaking and explicit type usage.src/data-loader.ts (2)
1-9: Add comprehensive module documentation
The JSDoc provides a clear overview of this module’s purpose and functionalities, improving maintainability and aiding the automated docs generation.
11-11: Combine type imports for clarity
ConsolidatingLoadedUsageEntryandSessionBlockinto a singleimport typereduces duplication and aligns with the rest of the import style in this file.package.json (1)
34-37: Enable monorepo workspaces
Adding"."and"docs"toworkspacescorrectly configures the core package and documentation site in a unified workspace, facilitating dependency sharing and streamlined scripts.src/pricing-fetcher.ts (3)
1-9: Comprehensive file-level JSDoc added.
Provides clear context for thePricingFetcherclass and aligns with project documentation standards.
11-11: Use type-only import.
SwitchingModelPricingto a type import reduces emitted code and clarifies intent.
13-13: Macro import syntax is correct.
ImportingprefetchClaudePricingwith themacrodirective cleanly separates compile-time logic.docs/index.md (2)
1-3: Proper home page frontmatter.
The YAML header correctly sets the layout tohome, establishing the entry point for the VitePress site.
4-18: Hero section is well-defined.
The logoalttext is present and call-to-action buttons are clear and appropriately themed.docs/guide/getting-started.md (8)
1-9: Introduction and prerequisites are clear.
The guide immediately outlines requirements and context, making it easy to follow.
10-28: Quick Start section is well-structured.
Using::: code-groupmakes the multi-tool examples clear and consistent for VitePress.
30-49: First report sample is illustrative.
The ASCII table example effectively shows expected output.
51-67: Output explanation is thorough.
Column descriptions and cache token notes are precise and helpful.
68-76: Next Steps links are comprehensive.
All major guide pages are linked correctly, guiding users to deeper topics.
77-95: Common Use Cases are practical.
Examples cover typical workflows and demonstrate command variations.
96-121: Troubleshooting section is useful.
It addresses common pitfalls with clear instructions and examples.
122-128: Getting Help pointers are appropriate.
Command-line help, GitHub repo, and API reference links are provided.README.md (1)
2-3: Logo image alt text is present.
The README header image has an appropriatealtattribute.docs/guide/library-usage.md (2)
41-50: Clarified assumption forusageEntries.
The added comment explicitly definesusageEntries, addressing previous feedback on undefined variables.
113-113: Verify package exports for root imports.
The example importsloadSessionDataandcalculateTotalsfrom'ccusage'. Ensure these are re-exported in the package's entry point or update the import path to the specific module (ccusage/data-loaderorccusage/calculate-cost).docs/typedoc.config.mjs (1)
1-47: Well-structured TypeDoc configuration.The dynamic entry point discovery with fast-glob and clear exclusion patterns make this configuration maintainable. The explicit inclusion of
_consts.tsafter excluding other internal files is well-documented and intentional.docs/package.json (1)
8-8: Verify the rolldown-vite override and validation flag.The
ROLLDOWN_OPTIONS_VALIDATION=looseflag andviteoverride torolldown-vitesuggest there might be compatibility issues. Please verify these are necessary and document why they're required.Also applies to: 25-27
docs/update-api-index.mjs (2)
36-37: Regex implementation addresses previous concerns.The current implementation already uses regular expressions for robust pattern matching, addressing the previous comment about fixed-string matching. The regex properly handles whitespace variations and is more maintainable than fixed strings.
78-83: Good error handling strategy.The main function appropriately handles errors differently for the two operations - exiting on API index failure (critical) while continuing on constants page failure (optional). This ensures the build process fails only when necessary.
docs/guide/configuration.md (1)
1-4: LGTMThis configuration guide is clear, comprehensive, and well organized.
docs/guide/daily-reports.md (1)
1-4: LGTMThe overview, command samples, and examples are well-structured and informative.
docs/guide/installation.md (1)
1-258: LGTMThis installation guide is thorough, uses
code-groupeffectively, and covers all major scenarios and troubleshooting steps.docs/guide/mcp-server.md (1)
1-4: LGTMThe MCP server guide is detailed, clear, and integrates well with the rest of the documentation suite.
docs/.vitepress/config.ts (1)
10-12: Verifybaseconfiguration for deployment
Ensure thatbase: '/'aligns with your Cloudflare Pages (or other) deployment path. If the site is served under a subpath (e.g.,/ccusage/), updatebaseaccordingly to avoid broken URLs.
The root typedoc.json is not being used since docs build uses docs/typedoc.config.mjs for VitePress markdown generation instead
Update daily reports JSON example to match documented structure Includes proper wrapper with type, data, summary fields and costUSD field name
Summary
This PR migrates the project documentation from simple markdown files to a comprehensive VitePress-based documentation system with the following key improvements:
• Interactive Documentation Site: Replace static markdown with searchable, navigable documentation
• API Documentation: Automated TypeDoc integration for complete API reference
• User Guides: Comprehensive guides for all features (daily reports, live monitoring, MCP server, etc.)
• Modern Deployment: Cloudflare Pages integration with automated builds
• Better Organization: Structured navigation and improved content organization
Changes Made
Documentation Structure
Project Configuration
Code Enhancements
Documentation Features
User Guides
API Documentation
Deployment
Testing
The documentation system has been tested with:
Migration Benefits
This migration sets up a solid foundation for project documentation that will scale with the project s growth and provide users with an excellent documentation experience.
Summary by CodeRabbit
New Features
Documentation
Chores
Style