straude
v0.1.30
Published
CLI for pushing AI coding agent usage stats to Straude
Readme
straude CLI
Push your AI coding-agent usage stats to Straude.
Quick start
npx straude@latest
# or
bunx straudeRunning with no arguments performs a smart sync: logs you in if needed, then pushes any usage since your last sync.
Requirements
- Node 18+
- Local session data from any source supported by ccusage.
Straude invokes its installed ccusage dependency directly. The compatible ccusage@^20.0.16 range owns source parsing, model recognition, token accounting, and LiteLLM pricing updates. Straude uses ccusage's unified report, so all detected sources are included by default: Claude Code, Codex, OpenCode, Amp, Droid, Codebuff, Hermes Agent, pi-agent, Goose, OpenClaw, Kilo, Kimi, Qwen, GitHub Copilot CLI, Gemini CLI, and compatible custom source IDs.
Commands
Default (smart sync)
straude- First run: opens a browser tab to authenticate, then pushes today's usage.
- First run after the ccusage v20 migration: backfills the last 30 days once.
- Subsequent runs: pushes all days since the last sync (up to 7 days).
- Already synced today: prints today's stats and exits.
login
straude loginAuthenticate with Straude via browser OAuth. Saves a token to ~/.straude/config.json.
push
straude push [options]Push usage data to Straude.
| Flag | Description |
|---|---|
| --date YYYY-MM-DD | Push a specific date (must be within the last 30 days) |
| --days N | Push the last N days (max 30) |
| --dry-run | Preview what would be submitted without posting |
status
straude statusShow your current streak, weekly spend, token usage, and global rank.
Examples
# First-time setup
npx straude@latest
# Daily sync (run this from a cron job or shell startup)
straude
# See what would be pushed without posting
straude push --dry-run
# Backfill the last 3 days
straude push --days 3
# Push a specific date
straude push --date 2026-02-15
# Check your stats
straude statusConfig
Credentials are stored in ~/.straude/config.json (mode 0600, owner-only).
Debug mode
Pass --debug (or export STRAUDE_DEBUG=1) to surface diagnostic detail
that's hidden by default. Most of the time you don't need it; reach for it
when something in the output looks off and you want to know why.
straude push --debug
# or, persistent across invocations:
export STRAUDE_DEBUG=1
straudeDebug output is written to stderr so it doesn't interfere with piping the
normal output.
Telemetry
The CLI sends anonymous usage events (command name, CLI version, success/failure outcomes, aggregate counts like days_pushed and total_cost_usd) to Straude's PostHog project so we can prioritise features and catch regressions. We never send prompts, code, conversation content, file paths, or ccusage rows — home directory paths are scrubbed from any free-form payload before transmission.
To opt out, set either env var:
export STRAUDE_TELEMETRY_DISABLED=1
# or the unix-standard:
export DO_NOT_TRACK=1