Server (SvelteKit + SQLite Docker container) + per-machine agent that parses Claude Code JSONL transcripts. docker-compose one-command deploy; raw transcript view + search gated behind SHOW_TRANSCRIPTS (hidden by default). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
33 lines
1.2 KiB
YAML
33 lines
1.2 KiB
YAML
# toknmtr — self-hosted Claude Code usage & analytics dashboard (server half).
|
|
#
|
|
# Quick start:
|
|
# 1. cp .env.example .env
|
|
# 2. Edit .env — set API_TOKEN to a long random string: openssl rand -hex 32
|
|
# 3. docker compose up -d --build
|
|
# 4. Open http://localhost:3001
|
|
#
|
|
# The image contains ZERO data: the SQLite DB is created empty in the named volume
|
|
# `toknmtr-data` on first run. To get data in, run the agent on each of your machines
|
|
# (see README.md → "Feeding it data").
|
|
services:
|
|
toknmtr:
|
|
build: .
|
|
image: toknmtr:latest
|
|
container_name: toknmtr
|
|
restart: unless-stopped
|
|
ports:
|
|
# host:container — the app listens on 3000 inside the container (Dockerfile PORT).
|
|
- '3001:3000'
|
|
environment:
|
|
# Bearer token the agent must present to /api/ingest. REQUIRED — compose errors if unset.
|
|
API_TOKEN: ${API_TOKEN:?set API_TOKEN in .env (openssl rand -hex 32)}
|
|
DB_PATH: /data/toknmtr.db
|
|
BODY_SIZE_LIMIT: 64M
|
|
# Leave unset to HIDE the transcript view + full-text search (raw prompt/response text).
|
|
# Only set to "true" once the dashboard is behind auth. Default (unset) = hidden.
|
|
SHOW_TRANSCRIPTS: ${SHOW_TRANSCRIPTS:-}
|
|
volumes:
|
|
- toknmtr-data:/data
|
|
|
|
volumes:
|
|
toknmtr-data:
|