Files
FinalToken/README.md
T
Florian Schmidt 50ac2aad3a fix: probe Claude from the GUI app and close integration gaps
- A GUI-subsystem host has no console code page, so .NET decoded the
  probes' UTF-8 output with code page 0 and Claude's /usage separators
  never matched: Claude showed as unavailable in the app but not in the
  CLI. Probe output is now decoded as UTF-8 and every probe gets valid
  standard handles, with stdin closed unless it is the Codex RPC. A
  GUI-subsystem test host reproduces it.
- The /usage parser stops at the contributing section and only reports
  lines that start like a limit line.
- snapshot.json no longer defaults appPath to the reader's own path. The
  app passes its path to the engine and a CLI refresh keeps it, so a
  Stream Deck key always starts the app (D9, D10).
- The CLI is finaltoken-cli on every platform: FinalToken.exe and
  finaltoken.exe cannot share a folder on Windows.
- Day series follow the local calendar day, as Today does.
- The dev-only migration from the first store format is gone.
- README.md is a short user guide.

Refs #1
2026-10-14 20:39:53 +02:00

58 lines
2.8 KiB
Markdown

# FinalToken
FinalToken is a tray app for Claude Code and Codex usage. It shows token history, provider limits,
and pace, warns when usage runs ahead of or behind a limit, and puts selected stats on Stream Deck
keys. Starting the app opens the stats panel; closing it keeps the tray app running by default.
FinalToken does not sign in to a provider, handle API keys or OAuth tokens, or read credential
files. It reads the installed CLIs' usage files and runs their local commands. It never calls a
provider's HTTP API itself. Missing or logged-out CLIs show as unavailable.
## Requirements
- Claude Code and/or Codex CLI installed and logged in through the CLI. Their paths can be
overridden in Settings.
- Windows 11, or Linux with X11 or XWayland. CachyOS with KDE Plasma uses XWayland.
- For keys: Stream Deck 7 on Windows, or OpenDeck on Linux. These are optional.
## Install and use
Extract the published ZIP to a folder and run `FinalToken.exe` on Windows or `FinalToken` on
Linux. Keep the `streamdeck` folder beside the app. Open, Refresh, Settings and Quit are in the
tray menu. Start with the OS is opt-in.
Data lives in `%LOCALAPPDATA%\FinalToken` on Windows and `~/.local/share/FinalToken` on Linux.
`FINALTOKEN_DATA_DIR` overrides it. FinalToken keeps its own history after the CLIs remove their
files. A fresh install imports Claude entries from the last 60 days. `snapshot.json` is the
shared output for the plugin and CLI.
Settings has three Stream Deck install modes: **Off**, **Ask** (default), and **Automatic**.
Ask offers Install or Update and Not now. Automatic installs or updates the shipped plugin when
a host is found; it stops and restarts a running host. Off installs nothing.
Add the plugin's **Stat** action to a key, then select a provider and metric in its inspector.
Pressing the key opens the app's panel; missing or stale data shows offline.
## CLI
Run `finaltoken-cli status [--json] [--no-probe]`. Use `./finaltoken-cli` on Linux or
`.\finaltoken-cli.exe` in PowerShell when running from the extracted folder.
It scans, probes limits and prints a snapshot. `--no-probe` reads usage files only.
When the app holds the store lock, the CLI reads its existing snapshot without refreshing.
Exit codes are 0 for success, 1 for failure and 2 for bad arguments.
## Build from source
Use .NET SDK 10.0.100 or newer within .NET 10, Python 3, and the target OS's NativeAOT C++
toolchain. Run from the repository root, as described in [AGENTS.md](AGENTS.md):
```text
dotnet build FinalToken.slnx -c Release
dotnet test --solution FinalToken.slnx -c Release
python -B tools/docs/check_docs.py
python -B tools/publish.py win-x64 --out artifacts/package-win-x64
```
The publish directory must be empty. The tool bundles all three executables and plugin assets,
then creates a ZIP beside the directory. Publish `win-x64` on Windows and `linux-x64` on Linux.