Back to Home
Yutaka-Murata icon

claude-code-token-monitor-bash

Verified Safe

by Yutaka-Murata

Overview

Real-time monitoring and analysis of Claude Code token usage and cost for local development sessions.

Installation

Run Command
./monitor_cost.sh monitor

Environment Variables

  • CLAUDE_MODEL

Security Notes

The scripts utilize `python3 -c "..."` to embed shell variables (e.g., log entries, pricing rates) into Python strings for processing JSON. While this pattern carries an inherent, albeit low, risk of command injection if the source data (Claude Code transcript files) were malicious or improperly formed, it's generally considered safe within a controlled local environment where Claude Code itself is assumed to be trusted. No direct `eval` commands are used in Bash. No hardcoded credentials or external network risks are identified. macOS notifications via `osascript` use extracted log data, posing a minimal risk if log content were specifically crafted to exploit shell commands.

Similar Servers

Stats

Interest Score0
Security Score8
Cost ClassLow
Stars0
Forks0
Last Update2026-01-17

Tags

ClaudeAnthropicToken MonitoringCost ManagementBash Scripting