claude-brain 0.3.6 → 0.3.7

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/README.md CHANGED
@@ -28,7 +28,7 @@ A locally-running development assistant that bridges Obsidian knowledge vaults w
28
28
  # Install globally (requires Bun)
29
29
  bun install -g claude-brain
30
30
 
31
- # Interactive setup (vault path, log level, installs ~/CLAUDE.md)
31
+ # Interactive setup (vault path, log level, installs ~/.claude/CLAUDE.md)
32
32
  claude-brain setup
33
33
 
34
34
  # Register with Claude Code
package/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.6
1
+ 0.3.7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-brain",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "Local development assistant bridging Obsidian vaults with Claude Code via MCP",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -69,17 +69,19 @@ export async function runUpdate() {
69
69
  }
70
70
  console.log()
71
71
 
72
- // Step 2: Update CLAUDE.md
72
+ // Step 2: Update CLAUDE.md to ~/.claude/CLAUDE.md (where Claude Code reads it)
73
73
  const sourcePath = path.join(PACKAGE_ROOT, 'assets', 'CLAUDE.md')
74
- const destPath = path.join(os.homedir(), 'CLAUDE.md')
74
+ const claudeDir = path.join(os.homedir(), '.claude')
75
+ const destPath = path.join(claudeDir, 'CLAUDE.md')
75
76
 
76
77
  if (!existsSync(sourcePath)) {
77
78
  console.log(warningText(' CLAUDE.md asset not found in package, skipping'))
78
79
  } else if (!existsSync(destPath)) {
79
80
  await withSpinner('Installing CLAUDE.md', async () => {
81
+ await fs.mkdir(claudeDir, { recursive: true })
80
82
  await fs.copyFile(sourcePath, destPath)
81
83
  })
82
- console.log(successText(' CLAUDE.md installed to ~/CLAUDE.md'))
84
+ console.log(successText(' CLAUDE.md installed to ~/.claude/CLAUDE.md'))
83
85
  } else {
84
86
  const sourceContent = readFileSync(sourcePath, 'utf-8')
85
87
  const destContent = readFileSync(destPath, 'utf-8')
@@ -90,7 +92,21 @@ export async function runUpdate() {
90
92
  await withSpinner('Updating CLAUDE.md', async () => {
91
93
  await fs.copyFile(sourcePath, destPath)
92
94
  })
93
- console.log(successText(' CLAUDE.md updated to latest version'))
95
+ console.log(successText(' CLAUDE.md updated to ~/.claude/CLAUDE.md'))
96
+ }
97
+ }
98
+
99
+ // Clean up old ~/CLAUDE.md if it exists (from previous versions)
100
+ const oldDestPath = path.join(os.homedir(), 'CLAUDE.md')
101
+ if (existsSync(oldDestPath)) {
102
+ try {
103
+ const oldContent = readFileSync(oldDestPath, 'utf-8')
104
+ if (oldContent.includes('Claude Brain')) {
105
+ await fs.unlink(oldDestPath)
106
+ console.log(dimText(' Removed old ~/CLAUDE.md (migrated to ~/.claude/)'))
107
+ }
108
+ } catch {
109
+ // ignore cleanup errors
94
110
  }
95
111
  }
96
112
 
@@ -3,7 +3,7 @@ import type { PartialConfig } from './schema'
3
3
  /** Default configuration values for Claude Brain */
4
4
  export const defaultConfig: PartialConfig = {
5
5
  serverName: 'claude-brain',
6
- serverVersion: '0.3.6',
6
+ serverVersion: '0.3.7',
7
7
  logLevel: 'info',
8
8
  logFilePath: './logs/claude-brain.log',
9
9
  dbPath: './data/memory.db',
@@ -196,7 +196,7 @@ export const ConfigSchema = z.object({
196
196
  serverName: z.string().default('claude-brain'),
197
197
 
198
198
  /** Server version in semver format */
199
- serverVersion: z.string().regex(/^\d+\.\d+\.\d+$/, 'Version must be semver format').default('0.3.6'),
199
+ serverVersion: z.string().regex(/^\d+\.\d+\.\d+$/, 'Version must be semver format').default('0.3.7'),
200
200
 
201
201
  /** Logging level */
202
202
  logLevel: LogLevelSchema.default('info'),
@@ -122,7 +122,7 @@ export class SetupWizard {
122
122
  {
123
123
  type: 'confirm',
124
124
  name: 'installClaudeMd',
125
- message: 'Install CLAUDE.md protocol file to ~/CLAUDE.md?',
125
+ message: 'Install CLAUDE.md protocol file to ~/.claude/CLAUDE.md?',
126
126
  initial: true
127
127
  }
128
128
  ])
@@ -244,7 +244,7 @@ SERVER_NAME=claude-brain
244
244
 
245
245
  private async confirmClaudeMdInstall(): Promise<boolean> {
246
246
  const sourcePath = path.join(PACKAGE_ROOT, 'assets', 'CLAUDE.md')
247
- const destPath = path.join(os.homedir(), 'CLAUDE.md')
247
+ const destPath = path.join(os.homedir(), '.claude', 'CLAUDE.md')
248
248
 
249
249
  if (!existsSync(sourcePath)) {
250
250
  console.log(warningText('CLAUDE.md asset not found, skipping'))
@@ -255,7 +255,7 @@ SERVER_NAME=claude-brain
255
255
  const { overwrite } = await prompts({
256
256
  type: 'confirm',
257
257
  name: 'overwrite',
258
- message: '~/CLAUDE.md already exists. Overwrite?',
258
+ message: '~/.claude/CLAUDE.md already exists. Overwrite?',
259
259
  initial: false,
260
260
  })
261
261
  if (!overwrite) {
@@ -269,7 +269,9 @@ SERVER_NAME=claude-brain
269
269
 
270
270
  private async copyClaudeMd(): Promise<void> {
271
271
  const sourcePath = path.join(PACKAGE_ROOT, 'assets', 'CLAUDE.md')
272
- const destPath = path.join(os.homedir(), 'CLAUDE.md')
272
+ const claudeDir = path.join(os.homedir(), '.claude')
273
+ const destPath = path.join(claudeDir, 'CLAUDE.md')
274
+ await fs.mkdir(claudeDir, { recursive: true })
273
275
  await fs.copyFile(sourcePath, destPath)
274
276
  }
275
277