All skills
Skillintermediate

Installation

ccusage can be installed and used in several ways depending on your preferences and use case.

Claude Code Knowledge Pack7/10/2026

Overview

Installation

ccusage can be installed and used in several ways depending on your preferences and use case.

Why No Installation Needed?

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:

  • ✅ Near-instant startup times
  • ✅ Minimal download overhead
  • ✅ Always use the latest version
  • ✅ No global pollution of your system

Quick Start (Recommended)

The fastest way to use ccusage is to run it directly:

::: code-group

bunx ccusage
npx ccusage@latest
pnpm dlx ccusage
deno run -E -R=$HOME/.claude/projects/ -S=homedir -N='raw.githubusercontent.com:443' npm:ccusage@latest

:::

::: tip Speed Recommendation We strongly recommend using bunx instead of npx due to the massive speed difference. Bunx caches packages more efficiently, resulting in near-instant startup times after the first run. :::

::: 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. :::

Performance Comparison

Here's why runtime choice matters:

RuntimeFirst RunSubsequent RunsNotes
bunxFastInstantBest overall choice
npxSlowModerateWidely available
pnpm dlxFastFastGood alternative
denoModerateFastBest for security

Global Installation (Optional)

While not necessary due to our small bundle size, you can still install ccusage globally if you prefer:

::: code-group

npm install -g ccusage
bun install -g ccusage
yarn global add ccusage
pnpm add -g ccusage

:::

After global installation, run commands directly:

ccusage daily
ccusage monthly --breakdown
ccusage blocks --live

Development Installation

For development or contributing to ccusage:

# Clone the repository
git clone https://github.com/ryoppippi/ccusage.git
cd ccusage

# Install dependencies
bun install

# Run directly from source
bun run start daily
bun run start monthly --json

Development Scripts

# Run tests
bun run test

# Type checking
bun typecheck

# Build distribution
bun run build

# Lint and format
bun run format

Runtime Requirements

Node.js

  • Minimum: Node.js 20.x
  • Recommended: Node.js 20.x or later
  • LTS versions are fully supported

Bun (Alternative)

  • Minimum: Bun 1.2+
  • Recommended: Latest stable release
  • Often faster than Node.js for ccusage

Deno

Deno 2.0+ is fully supported with proper permissions:

deno run \\
  -E \\
  -R=$HOME/.claude/projects/ \\
  -S=homedir \\
  -N='raw.githubusercontent.com:443' \\
  npm:ccusage@latest

Also you can use offline mode to run ccusage without network access:

deno run \\
  -E \\
  -R=$HOME/.claude/projects/ \\
  -S=homedir \\
  npm:ccusage@latest --offline

Verification

After installation, verify ccusage is working:

# Check version
ccusage --version

# Run help command
ccusage --help

# Test with daily report
ccusage daily

Updating

Direct Execution (npx/bunx)

Always gets the latest version automatically.

Global Installation

# Update with npm
npm update -g ccusage

# Update with bun
bun update -g ccusage

Check Current Version

ccusage --version

Uninstalling

Global Installation

::: code-group

npm uninstall -g ccusage
bun remove -g ccusage
yarn global remove ccusage
pnpm remove -g ccusage

:::

Development Installation

# Remove cloned repository
rm -rf ccusage/

Troubleshooting Installation

Permission Errors

If you get permission errors during global installation:

::: code-group

# Use npx instead of global install
npx ccusage@latest

# Or configure npm to use a different directory
npm config set prefix ~/.npm-global

# Use nvm (recommended)
nvm install node
npm install -g ccusage

# Or use fnm
fnm install node
npm install -g ccusage

:::

Network Issues

If installation fails due to network issues:

# Try with different registry
npm install -g ccusage --registry https://registry.npmjs.org

# Or use bunx for offline-capable runs
bunx ccusage

Version Conflicts

If you have multiple versions installed:

# Check which version is being used
which ccusage
ccusage --version

# Uninstall and reinstall
npm uninstall -g ccusage
npm install -g ccusage@latest

Next Steps

After installation, check out: