The config.json file: shape, reserved keys, and week-start rules
August 13, 2026 · View on GitHub
Looking for the list of settings you can change? That is
commands/config.md, which documents every key
cctally config set accepts, its values, its default, and whether the
dashboard can write it. This page covers the file itself: where it lives,
what it looks like on disk, the reserved collector.* block, and how the
week-start fallback resolves.
config.json lives at ~/.local/share/cctally/config.json and is
auto-created on first run with a random collector token.
Shape
{
"collector": {
"host": "127.0.0.1",
"port": 17321,
"token": "<32-hex-chars, generated on first run>",
"week_start": "monday"
}
}
| Key | Type | Default | Used by |
|---|---|---|---|
collector.host | string | 127.0.0.1 | reserved for an HTTP collector mode (not currently wired in the CLI surface) |
collector.port | int | 17321 | reserved (see above) |
collector.token | string | random 32 hex chars | reserved (see above) |
collector.week_start | string | monday | week-boundary fallback for sync-week / report / weekly / codex-weekly when no explicit --resets-at or --week-start-name override is supplied |
The four collector.* keys above are reserved: they are read from the
file but are not cctally config set keys, so they do not appear in the
allowed-keys table. Edit them in the file.
A real config.json holds keys of three kinds, and knowing which kind you
are looking at tells you how to change it.
- Settable keys. Most of what you will see — the
display,alerts,budget,dashboard,update,statusline,telemetry,conversation,storageandcodexblocks — is written bycctally config setand is documented in the allowed-keys table. - The reserved
collector.*block described above. - Keys the CLI reads from the file but does not let you set. These are
hand-edited and do not appear in the allowed-keys table. The
oauth_usageblock is one, documented incommands/refresh-usage.md; thealerts.weekly_thresholdsandalerts.five_hour_thresholdslists are two more, documented incommands/alerts.md. This is not a complete inventory: when a key is absent from the allowed-keys table, read the page for the command that consumes it.
Allowed week_start values: monday, tuesday, wednesday, thursday,
friday, saturday, sunday.
Week-start resolution order
For commands that bucket by subscription week (sync-week, report,
weekly, codex-weekly):
--resets-atepoch from the most recent usage snapshot (hour-accurate anchor; only Claude side, only whenweekly_usage_snapshotshas data)- Explicit
--week-start-nameflag (when the command supports it) collector.week_startfromconfig.json- Hard default
monday
codex-weekly skips step 1 (no Codex equivalent of --resets-at).
Precedence vs. embedded defaults
The collector.* block only overrides what's listed above; every other
setting is documented in commands/config.md. Model
pricing (CLAUDE_MODEL_PRICING, CODEX_MODEL_PRICING) is hardcoded in the
script and not configurable — see
architecture.md for why.
Editing safely
The file is plain JSON. Edit it however you like; the CLI re-reads it on every invocation.
If the file is malformed, the loader prints one warning to stderr and falls
back to in-memory defaults for that invocation. It does not rewrite the
file, so your edits are still there — fix the JSON and the next run picks
it up. The bad bytes are only replaced when something legitimately saves the
config (a cctally config set, or a dashboard settings save), which writes
the whole file atomically under the writer lock.
Prefer cctally config set over hand-editing where a key supports it: it
validates the value before persisting, so a written config never fails a
later read.