ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 4/5

claude-usage-cli

Query Claude API usage and cost reports from the command line. Secure macOS Keychain storage for Admin API key. Table/JSON output.

Why use this skill?

Track your Anthropic Admin API token usage and spending with the claude-usage-cli. Secure, macOS Keychain-integrated reporting for developers.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/cyberash-dev/claude-usage-cli
Or

What This Skill Does

The claude-usage-cli provides a comprehensive command-line interface for monitoring and managing your Anthropic Admin API utilization. It allows developers and administrators to track token consumption and monetary spend directly from their macOS terminal. By integrating with the system-level macOS Keychain, the tool ensures that sensitive Admin API keys (sk-ant-admin...) are stored securely rather than in plaintext configuration files. Users can output data in readable tables or parseable JSON, making it ideal for integration into custom dashboards or reporting scripts. Please note: This tool is currently deprecated in favor of the more robust claude-cost-cli.

Installation

Installation requires Node.js version 18 or higher and an active macOS environment. You can install the tool globally via npm using the command npm install -g claude-usage-cli. For users who prefer to review the source code before execution, you may clone the repository directly from the cyberash-dev GitHub profile, run npm install, execute npm run build, and use npm link to register the binary locally. After installation, verify the setup by typing claude-usage --help in your terminal.

Use Cases

This skill is primarily used by technical teams to monitor API costs across various projects. It is useful for:

  • Cost Attribution: Tracking token usage per workspace or specific API key to chargeback costs to individual projects.
  • Budget Forecasting: Identifying usage spikes over 7-day or 30-day windows to prevent unexpected overages.
  • Automated Reporting: Piping JSON output into cron jobs or alerting scripts that notify stakeholders when specific cost thresholds are approached.
  • Granular Analysis: Breaking down usage by model or specific time buckets (hourly/daily) to optimize LLM performance and efficiency.

Example Prompts

  1. "OpenClaw, pull a cost report for the last 30 days and group it by workspace ID to help me figure out which team is using the most tokens."
  2. "Show me the total spend for the current billing cycle and generate a JSON report that I can export to my spreadsheet application."
  3. "List out the daily usage breakdown for claude-sonnet-4 over the last week so I can see if our recent deployment caused a jump in input tokens."

Tips & Limitations

  • Security: Always use the config set-key command to ensure your credentials are encrypted in your Keychain; avoid hardcoding keys in environment variables.
  • Compatibility: This tool is strictly for macOS; it will not function on Linux or Windows environments.
  • Deprecation: Because this project is deprecated, ensure you review the claude-cost-cli migration guide for long-term support and potential new features.

Metadata

Stars3409
Views2
Updated2026-03-25
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-cyberash-dev-claude-usage-cli": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#anthropic#api-monitoring#terminal#token-tracker#cost-management
Safety Score: 4/5

Flags: external-api, file-read