# Installation Guide
Complete installation instructions for all platforms and methods.
**🌐 Quick Start:** Visit the [official site](https://ndave92.github.io/claude-code-status-line/) for easy copy-paste installation commands.
## 🚀 Automated Installer (Recommended)
The easiest way to install is using the automated installer.
### Step 1: Install the Installer Command
**macOS / Linux:**
```bash
mkdir -p ~/.claude/commands && curl -o ~/.claude/commands/install-statusline.md https://raw.githubusercontent.com/ndave92/claude-code-status-line/master/.claude/commands/install-statusline.md
```
**Windows (PowerShell):**
```powershell
New-Item -Path "$env:USERPROFILE\.claude\commands" -ItemType Directory -Force; Invoke-WebRequest -Uri "https://raw.githubusercontent.com/ndave92/claude-code-status-line/master/.claude/commands/install-statusline.md" -OutFile "$env:USERPROFILE\.claude\commands\install-statusline.md"
```
### Step 2: Run the Installer
1. Restart Claude Code
2. Run the command:
```
/install-statusline
```
3. Follow the interactive prompts to choose your installation method
4. Restart Claude Code again to activate the status line
The installer will:
- Detect your platform and architecture
- Offer to download pre-built binaries or compile from source
- Configure your `~/.claude/settings.json` automatically
- Set up slash commands: `/update-statusline` and `/customize-statusline`
- Guide you through configuration with an interactive wizard
---
## 📦 Manual Installation Methods
### Option 1: Install from crates.io
If you have Rust installed:
```bash
cargo install claude-code-status-line
```
**Then configure Claude Code:**
Add to `~/.claude/settings.json`:
```json
{
"statusLine": {
"type": "command",
"command": "~/.cargo/bin/claude-code-status-line",
"padding": 0
}
}
```
### Option 2: Download Pre-built Binary
**macOS (Apple Silicon):**
```bash
# Create directory
mkdir -p ~/.claude/statusline
# Download binary
curl -L -o ~/.claude/statusline/claude-code-status-line https://github.com/ndave92/claude-code-status-line/releases/latest/download/claude-code-status-line-macos-aarch64
# Make executable
chmod +x ~/.claude/statusline/claude-code-status-line
```
**macOS (Intel):**
```bash
mkdir -p ~/.claude/statusline
curl -L -o ~/.claude/statusline/claude-code-status-line https://github.com/ndave92/claude-code-status-line/releases/latest/download/claude-code-status-line-macos-x86_64
chmod +x ~/.claude/statusline/claude-code-status-line
```
**Linux (x86_64):**
```bash
mkdir -p ~/.claude/statusline
curl -L -o ~/.claude/statusline/claude-code-status-line https://github.com/ndave92/claude-code-status-line/releases/latest/download/claude-code-status-line-linux-x86_64
chmod +x ~/.claude/statusline/claude-code-status-line
```
**Windows (PowerShell):**
```powershell
New-Item -Path "$env:USERPROFILE\.claude\statusline" -ItemType Directory -Force
Invoke-WebRequest -Uri "https://github.com/ndave92/claude-code-status-line/releases/latest/download/claude-code-status-line-windows-x86_64.exe" -OutFile "$env:USERPROFILE\.claude\statusline\claude-code-status-line.exe"
```
**Then configure Claude Code:**
Add to your settings file with the **absolute path** to the binary:
```json
{
"statusLine": {
"type": "command",
"command": "/Users/yourname/.claude/statusline/claude-code-status-line",
"padding": 0
}
}
```
### Option 3: Build from Source
```bash
# Clone the repository
git clone https://github.com/ndave92/claude-code-status-line.git ~/.claude/statusline
cd ~/.claude/statusline
# Build release binary
cargo build --release
# The binary will be at: target/release/claude-code-status-line
```
**Then configure Claude Code:**
Add to `~/.claude/settings.json`:
```json
{
"statusLine": {
"type": "command",
"command": "~/.claude/statusline/target/release/claude-code-status-line",
"padding": 0
}
}
```
---
## 🔐 Authentication Setup
The statusline needs access to your Claude API token to display quota information.
### macOS (Recommended)
The statusline automatically uses macOS Keychain. Your token is stored securely by Claude Code.
### Other Platforms
The statusline uses the system keyring (via the `keyring` crate).
### Environment Variable (All Platforms)
Alternatively, set the `CLAUDE_OAUTH_TOKEN` environment variable:
```bash
export CLAUDE_OAUTH_TOKEN="your-token-here"
```
---
## ✅ Verify Installation
Check that the binary is working:
```bash
# Check version
claude-code-status-line --version
# Test with sample input
echo '{"workspace":{"current_dir":"/test"},"model":{"display_name":"Sonnet"},"context_window":{"context_window_size":200000,"current_usage":{"input_tokens":1000}}}' | claude-code-status-line
```
Restart Claude Code and you should see your new status line!
---
## 🔄 Next Steps
- **[Configuration Reference](Configuration-Reference)** - Complete settings reference
- **[Customization Examples](Customization-Examples)** - See theme examples
- **Run `/customize-statusline`** - Interactive configuration wizard
- **[Updating](Updating)** - How to update to newer versions