Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Intelligence View
⚡ tsecurity.de Intelligence

TokenLens - A CLI tool to check token usage for Cursor and other AI providers.

This is a submission for the DEV Weekend Challenge: Community The Community If you’re like me, you don’t use just one AI tool. One day it’s Cursor. Then you hop into Codex. Then you try Gemini Code Assist. Each one has its own …

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

This is a submission for the DEV Weekend Challenge: Community






The Community



If you’re like me, you don’t use just one AI tool.



One day it’s Cursor. Then you hop into Codex. Then you try Gemini Code Assist. Each one has its own idea of:



“usage”



“limits”



“reset time”



“where the dashboard even is”



And the worst part, you usually notice you’re out of quota only when you’re already in the middle of building something.



TokenLens is for devs who bounce between multiple AI providers and just want one quick answer: “How much do I have left, and when does it reset?”



No dashboards. No clicking around. Just one terminal command.






What I Built



TokenLens is a CLI that shows usage and limits for Cursor, Codex, and Gemini in one terminal view.



Run:




  • tlens status



…and you’ll see usage, limits, and reset dates for:





  • Cursor — Pro/Fast request usage + reset date (pulled from browser cookies)


  • Codex — session (5h), weekly usage, credits (from ~/.codex/auth.json + usage endpoint)


  • Gemini Code Assist — Pro + Flash usage + reset dates (via CLI OAuth + Code Assist APIs)



It also supports an optional config setup (like storing a Copilot token), and you can install it via:




  • Homebrew: brew tap ctzeero/tap && brew install tokenlens

  • build from source

  • standalone binary (so you don’t need Node installed)






Demo



Terminal screenshot showing TokenLens v0.1.0 checking providers and displaying usage for Cursor Free, Codex Plus, and Gemini Code Assist (Pro/Flash) with percent used and reset dates






Code



Repo: https://github.com/ctzeero/tokenlens






Why I Built It (the real reason)



I kept hitting the same cycle:




  1. Use Cursor

  2. Switch to another tool for a specific task

  3. Suddenly get rate-limited or hit a cap

  4. Spend time hunting through dashboards and settings pages

  5. Realize the reset was “tomorrow” and I could’ve planned better 😅



TokenLens is my attempt to make “usage awareness” effortless, its basically git status for your AI limits.





  • TypeScript + Node.js for the CLI


  • Commander for subcommands (status, config, providers)


  • pkg to ship standalone binaries (Node bundled, so users don’t need a Node install)


  • Interactive setup: inquirer


  • Terminal UI: chalk + a tiny ASCII banner






Reading usage sources




How it works under the hood



  • Cursor usage: reads browser cookie DBs (Chrome/Arc/Edge/Safari/Firefox) via sql.js.


  • Codex + Gemini: reads auth files + uses OAuth auto-refresh.


  • Config storage: Local settings + optional saved tokens (e.g., Copilot) stored via conf in `~/.config/tokenlens.









What’s Next



A few ideas I want to explore next:




  • add more providers (Claude, OpenAI Platform usage, etc.)

  • exporting JSON so usage data can be fed into dashboards or custom scripts






Thanks for reading!



Thanks for checking out TokenLens If this tool makes your dev life easier, feel free to drop by the repo, share feedback, or suggest your favorite AI tool you’d like to see supported next!

1. Sofort-Triage & Abwehrmaßnahmen

SOC Incident Playbook: Remote Code Execution (RCE) Defense
Syntax validiert (0 Fehler)
title: Detect Exploitation - TokenLens - A CLI tool to check token usage for Cursor and other AI providers.
id: b6a3ff22-2236-466b-9bbb-142704719f56
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-25
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
Syntax validiert (0 Fehler)
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-25"
        description = "YARA Signature for "
    strings:
        $str = "TokenLens - A CLI tool to chec" ascii wide
    condition:
        any of them
}
Syntax validiert (0 Fehler)
index=security sourcetype IN ("cisco:asa", "pan:traffic", "zeek_conn", "suricata", "WinEventLog:Security")
("TokenLens - A CLI tool to check token us")
| stats count earliest(_time) as first_seen latest(_time) as last_seen by src_ip, dest_ip, dest_host, signature
| eval first_seen=strftime(first_seen, "%Y-%m-%d %H:%M:%S"), last_seen=strftime(last_seen, "%Y-%m-%d %H:%M:%S")
| sort - count
Syntax validiert (0 Fehler)
message: "*TokenLens - A CLI tool to check token us*"
Syntax validiert (0 Fehler)
CommonSecurityLog
| where Message has "TokenLens - A CLI tool to check token us"
| summarize EventCount = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by SourceIP, DestinationIP, DestinationPort, Activity
| extend DetectionRule = "iShareStuff-CTI-Compiled"
| sort by EventCount desc

2. Cyber Threat Intelligence & Forensik

🎯
MITRE ATT&CK Matrix Navigator 14 Taktiken
Reconnaissance
-
Resource Development
-
Initial Access
Execution
Persistence
-
Privilege Escalation
Defense Evasion
Credential Access
-
Discovery
-
Lateral Movement
-
Collection
-
Command and Control
Exfiltration
-
Impact
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich TokenLens - A CLI tool to check token us.... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

⚡ Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten TokenLens - A CLI tool to check token usage for Cursor and other AI providers.

Thematisch verwandte Begriffe: TokenLens, tool, check, token · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-97898 | Insecure Direct Object Reference / missing object-level authorization in…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag