# 使用 Homebrew 安装 ccusage

查看 ccusage 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:ccusage
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install ccusage
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:ccusage
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/ccusage>
- **版本:** 20.0.14
- **来源摘要:** CLI tool for analyzing Claude Code usage from local JSONL files
- **主页:** <https://github.com/ccusage/ccusage>
- **仓库:** <https://github.com/ccusage/ccusage>
- **上游文档:** <https://ccusage.com/guide>
- **许可证:** MIT
- **源码归档:** <https://github.com/ccusage/ccusage/archive/refs/tags/v20.0.14.tar.gz>
- **最后更新:** 2026-07-04T16:53:42+09:00
- **已生成:** 2026-07-08T18:08:21+00:00

## 可执行文件

- ccusage (cli)
- generate-config-schema (cli)
- ccusage (别名)
- generate-config-schema (别名)

## 构建依赖

- rust

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 20.0.14
- 管理器更新时间: 2026-07-04
- 本地数据: OK
- 上游仓库: https://github.com/ccusage/ccusage
- 检测到的最新版本: v20.0.14 (当前)
## 项目历史与用法

ccusage is a local CLI for analyzing token usage and estimated costs from coding-agent CLIs. It began as Claude Code usage analysis and expanded into unified reports for Claude Code, Codex, OpenCode, Amp, Droid, Codebuff, Hermes Agent, pi-agent, Goose, OpenClaw, Kilo, Kimi, Qwen, GitHub Copilot CLI, and Gemini CLI.

### 项目历史

The official guide says the original cc stood for Claude Code usage and now also fits Codex CLI usage. GitHub metadata shows the repository was created in May 2025, and the package metadata describes ccusage as analyzing coding-agent CLI token usage and costs from local data.

The project has moved quickly: official releases show the v20 series in 2026, and the docs emphasize all-local, read-only analysis with JSON and table output.

### 采用历史

The official README highlights direct execution through npx, bunx, pnpm dlx, and Nix, plus a Homebrew package in the input facts. Its adoption is tied to the rise of agentic coding CLIs that store token and model usage locally.

### 使用方式

Users run commands such as ccusage daily, weekly, monthly, session, or source-focused commands like ccusage codex daily. Configuration can come from CLI flags, a custom config, environment variables, .ccusage/ccusage.json, ~/.config/claude/ccusage.json, or ~/.claude/ccusage.json.

### 为什么软件包爱好者会关心

ccusage is package-nerd significant as a fast-moving observability tool for local AI coding workflows. It turns scattered JSONL and state files from multiple CLIs into a packageable, scriptable cost and token accounting surface.

### 时间线

- 2025: Official GitHub repository created.
- 2026: v20 series releases published.
- 2026: Official docs describe unified reports across many coding-agent CLI data sources.

### Related projects

- Claude Code and Codex are core data sources described in the official guide.
- The README also lists OpenCode, Amp, Droid, Codebuff, Hermes Agent, pi-agent, Goose, OpenClaw, Kilo, Kimi, Qwen, GitHub Copilot CLI, and Gemini CLI as supported sources.

### 来源

- <https://api.github.com/repos/ryoppippi/ccusage>
- <https://github.com/ryoppippi/ccusage>
- <https://ccusage.com/guide>
- <https://formulae.brew.sh/api/formula/ccusage.json>


## 安全说明

没有找到 ccusage 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: .ccusage/ccusage.json, ~/.claude/ccusage.json, ~/.config/claude/ccusage.json
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** ccusage
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable


## 相关链接

- [Source-control packages](https://www.automicvault.com/zh-hans/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/zh-hans/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/zh-hans/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [rust](https://www.automicvault.com/zh-hans/pkg/brew/rust/) - Build dependency declared by Homebrew.
- [analog](https://www.automicvault.com/zh-hans/pkg/brew/analog/) - Shares av.db curated category or tags: analytics, cli, developer-tools.
- [angle-grinder](https://www.automicvault.com/zh-hans/pkg/brew/angle-grinder/) - Shares av.db curated category or tags: analytics, cli, developer-tools.
- [bpython](https://www.automicvault.com/zh-hans/pkg/brew/bpython/) - Shares av.db curated category or tags: cli, developer-tool, developer-tools.
- [c](https://www.automicvault.com/zh-hans/pkg/brew/c/) - Shares av.db curated category or tags: cli, developer-tool, developer-tools.
- [ccheck](https://www.automicvault.com/zh-hans/pkg/brew/ccheck/) - Shares av.db curated category or tags: cli, developer-tool, developer-tools.
- [cdecl](https://www.automicvault.com/zh-hans/pkg/brew/cdecl/) - Shares av.db curated category or tags: cli, developer-tool, developer-tools.
- [claude-cmd](https://www.automicvault.com/zh-hans/pkg/brew/claude-cmd/) - Shares av.db curated category or tags: claude-code, cli, developer-tools.
- [claude-code-router](https://www.automicvault.com/zh-hans/pkg/brew/claude-code-router/) - Shares av.db curated category or tags: claude-code, cli, developer-tools.
- [ccusage](https://www.automicvault.com/zh-hans/pkg/npm/ccusage/) - Same normalized package name appears in another local ecosystem. Shared terms: ccusage, cli, developer, developer-tools, local.
- [ccusage](https://www.automicvault.com/zh-hans/pkg/npm/ccusage/) - Same normalized package name in another local ecosystem.

## Combined YAML source

View the package source record on GitHub. [combined/ccusage.yml](https://github.com/automic-vault/db/blob/main/combined/ccusage.yml)


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- cross-ecosystem install command graph
