Refactor settings management to use ~/.claude-mem/settings.json
- Updated paths in troubleshooting documentation to reflect new settings file location. - Modified diagnostics and reference files to read from ~/.claude-mem/settings.json. - Introduced getWorkerPort utility for cleaner worker port retrieval. - Enhanced ChromaSync and SDKAgent to load Python version and Claude path from settings. - Updated SettingsRoutes to validate new settings: CLAUDE_MEM_LOG_LEVEL and CLAUDE_MEM_PYTHON_VERSION. - Added early-settings module to load settings for logger and other early-stage modules. - Adjusted logger to use early-loaded log level setting. - Refactored paths to utilize early-loaded data directory setting.
This commit is contained in:
@@ -306,18 +306,42 @@ See [CHANGELOG.md](CHANGELOG.md) for complete version history.
|
||||
|
||||
## Configuration
|
||||
|
||||
**Model Selection:**
|
||||
Settings are managed in `~/.claude-mem/settings.json`. The file is auto-created with defaults on first run.
|
||||
|
||||
**Available Settings:**
|
||||
|
||||
| Setting | Default | Description |
|
||||
|---------|---------|-------------|
|
||||
| `CLAUDE_MEM_MODEL` | `claude-haiku-4-5` | AI model for observations |
|
||||
| `CLAUDE_MEM_WORKER_PORT` | `37777` | Worker service port |
|
||||
| `CLAUDE_MEM_DATA_DIR` | `~/.claude-mem` | Data directory location |
|
||||
| `CLAUDE_MEM_LOG_LEVEL` | `INFO` | Log verbosity (DEBUG, INFO, WARN, ERROR, SILENT) |
|
||||
| `CLAUDE_MEM_PYTHON_VERSION` | `3.13` | Python version for chroma-mcp |
|
||||
| `CLAUDE_CODE_PATH` | _(auto-detect)_ | Path to Claude executable |
|
||||
| `CLAUDE_MEM_CONTEXT_OBSERVATIONS` | `50` | Number of observations to inject at SessionStart |
|
||||
|
||||
**Settings Management:**
|
||||
|
||||
```bash
|
||||
# Edit settings via CLI helper
|
||||
./claude-mem-settings.sh
|
||||
|
||||
# Or edit directly
|
||||
nano ~/.claude-mem/settings.json
|
||||
|
||||
# View current settings
|
||||
curl http://localhost:37777/api/settings
|
||||
```
|
||||
|
||||
**Environment Variables:**
|
||||
**Advanced: Environment Variable Overrides**
|
||||
|
||||
- `CLAUDE_MEM_MODEL` - AI model for processing (default: claude-haiku-4-5)
|
||||
- `CLAUDE_MEM_WORKER_PORT` - Worker port (default: 37777)
|
||||
- `CLAUDE_MEM_DATA_DIR` - Data directory override (dev only)
|
||||
- `CLAUDE_MEM_PYTHON_VERSION` - Python version for uvx/chroma-mcp (default: 3.13)
|
||||
For advanced users, settings can be temporarily overridden using environment variables:
|
||||
|
||||
```bash
|
||||
CLAUDE_MEM_WORKER_PORT=38000 claude
|
||||
```
|
||||
|
||||
**Note**: The settings file takes priority. Environment variables only apply when a setting is not present in the file.
|
||||
|
||||
See [Configuration Guide](https://docs.claude-mem.ai/configuration) for details.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user