Analyze Claude Code sessions, token usage, tools, and estimated API costs.
Project description
claude-times
Analiza el historial JSONL de Claude Code para generar reportes detallados de:
- ⏱ Tiempo de trabajo por sesión e instrucción
- 🔢 Consumo de tokens (input, cache read, cache write, output)
- 💰 Costos estimados por modelo
- 🛠 Uso de herramientas (Read, Write, Bash, etc.)
- 📊 Exportación a CSV y JSON
🎯 Objetivo
Proveer transparencia y control técnico sobre el uso real de Claude Code:
- Identificar instrucciones costosas
- Optimizar uso de modelos
- Detectar desperdicio por errores API
- Analizar eficiencia del cache
- Medir productividad asistida por IA
📦 Requisitos
- Python 3.8+
- Claude Code instalado
- Acceso al directorio
~/.claude/projects
🚀 Uso
claude-times
Opciones principales
--list # Lista proyectos
--project NOMBRE # Filtrar proyecto
--all # Todas las sesiones
--days 30 # Últimos 30 días
--detail # Timeline detallado
--csv # Exportar CSV
--json # Exportar JSON
Ejemplo:
claude-times --project lego --days 30 --detail
🧠 Modelos soportados
Incluye pricing estimado para:
- Claude Opus 4.6
- Claude Opus 4.5
- Claude Sonnet 4.5
- Claude Haiku 4.5
Los costos mostrados corresponden a precios API públicos como referencia comparativa.
🔐 Licencia
Este proyecto está licenciado bajo:
GNU Affero General Public License v3.0 (AGPL-3.0-or-later)
Esto significa que:
- ✔ Puedes usarlo
- ✔ Puedes modificarlo
- ✔ Puedes redistribuirlo
- ✔ Puedes usarlo comercialmente
- ✔ Puedes integrarlo en SaaS
Pero:
- ⚠ Debes mantener esta misma licencia
- ⚠ Debes publicar el código fuente si lo distribuyes o lo ofreces como servicio
Texto completo: https://www.gnu.org/licenses/agpl-3.0.html
👤 Autor
J. Fernando Gallarday V.
Innova a tu Manera Soluciones Digitales S.A.C. (A Tu Manera Digital)
Perú
⚠ Descargo de responsabilidad
Este software se proporciona "tal cual", sin garantía de ningún tipo. Los cálculos de costo son estimaciones basadas en precios públicos y pueden no reflejar el costo real en planes de suscripción.
⭐ Contribuciones
Pull requests y mejoras son bienvenidas. Al contribuir aceptas que tu código será distribuido bajo AGPL-3.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_times-1.0.2.tar.gz.
File metadata
- Download URL: claude_times-1.0.2.tar.gz
- Upload date:
- Size: 24.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c10d6cff0836a6addfe1190ad581023ba3f2a2fafd955768d72db2830cdcb34
|
|
| MD5 |
b5d661f2df59b8fb7453268a7b50780e
|
|
| BLAKE2b-256 |
733f4ab768932f807666ed5dfc66d032a0b82e785d39a3cd6685886d48be36ac
|
Provenance
The following attestation bundles were made for claude_times-1.0.2.tar.gz:
Publisher:
pypi.yml on ATuManera/claude-times
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_times-1.0.2.tar.gz -
Subject digest:
5c10d6cff0836a6addfe1190ad581023ba3f2a2fafd955768d72db2830cdcb34 - Sigstore transparency entry: 976324851
- Sigstore integration time:
-
Permalink:
ATuManera/claude-times@95e9de9204a868673987b3b6fb00bb7dadd1c921 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/ATuManera
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@95e9de9204a868673987b3b6fb00bb7dadd1c921 -
Trigger Event:
push
-
Statement type:
File details
Details for the file claude_times-1.0.2-py3-none-any.whl.
File metadata
- Download URL: claude_times-1.0.2-py3-none-any.whl
- Upload date:
- Size: 24.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7dc6ca83cbb18b79cdef6cfd754a571aef73efff4f8972198e84f50371ac73b8
|
|
| MD5 |
53e2508a65811587c7a73279edab4cd0
|
|
| BLAKE2b-256 |
fd69639882efb3eb3c62439cd96849536b98d2190b51432f5cc3c85014988062
|
Provenance
The following attestation bundles were made for claude_times-1.0.2-py3-none-any.whl:
Publisher:
pypi.yml on ATuManera/claude-times
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_times-1.0.2-py3-none-any.whl -
Subject digest:
7dc6ca83cbb18b79cdef6cfd754a571aef73efff4f8972198e84f50371ac73b8 - Sigstore transparency entry: 976324852
- Sigstore integration time:
-
Permalink:
ATuManera/claude-times@95e9de9204a868673987b3b6fb00bb7dadd1c921 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/ATuManera
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@95e9de9204a868673987b3b6fb00bb7dadd1c921 -
Trigger Event:
push
-
Statement type: