-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
31 lines (26 loc) · 1.51 KB
/
config.py
File metadata and controls
31 lines (26 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""
Claude Token Guard — configurazione
Modifica questo file prima di installare.
"""
import os
# ── Database ──────────────────────────────────────────────────────────────
# "sqlite" → zero setup, file locale (~/.claude-token-guard/tokens.db)
# "postgres" → richiede Postgres; imposta le variabili PG_* sotto
DB_TYPE = os.getenv("TOKEN_DB_TYPE", "sqlite")
# SQLite: path del file DB (auto-creato al primo avvio)
DB_SQLITE_PATH = os.path.expanduser(
os.getenv("TOKEN_DB_PATH", "~/.claude-token-guard/tokens.db")
)
# Postgres (solo se DB_TYPE=postgres)
PG_HOST = os.getenv("TOKEN_PG_HOST", "localhost")
PG_PORT = int(os.getenv("TOKEN_PG_PORT", "5432"))
PG_DB = os.getenv("TOKEN_PG_DB", "postgres")
PG_USER = os.getenv("TOKEN_PG_USER", "postgres")
PG_PASS = os.getenv("TOKEN_PG_PASS", "")
# ── Claude Code ───────────────────────────────────────────────────────────
# Path dei log di Claude Code (uguale su tutti i sistemi)
CLAUDE_PROJECTS_DIR = os.path.expanduser(
os.getenv("TOKEN_CLAUDE_DIR", "~/.claude/projects")
)
# ── Dashboard ─────────────────────────────────────────────────────────────
SERVER_PORT = int(os.getenv("TOKEN_PORT", "4002"))