codex-work-receipt 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.0
4
+
5
+ - 新增无参数命令行范围选择器。
6
+ - 新增今日、最近 7 个自然日、本周和指定会话统计。
7
+ - 多会话汇总改为按事件时间筛选,并按会话计算 Token 区间增量。
8
+ - 小票和二维码显式携带统计范围与自然日边界。
9
+ - Codex Skill 支持“最近七天”和“本周”等自然语言请求。
10
+
3
11
  ## 0.3.0
4
12
 
5
13
  - 新增中文、英文两套完整 HTML 小票文案。
package/README.en.md CHANGED
@@ -10,73 +10,33 @@
10
10
  </p>
11
11
 
12
12
  <p align="center">
13
+ <a href="https://www.npmjs.com/package/codex-work-receipt"><img alt="npm" src="https://img.shields.io/npm/v/codex-work-receipt?color=42CDA7"></a>
13
14
  <img alt="Node.js 20+" src="https://img.shields.io/badge/Node.js-20%2B-339933?logo=node.js&logoColor=white">
14
- <img alt="Local first" src="https://img.shields.io/badge/data-local--first-17231F">
15
- <img alt="Privacy first" src="https://img.shields.io/badge/privacy-no%20prompts%20or%20code-42CDA7">
15
+ <img alt="GPL-3.0" src="https://img.shields.io/badge/license-GPL--3.0-17231F">
16
+ <img alt="Local first" src="https://img.shields.io/badge/data-local--first-42CDA7">
16
17
  </p>
17
18
 
18
19
  <p align="center">
19
20
  <img src="docs/images/readme-hero.jpg" alt="Three Codex Work Receipt themes" width="920">
20
21
  </p>
21
22
 
22
- The tool reads timestamps and numerical metadata from local Codex sessions. Generated receipts do not contain prompts, responses, source code, project paths, or file names.
23
+ Codex Work Receipt summarizes turns, tool calls, Tokens, duration, and models, then turns them into playful AI work points, a job title, and a review. Receipts never include prompts, responses, source code, project paths, or file names.
23
24
 
24
- ## Sponsor
25
-
26
- <p align="center">
27
- <a href="https://modelflare.dev/">
28
- <img src="docs/images/sponsors/modelflare-logo.png" alt="ModelFlare Logo" width="72">
29
- </a>
30
- </p>
31
-
32
- <p align="center">
33
- <a href="https://modelflare.dev/"><strong>ModelFlare</strong></a><br>
34
- <a href="https://modelflare.dev/">modelflare.dev</a><br>
35
- <sub>Stable access to leading AI model APIs at a very low cost, with developer-friendly pricing, transparent billing, and clear usage visibility.</sub>
36
- </p>
37
-
38
- ## Receipt themes
25
+ ## Quickstart
39
26
 
40
- <table>
41
- <tr>
42
- <td align="center"><strong>Classic</strong></td>
43
- <td align="center"><strong>Vintage Diner</strong></td>
44
- <td align="center"><strong>Night Payroll</strong></td>
45
- </tr>
46
- <tr>
47
- <td><img src="docs/images/receipts/receipt-classic.jpg" alt="Classic work receipt" width="320"></td>
48
- <td><img src="docs/images/receipts/receipt-diner.jpg" alt="Vintage diner work receipt" width="320"></td>
49
- <td><img src="docs/images/receipts/receipt-payroll.jpg" alt="Night payroll work receipt" width="320"></td>
50
- </tr>
51
- </table>
52
-
53
- ## Quick start
54
-
55
- Requires Node.js 20+ and local Codex session records.
27
+ Requires Node.js 20+ and local Codex session records. No clone required; choose today, the last 7 days, this week, or a specific session:
56
28
 
57
29
  ```bash
58
- npx codex-work-receipt@latest --latest --lang en
30
+ npx codex-work-receipt@latest --lang en
59
31
  ```
60
32
 
61
- Summarize all Codex activity from today in your local timezone:
33
+ Summarize all Codex activity from today:
62
34
 
63
35
  ```bash
64
36
  npx codex-work-receipt@latest --today --lang en
65
37
  ```
66
38
 
67
- Outputs are written to `./codex-work-receipt-output/` by default.
68
-
69
- ## Desktop-to-mobile flow
70
-
71
- ```text
72
- Local Codex sessions
73
- → run one command
74
- → generate an HTML receipt and data QR code
75
- → scan from the companion mini program
76
- → change themes, save, and share
77
- ```
78
-
79
- The companion mini program supports QR import, local history, themes, and image export. Scan the official mini-program code with WeChat, then scan the adjacent data QR code to import the current receipt.
39
+ HTML and structured data are written to `./codex-work-receipt-output/` by default. Non-interactive options such as `--latest` and `--today` remain available; see the [CLI guide](docs/cli.en.md).
80
40
 
81
41
  ## Ask Codex directly
82
42
 
@@ -86,79 +46,36 @@ Install the AI Work Receipt skill once:
86
46
  npx codex-work-receipt@latest --install-skill --lang en
87
47
  ```
88
48
 
89
- Then ask Codex naturally:
49
+ Then ask Codex:
90
50
 
91
51
  > Create an AI work receipt for my latest Codex session.
92
52
 
93
- > Generate today's AI work receipt with the diner theme.
94
-
95
- Codex will select the correct mode and theme, run the CLI, and open the generated page. You can also invoke `$ai-work-receipt` explicitly.
96
-
97
- The skill is installed at `~/.agents/skills/ai-work-receipt/` and does not modify the current repository. Restart Codex if the current session does not detect it.
53
+ Codex will choose the range and theme, run the CLI, and open the receipt. See the [Codex Skill guide](docs/codex-skill.en.md).
98
54
 
99
- ## Features
55
+ ## Desktop to mobile
100
56
 
101
- - Latest-session and today summaries
102
- - Complete Chinese and English receipt copy
103
- - Three visual receipt themes
104
- - Turns, user messages, tool calls, interruptions, Tokens, duration, and models
105
- - Playful AI work points, job titles, and reviews
106
- - Versioned `cwr1` QR payload for mobile import
107
- - Local JSON snapshots and deduplicated history
108
- - Installable Codex skill for natural-language generation
109
- - No prompt, response, code, path, or file-name export
57
+ The desktop page generates a privacy-safe data QR code. The companion WeChat mini program supports QR import, local history, themes, and image export. See [mobile import](docs/mobile-import.en.md).
110
58
 
111
- ## Common options
59
+ ## Docs
112
60
 
113
- ```bash
114
- npx codex-work-receipt@latest --latest --lang en --theme diner
115
- npx codex-work-receipt@latest --latest --lang en --no-open
116
- npx codex-work-receipt@latest --today --lang en --timezone Asia/Shanghai --output ./my-receipt.html
117
- ```
118
-
119
- Run `npx codex-work-receipt@latest --help` for the full option list.
120
-
121
- ## Privacy
122
-
123
- - Reads `~/.codex/sessions/**/*.jsonl` by default
124
- - Extracts event types, timestamps, model names, and numerical statistics only
125
- - Does not store prompts, responses, source code, project paths, or file names
126
- - Does not send session data over the network while running
127
- - Saves HTML and structured history locally
128
-
129
- See [docs/privacy.md](docs/privacy.md) and [docs/data-schema.md](docs/data-schema.md).
130
-
131
- ## Open-source boundary
132
-
133
- This repository contains the desktop CLI, receipt renderer, QR data protocol, tests, and documentation. It does not contain the companion mini-program source code or server implementation.
61
+ - [CLI usage and options](docs/cli.en.md)
62
+ - [Codex Skill](docs/codex-skill.en.md)
63
+ - [Mobile QR import](docs/mobile-import.en.md)
64
+ - [Data schema and QR protocol](docs/data-schema.en.md)
65
+ - [Local data and privacy](docs/privacy.en.md)
66
+ - [Contributing](CONTRIBUTING.md) · [Security](SECURITY.md) · [Changelog](CHANGELOG.md)
134
67
 
135
- ## Local development
136
-
137
- ```bash
138
- git clone https://github.com/a-bai-2026/ai-work-receipt.git
139
- cd codex-work-receipt
140
- npm install
141
- npm test
142
- npm run receipt -- --latest
143
- ```
144
-
145
- Please read [CONTRIBUTING.md](CONTRIBUTING.md) and [SECURITY.md](SECURITY.md) before contributing. Never submit real Codex sessions.
146
-
147
- ## Roadmap
68
+ ## Sponsor
148
69
 
149
- - More receipt themes
150
- - Cursor and WorkBuddy data sources
151
- - Cross-tool activity reports
152
- - Weekly and monthly AI work archives
153
- - More parser fixtures and end-to-end compatibility tests
70
+ <p align="center">
71
+ <a href="https://modelflare.dev/"><img src="docs/images/sponsors/modelflare-logo.png" alt="ModelFlare Logo" width="56"></a><br>
72
+ <a href="https://modelflare.dev/"><strong>ModelFlare</strong></a> · <a href="https://modelflare.dev/">modelflare.dev</a><br>
73
+ <sub>Stable access to leading AI model APIs at a very low cost, with transparent pricing and clear usage.</sub>
74
+ </p>
154
75
 
155
- ## License and disclaimer
76
+ ## License
156
77
 
157
- - The desktop source code in this repository is licensed under [GNU GPL v3](LICENSE) (`GPL-3.0-only`)
158
- - Modified or redistributed versions must continue to comply with GPLv3 and provide the corresponding source code
159
- - GPLv3 applies only to the desktop project in this repository; it does not cover the companion mini program, backend services, or other independent products
160
- - This is an unofficial community project and is not affiliated with or endorsed by OpenAI
161
- - Codex and other product names belong to their respective owners
78
+ The desktop source is licensed under [GNU GPL v3](LICENSE) (`GPL-3.0-only`). This repository does not contain the companion mini-program or backend source code. This is an unofficial community project and is not affiliated with OpenAI.
162
79
 
163
80
  ---
164
81
 
package/README.md CHANGED
@@ -10,102 +10,37 @@
10
10
  </p>
11
11
 
12
12
  <p align="center">
13
+ <a href="https://www.npmjs.com/package/codex-work-receipt"><img alt="npm" src="https://img.shields.io/npm/v/codex-work-receipt?color=42CDA7"></a>
13
14
  <img alt="Node.js 20+" src="https://img.shields.io/badge/Node.js-20%2B-339933?logo=node.js&logoColor=white">
14
- <img alt="Local first" src="https://img.shields.io/badge/data-local--first-17231F">
15
- <img alt="Privacy first" src="https://img.shields.io/badge/privacy-no%20prompts%20or%20code-42CDA7">
15
+ <img alt="GPL-3.0" src="https://img.shields.io/badge/license-GPL--3.0-17231F">
16
+ <img alt="Local first" src="https://img.shields.io/badge/data-local--first-42CDA7">
16
17
  </p>
17
18
 
18
19
  <p align="center">
19
20
  <img src="docs/images/readme-hero.jpg" alt="Codex AI 打工小票三种主题效果" width="920">
20
21
  </p>
21
22
 
22
- <p align="center">
23
- 只读取本机 Codex 会话中的时间和数字统计。<br>
24
- 不会把 Prompt、回复正文、代码、项目路径或文件名写入小票。
25
- </p>
26
-
27
- ## 赞助商
28
-
29
- <p align="center">
30
- <a href="https://modelflare.dev/">
31
- <img src="docs/images/sponsors/modelflare-logo.png" alt="ModelFlare Logo" width="72">
32
- </a>
33
- </p>
34
-
35
- <p align="center">
36
- <a href="https://modelflare.dev/"><strong>ModelFlare</strong></a><br>
37
- <a href="https://modelflare.dev/">modelflare.dev</a><br>
38
- <sub>让个人开发者也能以很低的成本稳定接入前沿 AI 模型 API,价格友好、计费透明、用量清晰可见。</sub>
39
- </p>
40
-
41
- ## 三种小票主题
42
-
43
- <table>
44
- <tr>
45
- <td align="center"><strong>经典白票</strong></td>
46
- <td align="center"><strong>复古粉票</strong></td>
47
- <td align="center"><strong>夜班绿票</strong></td>
48
- </tr>
49
- <tr>
50
- <td><img src="docs/images/receipts/receipt-classic.jpg" alt="AI 打工小票经典白票" width="320"></td>
51
- <td><img src="docs/images/receipts/receipt-diner.jpg" alt="AI 打工小票复古粉票" width="320"></td>
52
- <td><img src="docs/images/receipts/receipt-payroll.jpg" alt="AI 打工小票夜班绿票" width="320"></td>
53
- </tr>
54
- </table>
23
+ 它会统计 Codex 会话中的轮次、工具调用、Token、时长和模型,生成带有 AI 工分、今日工种和点评的小票。不会把 Prompt、回复正文、代码、项目路径或文件名写入小票。
55
24
 
56
- 三种主题只改变视觉表达,不改变统计口径。生成网页后也可以即时切换主题。
25
+ ## Quickstart
57
26
 
58
- ## 30 秒快速开始
59
-
60
- 需要 Node.js 20 或更高版本,并且本机已经使用过 Codex。
61
-
62
- 不需要克隆仓库,统计最近一次会话并自动打开小票:
27
+ 需要 Node.js 20 或更高版本,并且本机已经使用过 Codex。无需克隆仓库,运行后选择“今天 / 近 7 日 / 本周 / 指定会话”:
63
28
 
64
29
  ```bash
65
- npx codex-work-receipt@latest --latest
30
+ npx codex-work-receipt@latest
66
31
  ```
67
32
 
68
- 汇总本地时区今天发生的全部 Codex 活动:
33
+ 汇总今天的全部 Codex 活动:
69
34
 
70
35
  ```bash
71
36
  npx codex-work-receipt@latest --today
72
37
  ```
73
38
 
74
- 生成英文版小票:
75
-
76
- ```bash
77
- npx codex-work-receipt@latest --latest --lang en
78
- ```
79
-
80
- 生成结果默认保存在:
81
-
82
- ```text
83
- ./codex-work-receipt-output/
84
- ├── codex-receipt-latest.html
85
- └── codex-receipt-latest.json
86
- ```
87
-
88
- ## 从电脑到手机
89
-
90
- ```text
91
- Codex 本地会话
92
-
93
- 运行一行命令
94
-
95
- 生成 AI 打工小票网页和数据二维码
96
-
97
- 在配套小程序中扫码导入
98
-
99
- 换模板、保存图片、分享
100
- ```
101
-
102
- 配套小程序已经支持扫码导入、本地历史、主题切换和保存图片。微信扫码即可进入配套小程序,再扫描旁边的数据二维码导入当前小票。
103
-
104
- 数据二维码只携带版本化的脱敏统计,不携带图片和原始会话。桌面端与小程序端分别根据同一份结构数据渲染小票。
39
+ 网页和结构数据默认保存在 `./codex-work-receipt-output/`。也可以继续使用 `--latest`、`--today` 等非交互参数,详见 [CLI 使用文档](docs/cli.md)。
105
40
 
106
41
  ## 直接跟 Codex 说
107
42
 
108
- 只需安装一次 AI 打工小票 Skill:
43
+ 安装一次 AI 打工小票 Skill:
109
44
 
110
45
  ```bash
111
46
  npx codex-work-receipt@latest --install-skill
@@ -115,130 +50,35 @@ npx codex-work-receipt@latest --install-skill
115
50
 
116
51
  > 给刚刚这次工作开一张 AI 打工小票。
117
52
 
118
- > 生成我今天的 AI 打工小票,使用复古粉票。
119
-
120
- > 用英文生成刚刚这次工作的 AI 打工小票。
121
-
122
- Codex 会自动判断 `--latest` 或 `--today`、选择主题、执行命令并打开生成的网页。也可以通过 `$ai-work-receipt` 显式调用。
123
-
124
- Skill 安装在用户目录 `~/.agents/skills/ai-work-receipt/`,不会写入当前代码仓库;如果当前会话没有识别到,请重启 Codex。
125
-
126
- ## 它能做什么
127
-
128
- - 统计最近一次 Codex 会话,或汇总今天的全部活动
129
- - 生成经典白票、复古粉票、夜班绿票三种主题
130
- - 支持中文和英文两套完整小票文案
131
- - 统计会话、轮次、用户消息、工具调用和中断次数
132
- - 展示 Token、缓存输入、AI 工作时长和模型
133
- - 根据工作量生成娱乐化的 AI 工分、今日工种和点评
134
- - 生成可供配套小程序扫描的 `cwr1` 数据二维码
135
- - 在本机保存结构 JSON 和去重后的历史记录
136
- - 安装可通过自然语言触发的 Codex Skill
137
- - 全程不上传 Prompt、回复、代码或项目路径
53
+ Codex 会选择统计范围和主题、执行命令并打开小票。详见 [Codex Skill 使用文档](docs/codex-skill.md)。
138
54
 
139
- ## 常用命令
140
-
141
- 选择默认主题:
142
-
143
- ```bash
144
- npx codex-work-receipt@latest --latest --theme diner
145
- ```
146
-
147
- 仅生成文件,不自动打开浏览器:
148
-
149
- ```bash
150
- npx codex-work-receipt@latest --latest --no-open
151
- ```
152
-
153
- 指定时区和输出路径:
154
-
155
- ```bash
156
- npx codex-work-receipt@latest --today \
157
- --timezone Asia/Shanghai \
158
- --output ./my-receipt.html
159
- ```
160
-
161
- 可用参数:
162
-
163
- | 参数 | 说明 |
164
- | --- | --- |
165
- | `--latest` | 统计最近活跃的 Codex 会话,默认模式 |
166
- | `--today` | 汇总指定时区今天发生的 Codex 活动 |
167
- | `--timezone <name>` | 指定 IANA 时区,例如 `Asia/Shanghai` |
168
- | `--lang <name>` | `zh-CN`(默认)或 `en` |
169
- | `--theme <name>` | `classic`、`diner` 或 `payroll` |
170
- | `--output <file>` | 指定 HTML 输出路径 |
171
- | `--data-dir <directory>` | 指定本地结构历史目录 |
172
- | `--install-skill` | 将 AI 打工小票 Skill 安装到当前用户的 Codex |
173
- | `--no-open` | 生成后不自动打开浏览器 |
174
-
175
- ## 本地保存的数据
176
-
177
- 每次运行会生成或更新:
178
-
179
- - `codex-work-receipt-output/codex-receipt-*.html`:可切换主题的小票网页
180
- - `codex-work-receipt-output/codex-receipt-*.json`:当前小票的版本化结构数据
181
- - `~/.codex-work-receipt/receipts/*.json`:本机历史快照
182
- - `~/.codex-work-receipt/latest.json`:最近生成的一张小票
183
- - `~/.codex-work-receipt/history.jsonl`:去重后的本地历史,方便未来批量迁移
184
-
185
- 数据结构和二维码协议见 [docs/data-schema.md](docs/data-schema.md)。
186
-
187
- ## 隐私设计
188
-
189
- - 默认只读取 `~/.codex/sessions/**/*.jsonl`
190
- - 只提取事件类型、时间、模型名称和数字统计
191
- - 不保存 Prompt、回复正文、代码、项目路径或文件名
192
- - 运行期间不向网络发送会话数据
193
- - HTML、结构 JSON 和历史记录全部保存在本机
194
- - 二维码等同于一份可扫描的数据文件,请只向信任的人展示
195
-
196
- 更完整的隐私说明见 [docs/privacy.md](docs/privacy.md)。
197
-
198
- ## 当前限制
199
-
200
- - 暂不统计修改文件数和代码行数,避免在不同工具调用方式下产生误导
201
- - `--today` 默认扫描最近 72 小时有变动的会话文件,再按事件日期筛选
202
- - 当前只支持 Codex;Cursor、WorkBuddy 等数据源仍在规划中
203
- - 网页端不直接导出图片,移动端渲染和保存由配套小程序完成
204
-
205
- ## 本地开发
206
-
207
- ```bash
208
- git clone https://github.com/a-bai-2026/ai-work-receipt.git
209
- cd codex-work-receipt
210
- npm install
211
- npm test
212
- npm run receipt -- --latest
213
- ```
55
+ ## 从电脑到手机
214
56
 
215
- 贡献前请阅读:
57
+ 桌面网页会生成脱敏的数据二维码。配套微信小程序支持扫码导入、本地历史、主题切换和保存图片。详见 [手机扫码导入](docs/mobile-import.md)。
216
58
 
217
- - [CONTRIBUTING.md](CONTRIBUTING.md)
218
- - [SECURITY.md](SECURITY.md)
219
- - [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
59
+ ## 文档
220
60
 
221
- 测试数据必须是人工构造或彻底脱敏的 fixture,禁止提交真实 Codex 会话。
61
+ - [CLI 使用与全部参数](docs/cli.md)
62
+ - [Codex Skill](docs/codex-skill.md)
63
+ - [手机扫码导入](docs/mobile-import.md)
64
+ - [数据结构与二维码协议](docs/data-schema.md)
65
+ - [本地数据与隐私说明](docs/privacy.md)
66
+ - [参与贡献](CONTRIBUTING.md) · [安全说明](SECURITY.md) · [更新日志](CHANGELOG.md)
222
67
 
223
- ## Roadmap
68
+ ## 赞助商
224
69
 
225
- - 增加更多可传播的小票主题
226
- - 支持 Cursor、WorkBuddy AI 工作工具
227
- - 完善跨工具的统一数据结构
228
- - 支持周报、月报和长期 AI 工作档案
229
- - 改进 Codex 不同版本的日志兼容性和端到端测试
70
+ <p align="center">
71
+ <a href="https://modelflare.dev/"><img src="docs/images/sponsors/modelflare-logo.png" alt="ModelFlare Logo" width="56"></a><br>
72
+ <a href="https://modelflare.dev/"><strong>ModelFlare</strong></a> · <a href="https://modelflare.dev/">modelflare.dev</a><br>
73
+ <sub>以很低的成本稳定接入前沿 AI 模型 API,价格友好、计费透明、用量清晰可见。</sub>
74
+ </p>
230
75
 
231
- ## 许可与声明
76
+ ## License
232
77
 
233
- - 本仓库中的电脑端源码采用 [GNU GPL v3](LICENSE)(`GPL-3.0-only`)许可
234
- - 修改或分发本项目时,必须继续遵守 GPLv3 并提供相应源码
235
- - GPLv3 仅适用于本仓库中的电脑端项目,不覆盖配套小程序、后台服务或其他独立产品
236
- - 本项目是非 OpenAI 官方社区工具,与 OpenAI 无隶属或背书关系
237
- - Codex、Cursor、WorkBuddy 及相关名称和商标归各自权利人所有
78
+ 电脑端源码采用 [GNU GPL v3](LICENSE)(`GPL-3.0-only`)。本仓库不包含配套小程序和后台服务源码;本项目是非 OpenAI 官方社区工具。
238
79
 
239
80
  ---
240
81
 
241
82
  <p align="center">
242
- <strong>如果这张小票让你觉得有点意思,欢迎点一个 Star。</strong><br>
243
- 让每一次 AI 打工,都留下一张可以带走的记录。
83
+ <strong>如果这张小票让你觉得有点意思,欢迎点一个 Star。</strong>
244
84
  </p>
package/docs/cli.en.md ADDED
@@ -0,0 +1,133 @@
1
+ # CLI guide
2
+
3
+ <p><a href="./cli.md">中文</a> · <strong>English</strong> · <a href="../README.en.md">Back to README</a></p>
4
+
5
+ ## Requirements
6
+
7
+ - Node.js 20 or later
8
+ - Local Codex session records under `~/.codex/sessions/`
9
+
10
+ No clone or global installation is required.
11
+
12
+ ## Interactive range selector
13
+
14
+ Run:
15
+
16
+ ```bash
17
+ npx codex-work-receipt@latest --lang en
18
+ ```
19
+
20
+ Choose all activity today, the last 7 calendar days, this week, or a specific recent session. Session choices include their time range, turns, tool calls, and model for identification.
21
+
22
+ ## Non-interactive ranges
23
+
24
+ Summarize the latest active session and open the receipt:
25
+
26
+ ```bash
27
+ npx codex-work-receipt@latest --latest --lang en
28
+ ```
29
+
30
+ Summarize all Codex activity from today in your local timezone:
31
+
32
+ ```bash
33
+ npx codex-work-receipt@latest --today --lang en
34
+ ```
35
+
36
+ Last 7 calendar days, including today:
37
+
38
+ ```bash
39
+ npx codex-work-receipt@latest --range last-7-days --lang en
40
+ ```
41
+
42
+ Monday through now:
43
+
44
+ ```bash
45
+ npx codex-work-receipt@latest --range this-week --lang en
46
+ ```
47
+
48
+ ## Language and themes
49
+
50
+ Generate a Chinese receipt:
51
+
52
+ ```bash
53
+ npx codex-work-receipt@latest --latest --lang zh-CN
54
+ ```
55
+
56
+ Choose the initial theme:
57
+
58
+ ```bash
59
+ npx codex-work-receipt@latest --latest --lang en --theme diner
60
+ ```
61
+
62
+ Available themes:
63
+
64
+ - `classic`: classic white receipt
65
+ - `diner`: vintage pink diner receipt
66
+ - `payroll`: dark-green night payroll receipt
67
+
68
+ Themes can still be switched in the generated page without changing the metrics.
69
+
70
+ ## Output
71
+
72
+ Default output:
73
+
74
+ ```text
75
+ ./codex-work-receipt-output/
76
+ ├── codex-receipt-latest.html
77
+ └── codex-receipt-latest.json
78
+ ```
79
+
80
+ Set a timezone and output path:
81
+
82
+ ```bash
83
+ npx codex-work-receipt@latest --today --lang en \
84
+ --timezone Asia/Shanghai \
85
+ --output ./my-receipt.html
86
+ ```
87
+
88
+ Generate files without opening a browser:
89
+
90
+ ```bash
91
+ npx codex-work-receipt@latest --latest --lang en --no-open
92
+ ```
93
+
94
+ ## Options
95
+
96
+ | Option | Description |
97
+ | --- | --- |
98
+ | `--range <name>` | `latest`, `today`, `last-7-days`, or `this-week` |
99
+ | `--latest` | Summarize the latest active Codex session; default mode |
100
+ | `--today` | Summarize activity from today in the selected timezone |
101
+ | `--session <id>` | Summarize one specific Codex session |
102
+ | `--timezone <name>` | Set an IANA timezone such as `Asia/Shanghai` |
103
+ | `--lang <name>` | `zh-CN` (default) or `en` |
104
+ | `--theme <name>` | `classic`, `diner`, or `payroll` |
105
+ | `--output <file>` | Set the HTML output path |
106
+ | `--data-dir <directory>` | Set the local structured-history directory |
107
+ | `--install-skill` | Install the Codex AI Work Receipt skill |
108
+ | `--no-open` | Do not open the generated page |
109
+
110
+ Run the built-in help at any time:
111
+
112
+ ```bash
113
+ npx codex-work-receipt@latest --help
114
+ ```
115
+
116
+ ## Local history
117
+
118
+ Each run creates or updates:
119
+
120
+ - `codex-work-receipt-output/codex-receipt-*.html`: theme-switchable receipt page
121
+ - `codex-work-receipt-output/codex-receipt-*.json`: versioned receipt data
122
+ - `~/.codex-work-receipt/receipts/*.json`: local snapshots
123
+ - `~/.codex-work-receipt/latest.json`: latest receipt
124
+ - `~/.codex-work-receipt/history.jsonl`: deduplicated local history
125
+
126
+ See the [data schema and QR protocol](data-schema.en.md).
127
+
128
+ ## Current limitations
129
+
130
+ - Codex is the only supported data source; Cursor and WorkBuddy are planned
131
+ - Changed-file and line counts are intentionally omitted until they can be measured consistently
132
+ - Calendar ranges filter individual events by local date and calculate a Token delta for each session
133
+ - Image export is handled by the companion mini program rather than the desktop page