By Psy-Fer
Per-turn token usage telemetry for Claude Code. Sends usage metadata to your organisation's self-hosted receiver — no message content is ever collected.
This plugin requires configuration values that are prompted when the plugin is enabled. Sensitive values are stored in your system keychain.
api_tokenYour personal token, provisioned by your IT team
${user_config.api_token}api_endpointYour organisation's ccflux receiver URL, e.g. https://ccflux.example.org/report
${user_config.api_endpoint}A Claude Code plugin that collects opt-in, per-turn token usage telemetry and ships it to a self-hosted receiver. Built for organisations on seat-based Enterprise Claude Code plans where Anthropic's Analytics dashboard does not expose per-user token counts.
What it collects: token counts, model name, session/turn identifiers, timestamps.
What it never collects: message content, prompts, file paths, code, or anything identifying project content.
errors.log interpretation, common issuesIT / server setup
receiver/ behind a TLS proxy — see Server & IT setuprefresh_tokens tableUser install
Linux / macOS / WSL / Git Bash:
bash install.sh
Native Windows PowerShell:
.\install.ps1
# or with -UseStandardHooks if CC runs via Git Bash rather than native PS
Both scripts find all Claude Code data directories on the machine (including aliased ones), let you pick the install target, copy all plugin files, and register the plugin in CC's plugin registry.
To uninstall:
bash uninstall.sh
.\uninstall.ps1
See User setup for full instructions.
ccflux/
├── ccflux-core/ # Rust binary — plugin-side CLI
├── receiver/ # Rust Axum + SQLite self-hosted collector
├── plugin/ # CC plugin files (distribute to users)
│ ├── .claude-plugin/ # Plugin manifest
│ ├── hooks/ # Hook → script mapping
│ ├── scripts/ # Wrapper scripts (sh + ps1)
│ └── bin/ # Pre-built binaries (populated by CI)
├── docs/ # mdbook documentation source
├── dashboard/ # Example SQL queries
└── schema.sql # SQLite schema
cd ccflux-core && cargo build --release
cd receiver && cargo build --release
Releases are built automatically by .github/workflows/release.yml on tag push. Download a release and drop the binaries into plugin/bin/ — no build step required for end-users.
| Platform | Binary | Hook config |
|---|---|---|
| Linux x86_64 | ccflux-linux-x86_64 | hooks.json |
| Linux aarch64 | ccflux-linux-aarch64 | hooks.json |
| macOS x86_64 | ccflux-macos-x86_64 | hooks.json |
| macOS Apple Silicon | ccflux-macos-aarch64 | hooks.json |
| Windows via WSL | ccflux-linux-x86_64 | hooks.json |
| Windows via Git Bash | ccflux-windows-x86_64.exe | hooks.json |
| Windows native PowerShell | ccflux-windows-x86_64.exe | hooks-windows.json |
Windows notes:
hooks.json works as-is; the .sh scripts detect MSYS/MINGW and select the Windows binary automatically.plugin/hooks/hooks-windows.json over hooks.json before installing. The .ps1 wrappers are used instead of .sh.receiver/ to your internal infrastructureOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub psy-fer/ccflux --plugin ccfluxMCP server that saves 98% of your context window with session continuity. Sandboxed code execution in 11 languages, FTS5 knowledge base with BM25 ranking, and automatic state restore across compactions.
Complete AI coding workflow system. Self-correcting memory + persistent FTS5-indexed research wikis + auto-research loop + multi-LLM council on a single SQLite store. 33 skills, 8 agents, 22 commands, 37 hook scripts across 24 events. Cross-agent via SkillKit.
Open-source, local-first Claude Code plugin for token reduction, context compression, and cost optimization using hybrid RAG retrieval (BM25 + vector search), reranking, AST-aware chunking, and compact context packets.