FEAT: Support CLAUDE_CONFIG_DIR (#99)

* chore: automatic change from linting

* feat: support CLAUDE_CONFIG_DIR on utilities

* feat: support CLAUDE_CONFIG_DIR from the main app UI

* fix: reduce duplication and handle installation using new constants

* feat: missed one place using hardcoded path

* chore: update CLAUDE.md

* docs: Update README
This commit is contained in:
Ramiro Rivera authored and GitHub committed 2025-10-07 23:36:13 -04:00
1 parent 9feebf9a09
commit 9f26a071a7
6 files changed
+144 -73

No files matched your search

+18 -2
View File
@@ -125,6 +125,7 @@
- **🖥️ Interactive TUI** - Built-in configuration interface using React/Ink
- **⚙️ Global Options** - Apply consistent formatting across all widgets (padding, separators, bold, background)
- **🚀 Cross-platform** - Works seamlessly with both Bun and Node.js
- **🔧 Flexible Configuration** - Supports custom Claude Code config directory via `CLAUDE_CONFIG_DIR` environment variable
- **📏 Smart Width Detection** - Automatically adapts to terminal width with flex separators
- **⚡ Zero Config** - Sensible defaults that work out of the box
@@ -155,6 +156,15 @@ The interactive configuration tool provides a terminal UI where you can:
> 💡 **Tip:** Your settings are automatically saved to `~/.config/ccstatusline/settings.json`
> 🔧 **Custom Claude Config:** If your Claude Code configuration is in a non-standard location, set the `CLAUDE_CONFIG_DIR` environment variable:
> ```bash
> # Linux/macOS
> export CLAUDE_CONFIG_DIR=/custom/path/to/.claude
>
> # Windows PowerShell
> $env:CLAUDE_CONFIG_DIR="C:\custom\path\.claude"
> ```
---
## 🪟 Windows Support
@@ -294,7 +304,11 @@ For the best experience, configure Windows Terminal with these recommended setti
#### Claude Code Integration
Configure ccstatusline in your Claude Code settings:
**For Bun users** (Windows: `%USERPROFILE%\.claude\settings.json`):
**Settings Location:**
- Default: `~/.claude/settings.json` (Windows: `%USERPROFILE%\.claude\settings.json`)
- Custom: Set `CLAUDE_CONFIG_DIR` environment variable to use a different directory
**For Bun users**:
```json
{
"statusLine": "bunx ccstatusline@latest"
@@ -308,6 +322,8 @@ Configure ccstatusline in your Claude Code settings:
}
```
> 💡 **Custom Config Directory:** If you use a non-standard Claude Code configuration directory, set the `CLAUDE_CONFIG_DIR` environment variable before running ccstatusline. The tool will automatically detect and use your custom location.
### Performance on Windows
ccstatusline is optimized for Windows performance:
@@ -561,7 +577,7 @@ ccstatusline/
│ │ ├── renderer.ts # Core rendering logic
│ │ ├── powerline.ts # Powerline font utilities
│ │ ├── colors.ts # Color definitions
│ │ └── claude-settings.ts # Claude Code integration
│ │ └── claude-settings.ts # Claude Code integration (supports CLAUDE_CONFIG_DIR)
│ └── types/ # TypeScript type definitions
│ ├── Settings.ts
│ ├── Widget.ts