Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,23 @@ providers' own usage endpoints.
calendar using logs from every supported provider, regardless of which
providers are selected for the usage pills. Click a provider in the calendar
legend to filter its history; click it again to show all providers.
- **A usage card worth sharing.** Open **Overview → Share usage** or
**Settings → General → Usage card**. Put your estimated API value
in USD front and center, with a flowing cumulative chart and provider
amounts, or spotlight your token count. Card colors are earned: White below
$1K / 100M tokens, Black from $1K / 100M, and Blue from $10K / 1B, using the
selected metric. Pick **Last 7 days**, **This month**, **Last 3 months**, **This year**,
or **All time**. Last 7 days is the default and includes today plus the previous
six days. Last 3 months is a rolling calendar
window ending today. Month and year run through today; All time reads the oldest
available local usage records on demand. Choose a feed / square / story format and optional
signature, then share the image and caption
through the macOS share menu. Use **Actual size** for a closer look and the
**…** menu to save a 1080-pixel-wide PNG or copy the image and caption.
After an app update, the card opens once when your weekly usage is ready.
Figures follow your local calendar and include cache usage;
API value is an estimate, not your subscription bill.
Missing prices are marked as partial. Everything is rendered on your Mac.
- **Usage history that stays yours.** CodexIsland saves captured token counts
in its own local database, including older records still available when it
scans. Provider log cleanup no longer erases captured history. Repeated
Expand Down Expand Up @@ -310,6 +327,12 @@ Native app behavior:
in `CLAUDE_CONFIG_DIR`), Codex session logs from `~/.codex/sessions/`, and
OpenCode data from `~/.local/share/opencode/`. Aggregation happens entirely
on-device — no log content is uploaded or shared anywhere.
- Default Claude history discovery also includes locally mirrored Cowork
session logs in `~/Library/Application Support/Claude/local-agent-mode-sessions/`.
Captured usage is retained in
`~/Library/Application Support/dev.codexisland.CodexIsland/usage-history.sqlite3`.
The database contains token counts, models, timestamps, and opaque record
identifiers; it does not contain prompts, responses, or credentials.

The visitor badge at the top of this README is an external `hits.sh` image that
counts badge requests. It is not bundled with or contacted by the native app.
Expand Down
2 changes: 2 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ CodexIsland 是一个原生 macOS 悬浮层,把 MacBook 刘海变成类似 Dyn
- **悬停预览。** 鼠标移到刘海附近时,胶囊会展开到足够显示每个可见服务的 5 小时百分比和重置提示。
- **点击展开。** 点击岛可打开完整 Usage / Cost / Overview 面板,包含服务列、图表控制和分页。
- **Usage 与 Cost 横向切换。** Cost 页面会从本地 Claude Code 和 Codex 日志估算今天与本月至今的美元成本、token 吞吐量和趋势。
- **用量分享卡片。** 从 **Overview → 分享用量** 或 **设置 → 通用 → 用量卡片** 打开。以美元 API 换算价值为主角,展示流动的累计曲线与各提供商金额,也可切换为 token 数。配色由所选指标自动决定:低于 $1K / 1 亿 token 为白卡,达到 $1K / 1 亿为黑卡,达到 $10K / 10 亿为蓝卡。时间范围可选最近 7 天、本月、最近 3 个月、今年或全部时间,默认最近 7 天,包含今天及之前六天。最近 3 个月为截至今天的滚动日历范围。本月和今年统计至今天,全部时间按需读取最早保存的本地用量记录。选择动态 / 方形 / 故事比例和可选署名,通过 macOS 分享菜单发送图片与文案。点击“实际大小”查看细节,通过“…”菜单保存 1080 像素宽的 PNG 或复制图片与文案。应用更新后,有本周用量时会自动打开一次。按本地日历统计并包含缓存;金额为估算值,并非订阅账单,缺少价格时会标注。全部在 Mac 上生成。
- **持久保存用量历史。** CodexIsland 将采集到的 token 数量保存在自己的本地数据库中,即使提供商清理日志也会保留。重复扫描不会重复计数。仅保存用量、模型、时间及匿名记录标识,不保存对话或凭据。从 **设置 → 通用 → 恢复 Claude 用量…** 打开恢复窗口,预览留存日志、备份和旧每日快照中的计数,确认后再导入。也可使用 [终端恢复脚本](docs/USAGE-HISTORY.md#recover-your-claude-usage)。详见[用量历史存储说明](docs/USAGE-HISTORY.md)。
- **可配置 token 统计口径。** 可以选择统计所有 token(包含缓存,接近 ccusage 口径),或只统计输入 + 输出(接近 Anthropic claude.ai 统计面板)。
- **不遮挡岛外点击。** 窗口会忽略可见轮廓外的鼠标事件,菜单栏和后面的 app 仍能正常操作。
- **多种图表样式。** 支持 Ring、Bar、Stepped、Numeric、Sparkline;可在设置中选择默认样式,也可在展开面板里 Cmd 点击切换。
Expand Down
87 changes: 87 additions & 0 deletions Resources/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,93 @@
"Sign in with Claude" = "Sign in with Claude";
"Open Claude Code and run /login." = "Open Claude Code and run /login.";

"A fresh page for your week." = "A fresh page for your week.";
"Caption copied. Add it to your post." = "Caption copied. Add it to your post.";
"Copy caption" = "Copy caption";
"Copy image" = "Copy image";
"Could not copy the caption. Try again." = "Could not copy the caption. Try again.";
"Could not copy the image. Try saving a PNG instead." = "Could not copy the image. Try saving a PNG instead.";
"Could not create the image. Try again." = "Could not create the image. Try again.";
"Could not export card" = "Could not export card";
"Create card…" = "Create card…";
"Create your weekly usage card" = "Create your weekly usage card";
"Created on your Mac." = "Created on your Mac.";
"Feed · 4:5" = "Feed · 4:5";
"Format" = "Format";
"Gathering your week…" = "Gathering your week…";
"Image copied. Paste it into your post." = "Image copied. Paste it into your post.";
"Include" = "Include";
"Includes cache tokens. Only totals and your signature appear on the card." = "Includes cache tokens. Only totals and your signature appear on the card.";
"Includes today and the previous six days." = "Includes today and the previous six days.";
"Last 3 months" = "Last 3 months";
"Last 7 days" = "Last 7 days";
"Make it yours. Share it anywhere." = "Make it yours. Share it anywhere.";
"Name or @handle (optional)" = "Name or @handle (optional)";
"Name or handle on card" = "Name or handle on card";
"No recorded tokens in this period. Try another week or include more providers." = "No recorded tokens in this period. Try another week or include more providers.";
"OK" = "OK";
"PNG saved. Your week is ready to share." = "PNG saved. Your week is ready to share.";
"Reading usage records on this Mac." = "Reading usage records on this Mac.";
"Ready for your feed" = "Ready for your feed";
"Refresh records" = "Refresh records";
"Save PNG…" = "Save PNG…";
"Save weekly card" = "Save weekly card";
"Share week" = "Share week";
"Signature" = "Signature";
"Some local records could not be read. The card is marked as partial." = "Some local records could not be read. The card is marked as partial.";
"Square · 1:1" = "Square · 1:1";
"Story · 9:16" = "Story · 9:16";
"Week" = "Week";
"Weekly usage card" = "Weekly usage card";
"Your week has a shape." = "Your week has a shape.";
"Your week with AI, ready to share." = "Your week with AI, ready to share.";

"Your week. Your flex." = "Your week. Your flex.";
"Share…" = "Share…";
"Earned color" = "Earned color";
"White" = "White";
"Black" = "Black";
"Blue" = "Blue";
"Current tier" = "Current tier";
"Color is earned from your weekly API value." = "Color is earned from your weekly API value.";
"Color is earned from your weekly tokens, including cache." = "Color is earned from your weekly tokens, including cache.";
"Put your AI tab on display." = "Put your AI tab on display.";
"Spotlight" = "Spotlight";
"API value" = "API value";
"Your usage at API rates in USD. An estimate, not your subscription bill." = "Your usage at API rates in USD. An estimate, not your subscription bill.";
"Every token, including cache reads and writes." = "Every token, including cache reads and writes.";
"Your tokens need a price." = "Your tokens need a price.";
"Refresh records to load API prices, or switch the spotlight to tokens." = "Refresh records to load API prices, or switch the spotlight to tokens.";
"Some tokens have no known price. The + marks a partial value." = "Some tokens have no known price. The + marks a partial value.";

"Weekly card" = "Weekly card";
"About this card" = "About this card";
"API value estimates your usage at API rates in USD, not your subscription bill. Tokens include cache reads and writes." = "API value estimates your usage at API rates in USD, not your subscription bill. Tokens include cache reads and writes.";
"The card includes daily usage, provider totals, active days, and your signature. It does not include prompts or conversations." = "The card includes daily usage, provider totals, active days, and your signature. It does not include prompts or conversations.";
"Fit" = "Fit";
"Actual size" = "Actual size";
"View color tiers" = "View color tiers";
"More export options" = "More export options";
"Some local records could not be read. Totals may be incomplete." = "Some local records could not be read. Totals may be incomplete.";
"Usage card" = "Usage card";
"Period" = "Period";
"This month" = "This month";
"This year" = "This year";
"All time" = "All time";
"Last 7 days includes today and the previous six days. Month and year also run through today. All time includes all saved usage records on this Mac." = "Last 7 days includes today and the previous six days. Month and year also run through today. All time includes all saved usage records on this Mac.";
"Gathering your usage…" = "Gathering your usage…";
"A fresh page for your usage." = "A fresh page for your usage.";
"No recorded tokens in this period. Try another period or include more providers." = "No recorded tokens in this period. Try another period or include more providers.";
"PNG saved. Your card is ready to share." = "PNG saved. Your card is ready to share.";
"Share usage" = "Share usage";
"Create your usage card" = "Create your usage card";
"Save usage card" = "Save usage card";
"Your time with AI, ready to share." = "Your time with AI, ready to share.";

"Captured token counts are saved on this Mac even if provider logs are removed. Records deleted before capture may still be missing." = "Captured token counts are saved on this Mac even if provider logs are removed. Records deleted before capture may still be missing.";

"Includes recovered daily totals. Their original dates are preserved; historical records may be incomplete." = "Includes recovered daily totals. Their original dates are preserved; historical records may be incomplete.";

"Usage history could not be saved. Check available disk space and try refreshing." = "Usage history could not be saved. Check available disk space and try refreshing.";

"Recover Claude usage" = "Recover Claude usage";
Expand Down
87 changes: 87 additions & 0 deletions Resources/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,93 @@
"Sign in with Claude" = "登录 Claude";
"Open Claude Code and run /login." = "打开 Claude Code 并运行 /login。";

"A fresh page for your week." = "新一周,从这里开始。";
"Caption copied. Add it to your post." = "文案已复制,可添加到帖子中。";
"Copy caption" = "复制文案";
"Copy image" = "复制图片";
"Could not copy the caption. Try again." = "无法复制文案,请重试。";
"Could not copy the image. Try saving a PNG instead." = "无法复制图片,请尝试保存为 PNG。";
"Could not create the image. Try again." = "无法生成图片,请重试。";
"Could not export card" = "无法导出卡片";
"Create card…" = "制作卡片…";
"Create your weekly usage card" = "制作你的每周用量卡片";
"Created on your Mac." = "在你的 Mac 上生成。";
"Feed · 4:5" = "动态 · 4:5";
"Format" = "格式";
"Gathering your week…" = "正在整理本周记录…";
"Image copied. Paste it into your post." = "图片已复制,可粘贴到帖子中。";
"Include" = "包含";
"Includes cache tokens. Only totals and your signature appear on the card." = "包含缓存 token。卡片仅展示汇总数据和你的署名。";
"Includes today and the previous six days." = "包含今天及之前六天。";
"Last 3 months" = "最近 3 个月";
"Last 7 days" = "最近 7 天";
"Make it yours. Share it anywhere." = "定制你的风格,分享你的每周记录。";
"Name or @handle (optional)" = "姓名或 @用户名(可选)";
"Name or handle on card" = "卡片上的姓名或用户名";
"No recorded tokens in this period. Try another week or include more providers." = "此时段暂无 token 记录。试试其他时段,或选择更多提供商。";
"OK" = "好";
"PNG saved. Your week is ready to share." = "PNG 已保存,可以分享你的每周记录了。";
"Reading usage records on this Mac." = "正在读取这台 Mac 上的用量记录。";
"Ready for your feed" = "随时分享";
"Refresh records" = "刷新记录";
"Save PNG…" = "保存 PNG…";
"Save weekly card" = "保存每周卡片";
"Share week" = "分享本周";
"Signature" = "署名";
"Some local records could not be read. The card is marked as partial." = "部分本地记录无法读取,卡片会标注数据不完整。";
"Square · 1:1" = "方形 · 1:1";
"Story · 9:16" = "故事 · 9:16";
"Week" = "时段";
"Weekly usage card" = "每周用量卡片";
"Your week has a shape." = "看见你这一周的形状。";
"Your week with AI, ready to share." = "与 AI 度过的一周,值得分享。";

"Your week. Your flex." = "这一周,值得炫耀。";
"Share…" = "分享…";
"Earned color" = "配色等级";
"White" = "白色";
"Black" = "黑色";
"Blue" = "蓝色";
"Current tier" = "当前等级";
"Color is earned from your weekly API value." = "配色由本周 API 换算价值决定。";
"Color is earned from your weekly tokens, including cache." = "配色由本周 token 用量决定,包含缓存。";
"Put your AI tab on display." = "晒出你的 AI 用量账单。";
"Spotlight" = "主角";
"API value" = "API 换算价值";
"Your usage at API rates in USD. An estimate, not your subscription bill." = "按 API 费率换算为美元的使用价值,仅为估算,并非订阅账单。";
"Every token, including cache reads and writes." = "统计所有 token,包括缓存读取和写入。";
"Your tokens need a price." = "这些 token 还没有价格。";
"Refresh records to load API prices, or switch the spotlight to tokens." = "刷新记录以载入 API 价格,或选择展示 token。";
"Some tokens have no known price. The + marks a partial value." = "部分 token 暂无已知价格,+ 表示价值估算不完整。";

"Weekly card" = "每周卡片";
"About this card" = "关于此卡片";
"API value estimates your usage at API rates in USD, not your subscription bill. Tokens include cache reads and writes." = "API 价值按 API 费率以美元估算使用量,并非订阅账单。Token 包含缓存读取与写入。";
"The card includes daily usage, provider totals, active days, and your signature. It does not include prompts or conversations." = "卡片包含每日使用量、各服务商总量、活跃天数和签名,不包含提示词或对话内容。";
"Fit" = "适应窗口";
"Actual size" = "实际大小";
"View color tiers" = "查看颜色等级";
"More export options" = "更多导出选项";
"Some local records could not be read. Totals may be incomplete." = "部分本地记录无法读取,总量可能不完整。";
"Usage card" = "用量卡片";
"Period" = "时间范围";
"This month" = "本月";
"This year" = "今年";
"All time" = "全部时间";
"Last 7 days includes today and the previous six days. Month and year also run through today. All time includes all saved usage records on this Mac." = "最近 7 天包含今天及之前六天。本月和今年也统计至今天。全部时间包含此 Mac 上保存的所有用量记录。";
"Gathering your usage…" = "正在汇总用量…";
"A fresh page for your usage." = "开始记录你的使用历程。";
"No recorded tokens in this period. Try another period or include more providers." = "此时间范围内没有 token 记录。请尝试其他时间范围或选择更多服务商。";
"PNG saved. Your card is ready to share." = "PNG 已保存,卡片可以分享了。";
"Share usage" = "分享用量";
"Create your usage card" = "创建用量卡片";
"Save usage card" = "保存用量卡片";
"Your time with AI, ready to share." = "把你的 AI 使用历程分享出去。";

"Captured token counts are saved on this Mac even if provider logs are removed. Records deleted before capture may still be missing." = "已采集的令牌数量会保存在这台 Mac 上,即使提供商删除日志也会保留。采集之前已删除的记录仍可能缺失。";

"Includes recovered daily totals. Their original dates are preserved; historical records may be incomplete." = "包含恢复的每日总量,并保留原始日期;历史记录可能仍不完整。";

"Usage history could not be saved. Check available disk space and try refreshing." = "无法保存用量历史。请检查可用磁盘空间,然后尝试刷新。";

"Recover Claude usage" = "恢复 Claude 用量";
Expand Down
Loading
Loading