Skip to content

Releases: zzstar101/mytoken

MyToken!!!!! 0.5.1

Choose a tag to compare

@github-actions github-actions released this 19 Oct 15:18

Full Changelog: v0.5.0...v0.5.1

MyToken!!!!! 0.5.0

Choose a tag to compare

@github-actions github-actions released this 19 Oct 14:05

Full Changelog: v0.4.1...v0.5.0

MyToken!!!!! 0.4.1

Choose a tag to compare

@github-actions github-actions released this 14 Oct 13:29

Full Changelog: v0.4.0...v0.4.1

  • A leftover backup no longer blocks an upgrade. If an earlier attempt
    left a mytoken.db.pre-provider-v1.db or mytoken.db.pre-instance-v1.db
    behind, the migration writes its own backup beside it under a timestamped
    name instead of refusing to start, and the error message names the file it
    actually tried. Nothing is ever overwritten, reused or deleted.
  • A failed start says so in a window. A database or migration error used
    to quit without showing anything; it now opens a window with the error, the
    database path, what to do about it, a button to reveal the data folder and
    a way to quit.
  • The sources card lists your sources again. The card could come up with
    only its subtitle once the settings page had been reloaded, as if no tool
    had ever been found.
  • Codex quota shows the last reading the logs contain. Quota was only
    published while new records were being indexed, so a source that was
    already fully scanned never reported anything at all. A bounded read of the
    tail of the newest rollout files now finds the most recent usable reading
    without rescanning events, advancing cursors or guessing from tokens, and
    the card states the age of the reading and why a pace cannot be computed.
  • Claude quota says when there is nothing to read. The card marks a
    credentials file that is not there instead of offering it as ready, and
    still reads nothing until you enable it.
  • The settings page stops re-running its heavy panels on every commit.
    Each store commit re-ran the pricing, source and 90-day scope queries, which
    kept the load queue busy while the page was open. They now load when the
    page is opened or when their own data changes.
  • The provider ranking merges one endpoint into one row. Unidentified
    endpoints were keyed per session, so a single provider appeared once for
    every conversation.

MyToken!!!!! 0.4.0

Choose a tag to compare

@github-actions github-actions released this 14 Oct 08:15
  • Rebuilt on MyGo 0.4.8. Charts, tables, selectors and search boxes are
    now the framework's own controls, so keyboard navigation, screen readers
    and animation come from the platform: data tips follow the arrow keys and
    are announced, the sidebar is a labelled tab list, and the sliding
    highlight is a real transition instead of a per-frame animation. The
    five-colour theme, the glass panels and each page's own accent are
    unchanged.
  • More than one copy of a tool. Settings › Sources can add, move, remove
    and promote sources, including turning a backup copy of a folder into a
    live one. Every copy keeps a stable id, so sessions, cache rows, providers
    and reports never mix two installations. An explicit path that is wrong is
    now reported as an error instead of silently falling back to a default.
  • Providers by identity, not by name. Requests are grouped by the
    endpoint they came from, so a renamed alias or a moved domain no longer
    splits the statistics and two accounts behind one relay keep their own
    billing. Renaming a provider changes its label only.
  • mytoken snapshot --once --json, a versioned JSON envelope with
    freshness, source and diagnostics for scripts and status bars, plus
    mytoken statusline, mytoken report day|week|month and
    mytoken report --by branch. Read-only commands never write to the
    database, even while another copy of MyToken is running.
  • Know why a source is empty. Settings and mytoken doctor say whether a
    source has no data because it was never scanned, has no token counts,
    cannot be read, or is not supported — instead of showing a silent zero.
  • Budget alerts (Settings › Budget): notify when a day, week or month
    crosses 80% or 100% of a limit, at most once per period, from estimated
    cost. Alerts stay off until a fixed IANA timezone is selected, because day
    boundaries are otherwise undefined.
  • Quotas. Codex rate limits are read from its own logs, offline, and a
    fresh unusable reading never replaces a usable older one; quota list,
    quota status and the countdown come from the percentages the provider
    reports. Claude's quota is opt-in and off by default: enabling it shows the
    exact credential source and endpoint first, never refreshes tokens, and can
    be turned off from the CLI while the app runs.
  • Live speed in the tray: committed output tokens per second over the
    last minute, labelled as a measurement of committed output and not of model
    generation speed. mytoken statusline shows the same.
  • Branch reports: usage grouped by the git branch a session's own records
    name, with worktrees of one repository folded together; contradictory
    evidence is reported as unknown rather than guessed.
  • The Windows installer is still unsigned and macOS builds are ad-hoc signed;
    the second batch of supported tools has not been checked against real logs
    yet.

Full Changelog: v0.3.0...v0.4.0

MyToken!!!!! 0.3.0

Choose a tag to compare

@github-actions github-actions released this 11 Oct 12:31

A cache ledger: which prompts should have hit the prompt cache, which didn't, why, and what that cost. Plus six more tools.

0.2.2 and later update themselves to this version (MyToken › Settings › Check for updates, or wait for the daily check).

The first launch upgrades your database once. Each request gets a few cache columns (about 5 bytes per request), then the ledger is computed over your whole history — a few seconds, up to ~10 s on a 200K-request history. The upgrade is one-way: an older MyToken can't open the database afterwards.

Cache ledger

  • New Cache page. For every request whose prompt should have been read back from the cache, MyToken checks whether it was. Misses get a reason:
    • Compacted — the conversation was summarised, so the prefix is new (compaction markers from Codex, Claude Code, DeepSeek Harness, Pi, OpenCode and WorkBuddy logs).
    • Expired — too long between turns (Anthropic 5 min / 1 h, OpenAI ~10 min, DeepSeek 1 h).
    • Model changed — caches don't carry across models.
    • No visible reason — same prefix, not expired, still missed. Often a relay that doesn't pass caching through, or routes you to another upstream.
  • It adds up the tokens sent again and what they cost (actual cost minus the cost had they hit), by day, by cause, by provider and by session. Each provider gets a cache health figure: unexplained misses as a share of what should have hit.
  • Cache timeline in each session: one bar per request, coloured by what was read, missed (and why) and new; compactions are marked.
  • mytoken cache in the terminal: totals by cause, --by provider|model|harness|project|session, or mytoken cache <session> for a request-by-request table. --json / --csv as usual.
  • It works for every tool from token counts alone — no prompts are read. Side requests and branch switches inside a session (Pi, DeepSeek Harness) are recognised and not counted as misses. Sessions whose tool reports no cache figures at all are shown as not cacheable and left out.
  • Read "no visible reason" with care: on the history it was tuned on it is 84% of missed tokens but only 1.8% of what should have hit. It tells you where to look, not that a relay is broken.

Six more tools

Amp, Kiro, Zed, Antigravity, Codebuff and Mux are read now. None of them has been checked against real logs yet — if the numbers look off, please open an issue.

Fixes

  • Pi's compaction requests are counted (their usage records failed to parse and were skipped).
  • OpenCode compactions are recognised, so the request after one isn't blamed on the relay.
  • Hit rates never exceed 100% when a request reads back more than its own earlier prompt (a prefix shared with another session).

Roadmap · How the cache ledger decides · Full Changelog: v0.2.3...v0.3.0

MyToken!!!!! 0.2.3

Choose a tag to compare

@github-actions github-actions released this 11 Oct 07:50

A lighter tray, less background CPU, and tidier relay prices.

0.2.2 updates itself to this version (MyToken › Settings › Check for updates, or wait for the daily check).

Faster and lighter

  • Closing the main window frees it. It used to stay alive hidden, keeping its graphics buffers and glyph caches. MyToken in the menu bar now uses about 90–100 MB instead of about 210 MB; opening the window again builds it anew in a few milliseconds. (Measured on a 214K-request history.)
  • Less CPU while agents work. A change to one log no longer reopens all ~2,000 logs: files whose size and time did not change (including SQLite -wal files) are skipped, with a full pass every 2 minutes as a safety net. Project paths are tidied from a small table instead of every request. Background CPU while agents write went from about 19% to about 7%.

Fixes

  • The pricing page shows your own multiplier for each provider (or the one imported from cc-switch). Before, it could show one synced from a relay or an old dated rule, and saving the page then turned that into a rule of yours that no longer followed the relay.
  • Relays add prices only for the models you used with them in the last 90 days or that appear in their bills, not for every model in their price list (one site added 210 rules for 3 models; 244 rules → 40 on the machine tested). A failed price-list fetch keeps the existing rules.

New

  • Droid and Forge show their own logos, OpenClaude its green mark.
  • Forge data in the older ~/forge folder is read too.

Roadmap · Full Changelog: v0.2.2...v0.2.3

MyToken!!!!! 0.2.2

Choose a tag to compare

@github-actions github-actions released this 10 Oct 12:31

Fixes a fresh install that shows no data and cannot check for updates.

If you are on 0.2.1 and have a large tool folder (for example Hermes in ~/.hermes), 0.2.1 cannot update itself to this version: download the DMG / installer below and install over it once. Your data is kept. From 0.2.2 on, updates work again.

Fixes

  • No data and failing update checks. MyToken watched every folder under each tool's home for changes, including whole programs installed there (Hermes keeps its own code in ~/.hermes). On macOS each watched file holds a file descriptor, so the app hit the system's limit (about 92,000) — then it could not read any logs, and the update check failed with proxyconnect tcp … socket: too many open files or similar. MyToken now watches only the folders that hold logs: about 4,000 open files instead of 92,000 on the machine that found it.
  • A log that failed to parse on the first scan no longer stops live updates.

Changes

  • Settings › Sources lists only the tools that have data, with their request counts and log folders; the other supported tools are counted in one line.
  • WorkBuddy shows its own logo.
  • The About card shows the real version.

Roadmap · Full Changelog: v0.2.1...v0.2.2

MyToken!!!!! 0.2.1

Choose a tag to compare

@github-actions github-actions released this 10 Oct 12:03

Automatic updates: this is the last version you need to download by hand.

Coming from 0.2.0? Install this one manually; from here on MyToken updates itself. No database change this time.

New

  • Automatic updates. Once a day MyToken asks github.com whether there is a new version and shows its notes: install, skip it, or be reminded later. Updates are signed, and from a recent version only the changed parts are downloaded.
  • Settings has a switch for the daily check and a Check for Updates button with the current version.

Builds that can't replace themselves never check: development builds and the Debian package (apt updates those). The command line never checks either.

Privacy

By default MyToken now makes two kinds of request: the price table, and the daily update check on github.com, which carries nothing but the request itself. Settings turns the check off. Relay reconciliation is still off until you turn it on, site by site.

Fixes

  • The sidebar's "Up to date" now reads "Data up to date": it was always about the scan of your logs, not the app's version.

Next (0.2.2): ratio changes dated at the request where the site changed them, and sub2api peak-hour multipliers in local estimates.

Roadmap: docs/ROADMAP.md · Full Changelog: v0.2.0...v0.2.1

MyToken!!!!! 0.2.0

Choose a tag to compare

@github-actions github-actions released this 10 Oct 11:47

Relay reconciliation: see what your relay charged next to what your own logs say it should have, and where the difference comes from.

First launch upgrades the database in place, one way, and reprices every request once (relay price rules now depend on the tool that made the request). Back up ~/Library/Application Support/MyToken (macOS), %AppData%\MyToken (Windows) or ~/.local/share/mytoken (Linux) first if you may want to go back to 0.1.3.

Privacy

Still one network request by default (the price table). Relay reconciliation is off until you turn it on, site by site. It only uses the key you already gave that site, only talks to that site, and only reads. Keys are never written to disk or to logs.

New

  • Relay reconciliation for new-api and sub2api relays, plus balances for some official APIs. Turn on a site and pick what to fetch:
    • Ratios. The site's model prices and group multipliers become dated price rules, so local estimates use the site's own prices from then on.
    • Balance.
    • Charges. new-api: each request's charge, matched to your local requests. sub2api: daily usage.
  • Reconciliation page in the main window: local estimate vs. charged, the implied multiplier, and a waterfall that splits the difference into matched, price differs, token counting differs, charge only (another device or tool used the key), local only and refunds. Also broken down by model and by day.
  • Tray shows the balances of the sites you turned on.
  • CLI: mytoken relay list|enable|disable|sync and mytoken reconcile <site>, with --json / --csv. Balances keep the site's currency (no conversion).
  • 12 more tools: WorkBuddy, CodeBuddy, Hermes, Claude Desktop, Qwen Code, Kimi CLI, OpenClaude, Grok CLI, OpenClaw, Droid, Goose and Forge (22 in total). Parser approach for several follows codeburn (MIT).
  • Keys are found in cc-switch (every provider) and in each tool's own config.

Tested on real relays

  • Price rules are kept per key and per tool. Keys of one site can bill in different groups, and they no longer overwrite each other's rules. Rules left over from earlier builds are cleaned up.
  • new-api 1-hour cache writes are priced at their own rate (Claude bills them at 8× instead of 5×).
  • A site's ratio or balance endpoint failing no longer stops the sync. Rate limits (HTTP 429) are retried once.
  • A key with several sites' providers behind it only gets charged for requests it can be shown to have served.

Fixes

  • macOS: the window buttons overlapped the sidebar; they now sit inside it.
  • Tables in the CLI line up with Chinese text.
  • Negative amounts printed as "<$0.01".

Known limits

  • Local logs can't tell 1-hour from 5-minute cache writes, so sites that bill 1-hour writes show a steady price differs gap.
  • sub2api only reports daily totals, so it can't show which of your tools a charge came from.
  • Time-of-day pricing (peak multipliers, tiered expressions) isn't applied to local estimates yet. Ratio changes are dated when MyToken first sees them. Both are planned for 0.2.1.

Roadmap: docs/ROADMAP.md · Relay design: docs/RELAY.md · Full Changelog: v0.1.3...v0.2.0

MyToken!!!!! 0.1.3

Choose a tag to compare

@github-actions github-actions released this 09 Oct 13:38

The 0.1.x foundation: correct relay pricing, a fast store, and a lighter tray.

First launch upgrades the database in place, one way. Back up ~/Library/Application Support/MyToken (macOS), %AppData%\MyToken (Windows) or ~/.local/share/mytoken (Linux) first if you may want to go back to 0.1.1. The upgrade keeps every event (verified field by field on 206K events).

Fixes

  • Relay multipliers are no longer overridden by model prices. A model price rule (for example one imported from cc-switch) used to replace the provider's multiplier: a 0.3× relay billed Sonnet input at $3/M instead of $0.90/M. Unit prices and multipliers are now looked up separately.
  • Quit works. The tray's Quit, Cmd+Q and SIGTERM did nothing, because closing the main window was always turned into hiding it.
  • History survives a full rescan. Rescanning no longer wipes events whose source logs are gone (Claude Code deletes logs after 30 days).
  • OpenCode: assistant messages in the v2 session_message table that were older than the newest v1 message were skipped for good.
  • Claude Code: an idle session rewrote its cursor on every scan.
  • stats --by day columns lined up wrong.

Faster and lighter

  • Switching the period in the main window: 2.7–8.2 s → about 20 ms. Queries now read daily rollups in SQL; every query is under 15 ms on 200K events.
  • Database: 587 → 284 bytes per request.
  • While agents are writing logs: CPU ≈93% → 8–14%, memory footprint 342 MB → about 120 MB. Hidden windows no longer reload, and scans are spaced at least 2 s apart.

New

  • Price rules can take an effective date, so a relay's price change applies only from that day on.
  • CLI: --until, --last 7d|today|week|month, --timezone, --offline, --no-cost, --format table|json|csv.
  • Cost provenance: totals split log-reported and estimated cost; --json events carry costSource.
  • doctor lists provider sources (cc-switch, harness configs) and how many requests each attributed.

Roadmap: docs/ROADMAP.md · Full Changelog: v0.1.1...v0.1.3