juliantanx/aiusage — Open-source AI usage tracker — tokens, cost, and sessions across Claude Code, Codex, Hermes, Qoder,…
Description and use
**Brief Summary (2‑3 sentences)**
juliantanx/aiusage is an open‑source TypeScript library that tracks AI usage across multiple models—including Claude, Codex, Hermes, Qoder, and others—by logging token counts, cost, and session metadata. It offers a unified API/SDK/CLI surface so developers can instrument their applications without building a custom telemetry stack from scratch. With active maintenance, a growing star count, and broad model support, it’s ready for pilot projects and early‑stage production use.
**Value**
- **Unified observability**: Consolidates token, cost, and session data from disparate AI providers into a single source of truth, simplifying budgeting and performance monitoring.
- **Rapid prototyping**: Developers can plug the tracker into new AI features, RAG pipelines, or autonomous agents without reinventing telemetry logic.
- **Decision‑making**: Detailed usage metrics enable data‑driven model selection, cost optimization, and SLA compliance.
**Practical Adoption Path**
- **Add the package** (
npm i @juliantanx/aiusage) to your TypeScript/JavaScript project. - **Initialize the tracker** with your API keys and desired models (e.g., Claude, Codex).
- **Instrument calls** by wrapping the provider SDKs or using the provided CLI hooks; the library automatically records token usage, request cost, and session identifiers.
- **Consume the data** via the exposed SDK methods, webhook endpoints, or export to your existing analytics store (e.g., PostgreSQL, BigQuery).
- **Iterate** by adding custom tags (e.g., feature flag, user segment) to enrich the telemetry for deeper insights.
**Production Readiness**
- **Activity & Community**: Recent commits (as of 2026‑06‑25), 91 stars, and ongoing issue response indicate a healthy open‑source project.
- **Feature Completeness**: Supports a wide range of popular models and provides both programmatic (API/SDK) and command‑line interfaces, covering most integration scenarios.
- **Stability**: The TypeScript codebase is type‑safe and well‑documented, reducing runtime errors.
- **Risk Considerations**: While no major licensing or security red flags are evident, a final review of the MIT/Apache license terms, dependency audit, and maintainer responsiveness is recommended before full production rollout.
Overall, juliantanx/aiusage offers a low‑friction, production‑grade solution for AI usage telemetry, making it a strong candidate for pilots and scaling into production environments.
Problem
juliantanx/aiusage helps add AI capability without starting from a blank model stack.
Outcome
High for an OSS candidate: recent activity, adoption, and ecosystem signals are strong enough for a serious pilot.
Workflow
- prototype AI features
- build RAG or agent workflows
- evaluate model tooling
Evidence
Open-source AI usage tracker — tokens, cost, and sessions across Claude Code, Codex, Hermes, Qoder, and more
- Record date: 2026-09-11T04:04:39.023Z