Skip to main content

Configuration

The Token Usage Dashboard reads its settings from the file config.toml. For a release it lives in the application directory, for a clone next to app.py. If it is missing, the first start creates it with default values and points out that you should check the path.

Settings in the Token Usage Dashboard config.toml​

This is what a Token Usage Dashboard config.toml looks like:

config.toml
[data]
directory = "~/Library/Application Support/Claude-Code-Usage"

[server]
host = "127.0.0.1"
port = 8000
open_browser = true

The following table explains the keys in the Token Usage Dashboard config.toml and their defaults:

KeyMeaningDefault
data.directorydata directory with the JSON filesper system, see below
server.hostaddress the server binds to127.0.0.1
server.portserver port8000
server.open_browseropen the browser automatically after the starttrue

Missing keys fall back to their defaults individually, not the whole section. An unusable port, or a section that is not a table, produces a console note and is replaced. Broken TOML, by contrast, ends the start with an error message.

The Token Usage Dashboard data directory​

The following table shows the default path of the Token Usage Dashboard data directory on each system:

SystemDefault path
macOS~/Library/Application Support/Claude-Code-Usage
Linux~/.local/share/claude-code-usage (below $XDG_DATA_HOME when set)
Windows%LOCALAPPDATA%\Claude-Code-Usage
  • ~ is expanded.
  • A relative path is resolved relative to config.toml. For sample data in a sample-data folder next to app.py, directory = "sample-data" is therefore enough.
  • On Windows the dashboard writes the absolute path as a TOML string with doubled backslashes ("C:\\Users\\...\\Claude-Code-Usage"), because %LOCALAPPDATA% is not expanded when reading. If you enter a Windows path by hand, double the backslashes or put it in single quotes: 'C:\Users\...'.

If the directory does not exist, or holds no file matching YYYY-MM.json, the start aborts. The message names the path that was checked and the config.toml it came from.

Where the data directory may live and which files it contains is described under Data directory.

The installer and config.toml

The installer writes the chosen data directory into a new config.toml. It does not overwrite an existing file. If that file names a different data directory than the chosen one, it points this out.

Token Usage Dashboard security​

The Token Usage Dashboard is a local tool for one person on their own machine. It has:

  • no authentication: anyone who reaches the port sees everything.
  • no authorization: there are no roles.
  • no encryption: the server speaks HTTP, not HTTPS.

That is why the server binds to 127.0.0.1. Leave host as it is and do not set it to 0.0.0.0: that opens the data to the whole network. The same applies behind a tunnel or reverse proxy without access control of its own.

The data is not harmless. It contains project paths and costs, and so allows conclusions about your work, your customers and your ventures.