Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,20 @@
"source": "./plugins/commit-commands",
"category": "productivity"
},
{
"name": "enhanced-statusline",
"description": "Enhanced status line for Claude Code with session duration, token tracking, git status, and cost monitoring",
"version": "1.0.0",
"author": {
"name": "Deepan Kumar",
"email": "deepan.ppgit@gmail.com"
},
"source": "./plugins/enhanced-statusline",
"category": "productivity",
"keywords": ["statusline", "theme", "customization", "git", "monitoring"],
"repository": "https://github.com/deepan-g2/claude-statusline-plugin",
"homepage": "https://github.com/deepan-g2/claude-statusline-plugin#readme"
},
{
"name": "explanatory-output-style",
"description": "Adds educational insights about implementation choices and codebase patterns (mimics the deprecated Explanatory output style)",
Expand Down
14 changes: 14 additions & 0 deletions plugins/enhanced-statusline/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "enhanced-statusline",
"version": "1.0.0",
"description": "Enhanced status line for Claude Code with session duration, token tracking, git status, and cost monitoring",
"author": {
"name": "Deepan Kumar",
"email": "deepan.ppgit@gmail.com",
"url": "https://github.com/deepan-g2"
},
"keywords": ["statusline", "theme", "customization", "git", "monitoring"],
"license": "MIT",
"repository": "https://github.com/deepan-g2/claude-statusline-plugin",
"homepage": "https://github.com/deepan-g2/claude-statusline-plugin#readme"
}
213 changes: 213 additions & 0 deletions plugins/enhanced-statusline/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
# Enhanced Status Line Plugin for Claude Code

[![GitHub stars](https://img.shields.io/github/stars/deepan-g2/claude-statusline-plugin?style=social)](https://github.com/deepan-g2/claude-statusline-plugin/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/deepan-g2/claude-statusline-plugin?style=social)](https://github.com/deepan-g2/claude-statusline-plugin/network/members)
[![GitHub watchers](https://img.shields.io/github/watchers/deepan-g2/claude-statusline-plugin?style=social)](https://github.com/deepan-g2/claude-statusline-plugin/watchers)
[![Visitor Count](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fdeepan-g2%2Fclaude-statusline-plugin&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=visitors&edge_flat=false)](https://hits.seeyoufarm.com)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Version](https://img.shields.io/github/v/release/deepan-g2/claude-statusline-plugin)](https://github.com/deepan-g2/claude-statusline-plugin/releases)

A beautiful, informative status line for Claude Code that displays real-time session metrics, git status, token usage, and more.

## 🎨 Features

- **📁 Directory Display** - Current working directory
- **⎇ Git Integration** - Branch name, uncommitted changes (*), unpushed commits (↑N)
- **◉ Smart Context Tracking** - Percentage + actual token count with color coding
- Green (< 60%) - All good
- Yellow (60-80%) - Watch it
- Orange (> 80%) - Warning!
- **⏱ Session Duration** - Track how long you've been working
- **+/- Code Changes** - Lines added and removed in session
- **💰 Cost Monitoring** - Real-time cost tracking

## 📸 Preview

![Status Line Preview](images/statusline-preview.png)

**Example output:**
```
📁 myproject │ ⎇ main*↑3 │ ◉ 45% (450K) │ ⏱ 1h30m │ +320/-145 │ $0.450
```

## 📦 Installation

### From GitHub (Recommended)

```bash
# Add the plugin marketplace
/plugin marketplace add deepan-g2/claude-statusline-plugin

# Install the plugin
/plugin install enhanced-statusline@deepan-statusline-plugins
```

### Local Development

```bash
# Clone the repository
git clone https://github.com/deepan-g2/claude-statusline-plugin.git
cd claude-statusline-plugin

# Test locally
claude --plugin-dir ./
```

## 🚀 Quick Start

After installation, activate the status line:

```bash
# Inside Claude Code
/enhanced-statusline:setup-statusline
```

Or manually add to your `~/.claude/settings.json`:

```json
{
"statusLine": {
"type": "command",
"command": "~/.claude/plugins/enhanced-statusline/scripts/statusline.sh",
"padding": 0
}
}
```

Then restart your Claude Code session!

## 🎨 Customization

### Change Colors

Edit the script at `scripts/statusline.sh` (lines 86-96):

```bash
CYAN="\033[38;5;87m" # Change to any 0-255 color
GREEN="\033[38;5;46m"
YELLOW="\033[38;5;228m"
ORANGE="\033[38;5;214m"
PURPLE="\033[38;5;141m"
```

### Popular Color Schemes

**Dracula Theme:**
```bash
CYAN="\033[38;5;117m"
GREEN="\033[38;5;84m"
ORANGE="\033[38;5;215m"
PURPLE="\033[38;5;141m"
```

**Ocean Blue:**
```bash
CYAN="\033[38;5;81m"
GREEN="\033[38;5;48m"
ORANGE="\033[38;5;116m"
PURPLE="\033[38;5;69m"
```

### View All Colors

```bash
for i in {0..255}; do
echo -e "\033[38;5;${i}m${i}\033[0m"
done
```

## 📚 Available Commands

- `/enhanced-statusline:setup-statusline` - Configure the status line
- `/enhanced-statusline:color-scheme` - Change color themes

## 🔧 Requirements

- Claude Code CLI
- `jq` (for JSON parsing)
- `bc` (for calculations)
- Git (optional, for git status features)

Install dependencies:

```bash
# macOS
brew install jq bc

# Linux
apt-get install jq bc
```

## 📖 Documentation

### Status Line Components

| Component | Description | Example |
|-----------|-------------|---------|
| 📁 Directory | Current folder name | `📁 myproject` |
| ⎇ Git | Branch + status | `⎇ main*↑3` |
| ◉ Context | Token usage % + count | `◉ 45% (450K)` |
| ⏱ Duration | Session time | `⏱ 1h30m` |
| +/- Lines | Code changes | `+320/-145` |
| 💰 Cost | Session cost | `$0.450` |

### Git Status Indicators

- `*` - Uncommitted changes present
- `↑N` - N unpushed commits
- No indicator - Clean working tree

### Context Warning Levels

- **Green ◉** - Less than 60% context used
- **Yellow ◉** - 60-80% context used
- **Orange ⚠** - More than 80% context used (consider compacting)

## 🛠 Troubleshooting

### Colors not showing?
```bash
# Check terminal color support
echo $TERM # Should be xterm-256color or similar
export TERM=xterm-256color
```

### jq not found?
```bash
# Install jq
brew install jq # macOS
apt-get install jq # Linux
```

### Status line not updating?
- Restart Claude Code session
- Check script permissions: `chmod +x scripts/statusline.sh`
- Test manually: `echo '{}' | ./scripts/statusline.sh`

## 🤝 Contributing

Contributions welcome! Please:

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## 📝 License

MIT License - feel free to use and modify!

## 🌟 Credits

Created by Deepan Kumar ([@deepan-g2](https://github.com/deepan-g2)). Inspired by Oh-My-Zsh themes and Starship prompt.

## 📮 Support

- Report issues: [GitHub Issues](https://github.com/deepan-g2/claude-statusline-plugin/issues)
- Discussions: [GitHub Discussions](https://github.com/deepan-g2/claude-statusline-plugin/discussions)
- Documentation: [Wiki](https://github.com/deepan-g2/claude-statusline-plugin/wiki)

---

Made with ❤️ for the Claude Code community
42 changes: 42 additions & 0 deletions plugins/enhanced-statusline/commands/color-scheme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
description: Change the color scheme of the enhanced status line
---

# Change Status Line Color Scheme

Select from predefined color schemes or create your own custom colors.

## Available Themes:

### 1. Default (Cyberpunk)
- Pink model indicator
- Cyan directory
- Green/Yellow/Orange context indicators

### 2. Dracula
- Purple and blue tones
- Soft contrast

### 3. Ocean Blue
- Cool blue palette
- Aqua accents

### 4. Sunset Warm
- Warm oranges and corals
- Earth tones

### 5. Monochrome
- Grayscale only
- Professional look

## How to Apply:

The color scheme is defined in the status line script at:
`${CLAUDE_PLUGIN_ROOT}/scripts/statusline.sh`

You can edit lines 86-96 to change colors. Use color codes 0-255.

Would you like me to:
1. Show you all 256 available terminal colors?
2. Apply a specific theme?
3. Help you create a custom color scheme?
30 changes: 30 additions & 0 deletions plugins/enhanced-statusline/commands/setup-statusline.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
description: Configure the enhanced status line for this Claude Code session
---

# Setup Enhanced Status Line

Configure Claude Code to use the enhanced status line that displays:

- 📁 Current directory
- ⎇ Git branch with status (* for uncommitted, ↑N for unpushed)
- ◉ Context usage with percentage and token count
- ⏱ Session duration
- +/-Lines code changes
- 💰 Session cost

The status line script is located at: `${CLAUDE_PLUGIN_ROOT}/scripts/statusline.sh`

To apply this configuration, update your settings with:

```json
{
"statusLine": {
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/statusline.sh",
"padding": 0
}
}
```

Would you like me to add this configuration to your settings now?
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading