@ccusage/codex 17.0.1 → 17.0.3
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/README.md +32 -9
- package/dist/index.js +25 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,11 +22,31 @@
|
|
|
22
22
|
## Quick Start
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
|
-
# Recommended
|
|
26
|
-
bunx @ccusage/codex --help
|
|
27
|
-
|
|
28
|
-
# Using npx
|
|
25
|
+
# Recommended - always include @latest
|
|
29
26
|
npx @ccusage/codex@latest --help
|
|
27
|
+
bunx @ccusage/codex@latest --help # ⚠️ MUST include @latest with bunx
|
|
28
|
+
|
|
29
|
+
# Alternative package runners
|
|
30
|
+
pnpm dlx @ccusage/codex
|
|
31
|
+
pnpx @ccusage/codex
|
|
32
|
+
|
|
33
|
+
# Using deno (with security flags)
|
|
34
|
+
deno run -E -R=$HOME/.codex/ -S=homedir -N='raw.githubusercontent.com:443' npm:@ccusage/codex@latest --help
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
> ⚠️ **Critical for bunx users**: Bun 1.2.x's bunx prioritizes binaries matching the package name suffix when given a scoped package. For `@ccusage/codex`, it looks for a `codex` binary in PATH first. If you have an existing `codex` command installed (e.g., GitHub Copilot's codex), that will be executed instead. **Always use `bunx @ccusage/codex@latest` with the version tag** to force bunx to fetch and run the correct package.
|
|
38
|
+
|
|
39
|
+
### Recommended: Shell Alias
|
|
40
|
+
|
|
41
|
+
Since `npx @ccusage/codex@latest` is quite long to type repeatedly, we strongly recommend setting up a shell alias:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# bash/zsh: alias ccusage-codex='bunx @ccusage/codex@latest'
|
|
45
|
+
# fish: alias ccusage-codex 'bunx @ccusage/codex@latest'
|
|
46
|
+
|
|
47
|
+
# Then simply run:
|
|
48
|
+
ccusage-codex daily
|
|
49
|
+
ccusage-codex monthly --json
|
|
30
50
|
```
|
|
31
51
|
|
|
32
52
|
> 💡 The CLI looks for Codex session JSONL files under `CODEX_HOME` (defaults to `~/.codex`).
|
|
@@ -35,19 +55,22 @@ npx @ccusage/codex@latest --help
|
|
|
35
55
|
|
|
36
56
|
```bash
|
|
37
57
|
# Daily usage grouped by date (default command)
|
|
38
|
-
|
|
58
|
+
npx @ccusage/codex@latest daily
|
|
39
59
|
|
|
40
60
|
# Date range filtering
|
|
41
|
-
|
|
61
|
+
npx @ccusage/codex@latest daily --since 20250911 --until 20250917
|
|
42
62
|
|
|
43
63
|
# JSON output for scripting
|
|
44
|
-
|
|
64
|
+
npx @ccusage/codex@latest daily --json
|
|
45
65
|
|
|
46
66
|
# Monthly usage grouped by month
|
|
47
|
-
|
|
67
|
+
npx @ccusage/codex@latest monthly
|
|
48
68
|
|
|
49
69
|
# Monthly JSON report for integrations
|
|
50
|
-
|
|
70
|
+
npx @ccusage/codex@latest monthly --json
|
|
71
|
+
|
|
72
|
+
# Session-level detailed report
|
|
73
|
+
npx @ccusage/codex@latest sessions
|
|
51
74
|
```
|
|
52
75
|
|
|
53
76
|
Useful environment variables:
|
package/dist/index.js
CHANGED
|
@@ -897,7 +897,7 @@ async function executeCommand(cmd, ctx, name$1) {
|
|
|
897
897
|
await resolved.run(ctx);
|
|
898
898
|
}
|
|
899
899
|
var name = "@ccusage/codex";
|
|
900
|
-
var version = "17.0.
|
|
900
|
+
var version = "17.0.3";
|
|
901
901
|
var description = "Usage analysis tool for OpenAI Codex sessions";
|
|
902
902
|
var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
903
903
|
let messages = [];
|
|
@@ -2744,6 +2744,14 @@ const sharedArgs = {
|
|
|
2744
2744
|
type: "boolean",
|
|
2745
2745
|
description: "Force compact table layout for narrow terminals",
|
|
2746
2746
|
default: false
|
|
2747
|
+
},
|
|
2748
|
+
color: {
|
|
2749
|
+
type: "boolean",
|
|
2750
|
+
description: "Enable colored output (default: auto). FORCE_COLOR=1 has the same effect."
|
|
2751
|
+
},
|
|
2752
|
+
noColor: {
|
|
2753
|
+
type: "boolean",
|
|
2754
|
+
description: "Disable colored output (default: auto). NO_COLOR=1 has the same effect."
|
|
2747
2755
|
}
|
|
2748
2756
|
};
|
|
2749
2757
|
var castComparer = function(comparer) {
|
|
@@ -6991,6 +6999,14 @@ const PREFETCHED_CODEX_PRICING = {
|
|
|
6991
6999
|
"max_input_tokens": 272e3,
|
|
6992
7000
|
"max_output_tokens": 128e3
|
|
6993
7001
|
},
|
|
7002
|
+
"azure/gpt-5-codex": {
|
|
7003
|
+
"input_cost_per_token": 125e-8,
|
|
7004
|
+
"output_cost_per_token": 1e-5,
|
|
7005
|
+
"cache_read_input_token_cost": 125e-9,
|
|
7006
|
+
"max_tokens": 128e3,
|
|
7007
|
+
"max_input_tokens": 272e3,
|
|
7008
|
+
"max_output_tokens": 128e3
|
|
7009
|
+
},
|
|
6994
7010
|
"azure/gpt-5-mini": {
|
|
6995
7011
|
"input_cost_per_token": 25e-8,
|
|
6996
7012
|
"output_cost_per_token": 2e-6,
|
|
@@ -7055,6 +7071,14 @@ const PREFETCHED_CODEX_PRICING = {
|
|
|
7055
7071
|
"max_input_tokens": 4e5,
|
|
7056
7072
|
"max_output_tokens": 128e3
|
|
7057
7073
|
},
|
|
7074
|
+
"gpt-5-codex": {
|
|
7075
|
+
"input_cost_per_token": 125e-8,
|
|
7076
|
+
"output_cost_per_token": 1e-5,
|
|
7077
|
+
"cache_read_input_token_cost": 125e-9,
|
|
7078
|
+
"max_tokens": 128e3,
|
|
7079
|
+
"max_input_tokens": 272e3,
|
|
7080
|
+
"max_output_tokens": 128e3
|
|
7081
|
+
},
|
|
7058
7082
|
"gpt-5-mini": {
|
|
7059
7083
|
"input_cost_per_token": 25e-8,
|
|
7060
7084
|
"output_cost_per_token": 2e-6,
|