Skip to content

Commit b857563

Browse files
committed
Remove legacy ~/.brain/.env from env lookup and add .vscode/launch.json (CLI debug configs)
1 parent e68e9f2 commit b857563

File tree

2 files changed

+96
-1
lines changed

2 files changed

+96
-1
lines changed

.vscode/launch.json

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Python Debugger: Current File",
9+
"type": "debugpy",
10+
"request": "launch",
11+
"program": "${file}",
12+
"console": "integratedTerminal"
13+
},
14+
{
15+
"name": "Brain CLI: Diary Link",
16+
"type": "debugpy",
17+
"request": "launch",
18+
"module": "brain_cli.main",
19+
"args": ["diary", "link"],
20+
"console": "integratedTerminal",
21+
"justMyCode": true,
22+
"env": {
23+
"PYTHONPATH": "${workspaceFolder}"
24+
}
25+
},
26+
{
27+
"name": "Brain CLI: Diary Create",
28+
"type": "debugpy",
29+
"request": "launch",
30+
"module": "brain_cli.main",
31+
"args": ["diary", "create"],
32+
"console": "integratedTerminal",
33+
"justMyCode": true,
34+
"env": {
35+
"PYTHONPATH": "${workspaceFolder}"
36+
}
37+
},
38+
{
39+
"name": "Brain CLI: Plan Create",
40+
"type": "debugpy",
41+
"request": "launch",
42+
"module": "brain_cli.main",
43+
"args": ["plan", "create"],
44+
"console": "integratedTerminal",
45+
"justMyCode": true,
46+
"env": {
47+
"PYTHONPATH": "${workspaceFolder}"
48+
}
49+
},
50+
{
51+
"name": "Brain CLI: Diary Report (7 days)",
52+
"type": "debugpy",
53+
"request": "launch",
54+
"module": "brain_cli.main",
55+
"args": ["diary", "report", "7"],
56+
"console": "integratedTerminal",
57+
"justMyCode": true,
58+
"env": {
59+
"PYTHONPATH": "${workspaceFolder}"
60+
}
61+
},
62+
{
63+
"name": "Brain CLI: Custom Command",
64+
"type": "debugpy",
65+
"request": "launch",
66+
"module": "brain_cli.main",
67+
"args": ["${input:command}", "${input:subcommand}", "${input:args}"],
68+
"console": "integratedTerminal",
69+
"justMyCode": true,
70+
"env": {
71+
"PYTHONPATH": "${workspaceFolder}"
72+
}
73+
}
74+
],
75+
"inputs": [
76+
{
77+
"id": "command",
78+
"type": "pickString",
79+
"description": "Select command",
80+
"options": ["diary", "plan", "cost"],
81+
"default": "diary"
82+
},
83+
{
84+
"id": "subcommand",
85+
"type": "promptString",
86+
"description": "Enter subcommand (e.g., create, link, report)",
87+
"default": "link"
88+
},
89+
{
90+
"id": "args",
91+
"type": "promptString",
92+
"description": "Enter additional arguments (optional)",
93+
"default": ""
94+
}
95+
]
96+
}

brain_core/config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ def __init__(self, env_file: Path | None = None, validate_paths: bool = True):
4545
env_locations = [
4646
Path.cwd() / ".env", # Current directory (highest priority)
4747
Path.home() / ".config" / "brain" / ".env", # XDG config dir
48-
Path.home() / ".brain" / ".env", # Legacy location
4948
]
5049

5150
env_found = False

0 commit comments

Comments
 (0)