百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
T

toktop

> AI 编程
开源

终端中的 LLM 使用监控器

170 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

终端中的 LLM 使用监控器

toktop is a terminal-based dashboard for OpenAI and Anthropic token usage and costs. It allows user (admin of their openai and anthropic accounts) to monitor their usage inside terminal without constantly jumping into different websites.

Installation

bash
cargo install toktop --locked

Usage

bash
# 1. Set Environment Variables
export OPENAI_ADMIN_KEY="your-openai-key"
export ANTHROPIC_ADMIN_KEY="your-anthropic-key"
toktop

# 2. Use env file
toktop -e .env

# 3. Don't set env var, toktop will prompt for api key
toktop

Hotkeys

  • ←/→ - Switch between options columns (Provider, Metrics, Date Range, Group By)
  • ↑/↓ - Choosing options
  • h/l - Scrolling charts if scroll bar is present
  • r - Refresh data
  • q - Quit the application

API Keys

OPENAI

It requires $OPENAI_ADMIN_KEY from https://platform.openai.com/settings/organization/admin-keys with READ permission to Management API Scope and Usage API Scope.

It tracks two data:

  1. Cost: GET /v1/organization/costs
  2. Usage:
    • GET v1/organization/usage/completions
    • GET v1/organization/usage/embeddings
    • GET v1/organization/usage/images

To group by API Keys, it also needs read access to the following endpoint:

  1. Get project ids: GET v1/organization/projects
  2. Get api key names from projects: GET v1/organization/projects/{project_id}/api_keys

ANTHROPIC

It requires $ANTHROPIC_ADMIN_KEY from https://console.anthropic.com/settings/admin-keys.

It tracks two data:

  1. Cost: GET /v1/organizations/cost_report
  2. Usage: GET /v1/organizations/usage_report/messages

Others

I would love to track my other LLM spends from Gemini and Cursor as well. Unfortunately, Cursor Admin API requires enterprise plan, which I don't have at the moment. Gemini does not seem to expose usage/cost in API in the same manner.

Issues· 5 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustanthropicllmopenairust

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类AI 编程
定价开源

> 相关工具

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.