Skip to main content

Installation

For regular use, install the dashboard from the release package. The installer sets up the dashboard, the data directory and the nightly exports. If you want to work on the source code or see every step yourself, read Running from source.

System requirements for the Token Usage Dashboard​

The Token Usage Dashboard alone needs only Python and a browser. The export chain, which fills the data directory, additionally needs Node.js and ccusage.

The following table lists the components the Token Usage Dashboard and its export chain need, with minimum version and purpose:

ComponentRequiredMinimumWhat for, and what is missing without it
Pythonyes3.11dashboard, installer and export scripts
Web browseryesChrome/Edge 111, Firefox 113, Safari 16.2the interface; older browsers lose at least the row highlight in tables
Claude Code and/or Codexfor live data–their local session logs are what ccusage evaluates
Node.js with npmfor live data22installs and starts ccusage
ccusagefor live data20.0.16all exports except RTK; the first version with daily --by-agent for the Claude/Codex split
rtkno0.7.1only the RTK tab; without rtk the rtk-daily job and the rtk/ directory are left out
Schedulerno–the nightly exports: launchd (macOS), systemd or cron (Linux), Task Scheduler (Windows)

The following table lists the operating systems for the Token Usage Dashboard's export chain (the dashboard alone runs wherever Python 3.11 runs):

SystemMinimumWhy
Windows10 or 11, x64 or ARM64Node.js 22; ccusage ships native binaries for x64 and ARM64 only
macOS14 Sonoma, Apple silicon or Intelthe native ccusage binaries are built for macOS 14.0
Linuxglibc 2.28, x64 or ARM64Node.js 22

To check the versions:

python3 --version # 3.11 or higher; on Windows: py -3 --version
node --version # v22 or higher
ccusage --version # 20.0.16 or higher
rtk --version # 0.7.1 or higher, optional

Install ccusage with npm install -g ccusage. Do not install it with --omit=optional: the native binary is then missing, and ccusage reports “native binary is not available”.

On Windows you get Python from python.org or with winget install Python.Python.3.13, on macOS for example from Homebrew (brew install python), on Linux from the package manager.

Try it without ccusage and rtk

If both tools are missing, the installer offers demo mode with sample data.

No administrator rights needed for the installation​

The Token Usage Dashboard installer writes only below your own user profile and asks for no elevation on any system. On Windows the application goes to %LOCALAPPDATA%\Programs, the data to %LOCALAPPDATA%. The tasks are registered for your user without a stored password. The server listens on 127.0.0.1 on a port above 1024, so the Windows firewall does not ask.

With a standard account on Windows you need:

  • Python installed for your user only (python.org installer with “Install for all users” unticked, or winget install --scope user Python.Python.3.13).
  • For the export chain, a Node.js whose global npm directory is writable for you, for example via nvm-windows in your profile.

Two things can still stop a standard account: a task folder \Token-Usage-Dashboard\ created by another account (schtasks then reports “access denied”), and policies such as AppLocker or Intune. In both cases, install with --no-jobs without scheduled jobs and start the exports by hand.

Installing the Token Usage Dashboard release package​

1. Download and unpack the release package​

Download the Token Usage Dashboard ZIP for your system from the release page on GitHub:

token-usage-dashboard-<version>-macos.zip
token-usage-dashboard-<version>-linux.zip
token-usage-dashboard-<version>-windows.zip

Unpack it anywhere, for example into Downloads. It contains a single folder of the same name. The installer refuses a ZIP for another system with exit code 2.

2. Run the Token Usage Dashboard installer​

This is how you start the Token Usage Dashboard installer on your system:

Open a terminal in the unpacked folder and run:

./install.sh

Both starters only look for Python 3.11 or newer and pass every argument on to install.py. The installer then takes these steps:

  1. Check versions. It checks Python, Node.js, ccusage, rtk and, on macOS, the system itself, and prints a table with the result per component (passt = fine, zu alt = too old, fehlt = missing, nicht lesbar = unreadable). If a required component is missing or too old, it ends with exit code 2 before writing anything. A missing ccusage does not block as long as rtk works, and the other way round. If it finds neither, it offers to abort or to switch to demo mode.
  2. Copy the application to the application directory (see the table below). You can delete the unpacked folder afterwards.
  3. Create the data directory with its subdirectories. rtk/ is created only when a working rtk was found.
  4. Copy the export scripts to <data>/bin. A release always replaces them, because it brings a consistent set.
  5. Write config.toml into the application directory. An existing config.toml is kept.
  6. Set up the export jobs with your system's scheduler, see Export chain.
  7. Export once, so the dashboard has data before the first night. A failure here is only a note; the scheduled job tries again.
  8. Write a start script: start-dashboard.sh on macOS and Linux, start-dashboard.cmd on Windows.

At the end it lists every note again and names the start script.

The following table shows where the installer puts the Token Usage Dashboard and its data directory on each system:

SystemApplication directoryData directory
macOS~/Library/Application Support/Token-Usage-Dashboard~/Library/Application Support/Claude-Code-Usage
Linux~/.local/share/token-usage-dashboard~/.local/share/claude-code-usage
Windows%LOCALAPPDATA%\Programs\Token-Usage-Dashboard%LOCALAPPDATA%\Claude-Code-Usage

On Linux both live below $XDG_DATA_HOME when that variable is set. Use --app-dir and --data-dir to choose other directories.

3. Start the Token Usage Dashboard​

You start the Token Usage Dashboard with the start script the installer wrote:

Run the start script in a terminal:

"$HOME/Library/Application Support/Token-Usage-Dashboard/start-dashboard.sh" # macOS
~/.local/share/token-usage-dashboard/start-dashboard.sh # Linux

The browser opens http://127.0.0.1:8000/ by itself. Press Ctrl+C in the window to stop the server.

Updating the Token Usage Dashboard​

To update the Token Usage Dashboard, run the installer from the newer package exactly as for the first installation. The application and the export scripts are replaced, config.toml and the data directory stay unchanged.

Removing the Token Usage Dashboard​

To remove the Token Usage Dashboard export jobs:

./install.sh --remove-jobs # on Windows: install.cmd --remove-jobs

If you created the jobs with --label-prefix or --scheduler, pass the same values again. On Linux without --scheduler, both the systemd timers and the cron block are removed, whichever exists.

The installer never deletes anything in the data directory. Delete the application and data directories by hand if you want to.

Token Usage Dashboard installer options​

The installer options are the same for install.sh, install.cmd and install.py, from a release or from a clone. The following table lists them with their effect:

OptionEffect
--with-jobsset up the export jobs; the default for a release, needed for a clone. Old name: --with-launchagents
--no-jobsno export jobs
--remove-jobsremove the export jobs and stop; data stays
--scheduler auto|launchd|systemd|cron|schtaskschoose the scheduler; auto picks launchd (macOS), the Task Scheduler (Windows), systemd (Linux with a user manager), cron otherwise
--label-prefix NAMEprefix of the job names, only together with jobs
--data-dir PATHdata directory instead of the default
--app-dir PATHapplication directory, release only
--forceoverwrite export scripts in <data>/bin that differ from the source (a release always does)
--dry-runshow what would happen, change nothing
--demodemo mode with sample data, without ccusage or rtk
--no-first-exportskip the first export run at the end

Installer demo mode​

For live data in the Token Usage Dashboard, at least ccusage or a working rtk must be installed. If the installer finds neither, it offers to abort or to activate demo mode. --demo chooses it directly.

Demo mode writes invented sample data into the chosen data directory and sets up no export jobs. The target must not contain existing dashboard data yet. Because there are no exports, the dashboard shows exactly one note in demo mode: “Export: no status”.

Moving the Token Usage Dashboard to another machine​

This is how you move the Token Usage Dashboard and its data to another machine:

  1. Copy the entire data directory. It is the archive and the only part that cannot be replaced.
  2. Install the release package with --data-dir <new path>. The installer creates config.toml, copies the export scripts and sets up the jobs with the new paths.
  3. Start every export once by hand and look at the logs, see Export chain.

The application itself contains no data.