@ccusage/codex
Advanced tools
+1
-1
| { | ||
| "name": "@ccusage/codex", | ||
| "version": "17.0.1", | ||
| "version": "17.0.2", | ||
| "description": "Usage analysis tool for OpenAI Codex sessions", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/ryoppippi/ccusage#readme", |
+29
-9
@@ -25,9 +25,29 @@ <div align="center"> | ||
| ```bash | ||
| # Recommended (fastest) | ||
| bunx @ccusage/codex --help | ||
| # Recommended - always include @latest | ||
| npx @ccusage/codex@latest --help | ||
| bunx @ccusage/codex@latest --help # â ī¸ MUST include @latest with bunx | ||
| # Using npx | ||
| npx @ccusage/codex@latest --help | ||
| # Alternative package runners | ||
| pnpm dlx @ccusage/codex | ||
| pnpx @ccusage/codex | ||
| # Using deno (with security flags) | ||
| deno run -E -R=$HOME/.codex/ -S=homedir -N='raw.githubusercontent.com:443' npm:@ccusage/codex@latest --help | ||
| ``` | ||
| > â ī¸ **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. | ||
| ### Recommended: Shell Alias | ||
| Since `npx @ccusage/codex@latest` is quite long to type repeatedly, we strongly recommend setting up a shell alias: | ||
| ```bash | ||
| # bash/zsh: alias ccusage-codex='bunx @ccusage/codex@latest' | ||
| # fish: alias ccusage-codex 'bunx @ccusage/codex@latest' | ||
| # Then simply run: | ||
| ccusage-codex daily | ||
| ccusage-codex monthly --json | ||
| ``` | ||
| > đĄ The CLI looks for Codex session JSONL files under `CODEX_HOME` (defaults to `~/.codex`). | ||
@@ -39,15 +59,15 @@ | ||
| # Daily usage grouped by date (default command) | ||
| bunx @ccusage/codex daily | ||
| npx @ccusage/codex@latest daily | ||
| # Date range filtering | ||
| bunx @ccusage/codex daily --since 20250911 --until 20250917 | ||
| npx @ccusage/codex@latest daily --since 20250911 --until 20250917 | ||
| # JSON output for scripting | ||
| bunx @ccusage/codex daily --json | ||
| npx @ccusage/codex@latest daily --json | ||
| # Monthly usage grouped by month | ||
| bunx @ccusage/codex monthly | ||
| npx @ccusage/codex@latest monthly | ||
| # Monthly JSON report for integrations | ||
| bunx @ccusage/codex monthly --json | ||
| npx @ccusage/codex@latest monthly --json | ||
| ``` | ||
@@ -54,0 +74,0 @@ |
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
363294
0.3%114
21.28%