@jeganwrites/claudash 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/config.py ADDED
@@ -0,0 +1,100 @@
1
+ """Claudash configuration.
2
+
3
+ Edit this file on first run, or use the browser UI at /accounts to manage
4
+ accounts after the DB is seeded. Config.py only seeds the database once — the
5
+ live source of truth after that is the `accounts` table in data/usage.db.
6
+ """
7
+ import os
8
+
9
+ # ─── Host settings ───────────────────────────────────────────────
10
+ # If you run Claudash on a VPS and reach it via SSH tunnel, set
11
+ # CLAUDASH_VPS_IP in your environment so banners and help text show
12
+ # the correct host. Defaults to "localhost" for a same-machine install.
13
+ VPS_IP = os.environ.get("CLAUDASH_VPS_IP", "localhost")
14
+ VPS_PORT = int(os.environ.get("CLAUDASH_VPS_PORT", "8080"))
15
+
16
+ # ─── Account Setup ───────────────────────────────────────────────
17
+ # Add your Claude accounts here. These are the seed values — once the
18
+ # DB is populated, edit accounts via the /accounts page in the browser.
19
+ #
20
+ # account_id: short slug (lowercase letters, digits, underscores)
21
+ # label: display name shown in dashboard
22
+ # plan: "max" | "pro" | "api"
23
+ # monthly_cost_usd: your subscription cost (for ROI math)
24
+ # window_token_limit: 1_000_000 for Max, 200_000 for Pro, 0 for API
25
+ # data_paths: folders where Claude Code writes JSONL session logs
26
+ # default is ["~/.claude/projects/"]; add more if you
27
+ # run multiple Claude Code installs or rsync in JSONL
28
+ # from other machines.
29
+ # color: teal | purple | blue | coral | amber (UI accent)
30
+
31
+ ACCOUNTS = {
32
+ "personal_max": {
33
+ "label": "Personal (Max)",
34
+ "type": "max",
35
+ "plan": "max",
36
+ "monthly_cost_usd": 100,
37
+ "window_token_limit": 1_000_000,
38
+ "data_paths": [
39
+ os.path.expanduser("~/.claude/projects/"),
40
+ ],
41
+ "color": "teal",
42
+ },
43
+ }
44
+
45
+ # ─── Project Map ─────────────────────────────────────────────────
46
+ # Maps folder-name keywords → project labels. Claudash walks the JSONL
47
+ # folder paths under each account's data_paths and looks for any of
48
+ # these substrings (case-insensitive) in the path.
49
+ #
50
+ # Empty on a fresh install — add your own. Example:
51
+ #
52
+ # PROJECT_MAP = {
53
+ # "MyProject": {"keywords": ["myproject", "-root-myproject"],
54
+ # "account": "personal_max"},
55
+ # "ClientWork": {"keywords": ["acme", "client-a"],
56
+ # "account": "personal_max"},
57
+ # }
58
+ #
59
+ # The DB is the live source of truth after first run. Edits here only
60
+ # take effect on `cli.py scan --reprocess` (which UPSERTs into the
61
+ # account_projects table).
62
+
63
+ PROJECT_MAP = {}
64
+
65
+ UNKNOWN_PROJECT = "Other"
66
+
67
+ # ─── Daily budget per account (USD, API-equivalent) ──────────────
68
+ # Set per account_id. Claudash compares today's cost to this value
69
+ # and fires BUDGET_WARNING / BUDGET_EXCEEDED insights.
70
+ # Set to 0 (or omit an account) to disable budget tracking.
71
+ #
72
+ # Example:
73
+ # DAILY_BUDGET_USD = {
74
+ # "personal_max": 20.0,
75
+ # "work_pro": 5.0,
76
+ # }
77
+
78
+ DAILY_BUDGET_USD = {}
79
+
80
+ # Per million tokens, USD
81
+ MODEL_PRICING = {
82
+ "claude-opus": {"input": 15.0, "output": 75.0, "cache_read": 1.5, "cache_write": 18.75},
83
+ "claude-sonnet": {"input": 3.0, "output": 15.0, "cache_read": 0.30, "cache_write": 3.75},
84
+ "claude-haiku": {"input": 0.25, "output": 1.25, "cache_read": 0.025, "cache_write": 0.30},
85
+ }
86
+
87
+ # Window settings per plan
88
+ MAX_WINDOW_HOURS = 5
89
+
90
+ # claude.ai web chat accounts — add yours here if using mac-sync.py browser tracking.
91
+ # Example:
92
+ # CLAUDE_AI_ACCOUNTS = [
93
+ # {"label": "Personal Max", "session_key": "", "org_id": ""},
94
+ # ]
95
+ CLAUDE_AI_ACCOUNTS = []
96
+
97
+ # Cost targets per project (for insights).
98
+ # Example:
99
+ # COST_TARGETS = {"MyProject": 0.10}
100
+ COST_TARGETS = {}