A lightweight analytics platform for Claude Code. Track how your team uses skills, tools, and workflows — across any number of projects and organizations.
- Go to railway.app and create a new project
- Add a service → Deploy from GitHub repo → select
Aark2g-Labs/lumen - Add a service → Database → PostgreSQL
- Railway automatically injects
DATABASE_URL— no extra config needed - Optionally set
ADMIN_SECRETin the app service's environment variables to restrict org creation - Once deployed, visit
https://your-app.railway.app/setupto create your first org
# Create a local Postgres DB
createdb lumen
# Install dependencies
pip install -r requirements.txt
# Configure
cp .env.example .env # edit DATABASE_URL if needed
# Run
uvicorn app.main:app --reload --port 8765| Variable | Required | Description |
|---|---|---|
DATABASE_URL |
Yes | PostgreSQL connection string (set automatically by Railway) |
ADMIN_SECRET |
No | If set, required when creating orgs via /setup or POST /orgs |
- Visit
/setup— enter your org name, copy the API key shown - Visit
/login— paste the API key to access your dashboard - Add the hook below to start tracking skill usage
Add this to .claude/settings.json (project or global ~/.claude/settings.json):
{
"hooks": {
"PostToolUse": [{
"matcher": "Skill",
"command": "skill=$(cat | python3 -c \"import sys,json; d=json.load(sys.stdin); print(d.get('tool_input',{}).get('skill','unknown'))\" 2>/dev/null || echo unknown); curl --max-time 2 -s -X POST https://your-app.railway.app/events -H 'Content-Type: application/json' -H 'Authorization: Bearer $LUMEN_API_KEY' -d \"{\\\"event\\\": \\\"skill_used\\\", \\\"properties\\\": {\\\"skill\\\": \\\"$skill\\\"}, \\\"user\\\": \\\"$(git config user.email 2>/dev/null)\\\", \\\"project\\\": \\\"$(basename $(git rev-parse --show-toplevel 2>/dev/null) 2>/dev/null)\\\"}\" > /dev/null 2>&1 &"
}]
}
}Set LUMEN_API_KEY=your_api_key in each developer's shell environment (e.g. ~/.zshrc).
{
"event": "skill_used",
"properties": { "skill": "jira-ticket" },
"user": "kshitiz@company.com",
"project": "my-repo",
"timestamp": "2026-06-17T14:00:00Z"
}All fields except event are optional. properties is free-form JSON.
| Method | Path | Auth | Description |
|---|---|---|---|
GET/POST |
/setup |
None* | Create an org, get an API key |
POST |
/orgs |
None* | Create an org (JSON API) |
POST |
/events |
Bearer <api_key> |
Ingest an event |
GET |
/login |
— | Sign in with API key |
GET |
/dashboard |
Cookie session | View analytics dashboard |
GET |
/health |
None | Health check |
* If ADMIN_SECRET is set, org creation requires it.