Open-source & free forever 开源 · 永久免费

Tokei 時計

God's-eye view of your AI workflow. 了然于心,掌控全局。像上帝一样拥有全局视角

A macOS menu bar app that tracks usage, cost, and performance across every AI coding tool you use — from one unified dashboard. 一款 macOS 菜单栏应用,在统一面板中追踪你使用的每一个 AI 编程工具的用量、成本与效能。

Tokei — Today今日
Today今日
Week本周
Month本月
Year本年
Total Tokens总 Token
2.4M
across 6 tools覆盖 6 个工具
Estimated Cost预估成本
$18.72
today's spend今日花费
Cache Hit缓存命中
78%
Token UsageToken 用量
Active Model当前模型
opus-4
Claude Code
Features核心功能

Everything you need,
nothing you don't
恰到好处,一目了然

Built for developers who use multiple AI coding tools daily and want clarity on usage, cost, and efficiency. 专为日常使用多种 AI 编程工具的开发者打造,让用量、成本与效率一览无余。

Token MonitoringToken 实时监控

Input, output, cache read/write — per model, per tool, per day.输入/输出/缓存读写——按模型、工具、日期逐一追踪。

Token MonitoringToken 实时监控

Track input, output, cache read, cache write tokens across 8 tools. Per-model breakdown with quota usage percentage and reset countdown.追踪 8 个工具的输入/输出/缓存读/缓存写 Token。逐模型拆分,配额用量百分比 + 重置倒计时。

Cache Hit Analytics缓存命中分析

Ring gauge for prompt cache efficiency — optimize your workflow.环形仪表展示提示词缓存效率,优化你的工作流。

Cache Hit Analytics缓存命中分析

Beautiful ring gauges show cache hit rate in real time. Compare efficiency across time ranges and identify workflows that maximize reuse.精美环形仪表实时展示缓存命中率。跨时间维度对比效率,找到最大化复用的工作流。

Cost Tracking成本精算

Per-model pricing with customizable price tables and overrides.逐模型定价,支持自定义价格表和覆盖配置。

Cost Tracking成本精算

External pricing.json with override support. See cost per tool, per model, per day. One command --update-prices to sync latest API rates.外置 pricing.json 支持覆盖。按工具/模型/日期拆分成本。一条命令 --update-prices 同步最新 API 费率。

Global Dashboard全局数据面板

Daily cost trends, tool distribution charts, session timelines.每日成本趋势、工具分布图表、会话时间线。

Global Dashboard全局数据面板

A unified dashboard with daily cost bar charts, tool usage distribution, and trend lines. See the big picture beyond individual tool cards.统一面板呈现每日成本柱状图、工具用量分布和趋势线。超越单个工具卡片,纵览全局。

Wrapped Review年度 Wrapped

Your AI usage annual report — Spotify Wrapped style.你的年度 AI 使用报告——Spotify Wrapped 风格。

Wrapped Review年度 Wrapped

Total tokens, top tools, busiest days, most-used models, lifetime cost, total sessions — beautifully visualized in your annual report.总 Token 量、Top 工具、最忙碌日、最常用模型、累计成本、总会话数——精美呈现你的年度报告。

Project Trail项目足迹

Browse, search, pin, and quick-open all your AI projects.浏览、搜索、置顶,一键打开所有 AI 项目。

Project Trail项目足迹

All projects grouped by recency. Pin favorites, detect local dev ports, one-click open in Terminal, Ghostty, iTerm, VS Code, or Finder.按活跃度分组显示项目。支持置顶、本地端口检测,一键在终端/Ghostty/iTerm/VS Code/Finder 中打开。

Keep-awake防休眠模式

Prevent Mac from sleeping during long AI sessions.AI 长会话期间防止 Mac 休眠。

Keep-awake防休眠模式

One-click caffeinate with customizable duration. Smart battery guard auto-disables at low power. Never lose an AI session to sleep again.一键开启防休眠,可自定义时长。智能电量守卫在低电量时自动关闭。再不会因为休眠丢失 AI 会话。

Break Reminders久坐提醒

Customizable alerts to stand up and stretch.可自定义间隔的站立和拉伸提醒。

Break Reminders久坐提醒

Set custom intervals for sedentary reminders. Get a gentle macOS notification when it's time to stand, stretch, and rest your eyes.自定义久坐提醒间隔。到时间后收到温和的 macOS 通知,提醒你站起来活动、放松眼睛。

Multi-device Sync多设备同步

Aggregate stats from multiple Macs seamlessly.无缝聚合多台 Mac 的使用数据。

Multi-device Sync多设备同步

Sync usage data across machines via any shared folder (iCloud, Dropbox, NAS). See combined stats no matter which Mac you're working on.通过任意共享文件夹(iCloud/Dropbox/NAS)同步数据。无论在哪台 Mac 工作都能看到汇总统计。

Supported Tools支持的工具

8 AI agents.
One dashboard.
8 款 AI agent
一个面板

Tokei reads local session logs from each tool. No API keys, no network access. Tokei 读取每个工具的本地会话日志。无需 API 密钥,无需网络连接。

CC

Claude Code

Tokens, cache, cost, models, quotaToken · 缓存 · 成本 · 模型 · 配额

Cx

Codex CLI

Token usage, cost, plan limitsToken · 成本 · 套餐限额

Ge

Gemini CLI

Tokens, thoughts, costToken · 思考 · 成本

Gk

Grok

Session tracking会话追踪

Qo

Qoder

Calls, duration, context调用 · 时长 · 上下文

He

Hermes

Model stats, cost模型统计 · 成本

OC

OpenCode

Model stats, cost模型统计 · 成本

OW

OpenClaw

Task tracking任务追踪

How It Works工作原理

Up and running in 60 seconds 60 秒即刻启动

No configuration, no API keys, no cloud accounts. Just install and go. 无需配置,无需 API 密钥,无需云账号。安装即用。

1

Install Tokei安装 Tokei

Download the DMG, drag to Applications. One file, nothing else.下载 DMG,拖入应用程序。一个文件,仅此而已。

2

It reads local logs读取本地日志

Tokei scans session logs that your AI tools already write to disk. Zero extra setup.Tokei 扫描 AI 工具已写入磁盘的会话日志。零额外配置。

3

See everything尽在掌握

Tokens, cost, cache hits, model usage — all in your menu bar, refreshed every 30 seconds.Token、成本、缓存命中、模型用量——全在菜单栏,每 30 秒刷新。

Zero telemetry. Zero network.
Your data stays on your Mac.
零遥测 · 零网络
数据只留在你的 Mac 上

Tokei reads only local session logs. It never connects to the internet, never sends data anywhere, and never will. Tokei 仅读取本地会话日志。从不联网,从不上传数据,永远不会。

No analytics无分析追踪 No tracking无行为监控 No cloud required无需云端 100% offline100% 离线
VS

Tokei vs CodexBar Tokei 对比 CodexBar

Two menu bar apps, different philosophies. CodexBar focuses on provider quota polling; Tokei focuses on deep usage analytics. 两款菜单栏应用,不同设计哲学。CodexBar 侧重提供商配额轮询,Tokei 侧重深度用量分析。

Feature功能 Tokei CodexBar
Supported tools支持工具 8 40+
Token-level analyticsToken 级用量分析
Cost estimation (317 models)成本估算(317 模型) partial部分
Dashboard (chart + heatmap)数据面板(图表 + 热力图)
Time ranges多时间维度 6 ranges6 个维度
Project tracking项目级追踪
Multi-device sync多设备同步
Annual Wrapped年度回顾
Keep awake防休眠
Sit reminder久坐提醒
Network required需要联网 No Yes (API/cookies)是(API/Cookie)
Login required需要登录 No Yes (per provider)是(按提供商)
Data source数据来源 Local logs本地日志 Remote APIs远程 API

CodexBar excels at provider coverage and quota visibility. Tokei goes deeper — token-level analytics, cost trends, project breakdowns, and cross-device sync — all without needing a single login. CodexBar 在提供商覆盖和配额可见性上表现出色。Tokei 更深入——Token 级分析、成本趋势、项目维度拆分、跨设备同步——全部无需登录。

Help帮助

Get started in minutes 几分钟即可上手

Installation安装说明

  1. Download the DMG and open it 下载 DMG 文件并打开
  2. Drag Tokei.app into the Applications folder Tokei.app 拖入 Applications 文件夹
  3. If macOS blocks the first launch, open Terminal and run: sudo xattr -rd com.apple.quarantine /Applications/Tokei.app 如果首次打开被系统拦截,打开终端运行:sudo xattr -rd com.apple.quarantine /Applications/Tokei.app
  4. Launch Tokei — it appears in the menu bar and starts tracking automatically 启动 Tokei —— 它会出现在菜单栏,自动开始追踪

That's it. No account, no API key, no configuration needed. 就这么简单。无需账号、无需 API 密钥、无需任何配置。

Multi-device Sync多设备同步

  1. Create a private Git repository on GitHub (or any Git host) 在 GitHub(或其他 Git 平台)创建一个私有仓库
  2. Clone the repo to your Mac, then open Tokei → Settings → Multi-device Sync → Enable → select the repo folder 将仓库克隆到 Mac,打开 Tokei → 设置 → 多设备同步 → 开启 → 选择仓库目录
  3. On remote Linux servers: clone the same repo, install the collection script, set up a cron job for auto-sync every 5 minutes 远程 Linux 服务器:克隆同一仓库,安装采集脚本,配置 cron 每 5 分钟自动同步
  4. Each device collects data independently — Tokei merges them automatically 每台设备独立采集数据 —— Tokei 自动聚合展示

Or let AI set it all up — copy this prompt into Claude Code: 或者让 AI 帮你完成全部配置 —— 复制以下提示词到 Claude Code

Read https://raw.githubusercontent.com/cclank/tokei/main/skills/tokei-setup.md and help me set up Tokei multi-device sync读取 https://raw.githubusercontent.com/cclank/tokei/main/skills/tokei-setup.md 帮我配置 Tokei 多设备同步 Copied已复制

Start tracking your
AI workflow today
今天就开始追踪你的
AI 工作流

Free, open-source, and built for developers who care about their tools. 免费、开源,为在意自己工具的开发者而建。

macOS 13+ Python 3.10+ Apple Silicon / Intel