@naarang/glancebar
v1.0.9
Published
A customizable statusline for Claude Code - display calendar events, tasks, and more at a glance
Maintainers
Readme
@naarang/glancebar
A customizable statusline for Claude Code - display calendar events, tasks, and more at a glance.
Features
- Session info - Project name, git branch, model, cost, lines changed, and context usage
- System stats - CPU and memory usage (optional)
- Calendar events - Upcoming events from Google Calendar and Zoho Calendar
- Zoho Tasks - Display top pending tasks from Zoho Mail
- Meeting warnings - Red alert when a meeting is 5 minutes away
- Health reminders - Water, stretch, and eye break reminders
- Color-coded - Everything has distinct colors for quick scanning
- Fully configurable via CLI
- Cross-platform support (Windows, macOS, Linux)
Requirements
- Bun >= 1.0.0
- Google Cloud project with Calendar API enabled (for Google Calendar)
- Zoho API Console credentials (for Zoho Calendar)
Installation
Using bunx (recommended)
bunx @naarang/glancebar --helpGlobal installation
bun install -g @naarang/glancebarUsing npm
npx @naarang/glancebar --help
# or
npm install -g @naarang/glancebarQuick Start
# 1. Run setup guide
glancebar setup
# 2. Add your account (after setting up credentials)
glancebar auth --add [email protected]
# Select Google (1) or Zoho (2) when prompted
# 3. Test it
glancebarSetup
Google Calendar Setup
1. Create Google Cloud Project
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the Google Calendar API:
- Go to "APIs & Services" > "Library"
- Search for "Google Calendar API" and enable it
2. Create OAuth Credentials
- Go to "APIs & Services" > "Credentials"
- Click "Create Credentials" > "OAuth client ID"
- Select "Desktop app" as application type
- Give it a name and click "Create"
- Download the JSON file
- Rename to
credentials.jsonand save to~/.glancebar/credentials.json
3. Add Redirect URI
Desktop app credentials don't show a redirect URI field in the console UI. You need to manually edit the downloaded credentials.json file:
- Open
~/.glancebar/credentials.jsonin a text editor - Find the
"redirect_uris"array and ensure it contains:"redirect_uris": ["http://localhost:3000/callback"] - Save the file
Alternatively, you can add it via Google Cloud Console:
- Go to "APIs & Services" > "Credentials"
- Click on your OAuth client to edit it
- Under "Authorized redirect URIs", click "Add URI"
- Enter
http://localhost:3000/callback - Save and re-download the JSON file
Zoho Calendar Setup
1. Register Application
- Go to Zoho API Console
- Click "Add Client" > "Server-based Applications"
- Enter application details
2. Configure Client
- Set Authorized Redirect URI:
http://localhost:3000/callback - Note your Client ID and Client Secret
3. Save Credentials
Create ~/.glancebar/zoho_credentials.json:
{
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET"
}Add Accounts
# Add Google Calendar account
glancebar auth --add [email protected]
# Select "1" for Google Calendar
# Add Zoho Calendar account
glancebar auth --add [email protected]
# Select "2" for Zoho Calendar
# Then select your datacenter region (1-7)Zoho Datacenters: | Choice | Region | Domain | |--------|--------|--------| | 1 | United States | zoho.com | | 2 | Europe | zoho.eu | | 3 | India | zoho.in | | 4 | Australia | zoho.com.au | | 5 | China | zoho.com.cn | | 6 | Japan | zoho.jp | | 7 | Canada | zohocloud.ca |
Configure Claude Code
Update ~/.claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "bunx @naarang/glancebar",
"padding": 0
}
}Usage
Statusline Output
glancebar
# Output: In 15m: Team Standup (work)Commands
| Command | Description |
|---------|-------------|
| glancebar | Display statusline output |
| glancebar auth | Re-authenticate all accounts |
| glancebar auth --add <email> | Add a new account |
| glancebar auth --remove <email> | Remove an account |
| glancebar auth --list | List all accounts |
| glancebar config | Show current configuration |
| glancebar setup | Show setup instructions |
| glancebar --help | Show help |
Configuration Options
# Set lookahead hours (how far ahead to look for events)
glancebar config --lookahead 12
# Set countdown threshold (show "In Xm" instead of time)
glancebar config --countdown-threshold 30
# Set max title length
glancebar config --max-title 80
# Toggle calendar name display
glancebar config --show-calendar false
# Enable/disable health reminders
glancebar config --water-reminder true
glancebar config --stretch-reminder true
glancebar config --eye-reminder true
# Enable/disable system stats
glancebar config --cpu-usage true
glancebar config --memory-usage true
# Enable/disable Zoho tasks display
glancebar config --zoho-tasks true
glancebar config --max-tasks 3
# Reset to defaults
glancebar config --resetDisplay Format
Example output:
glancebar | main* | Opus | $0.12 | +156 -23 | 9.7k/200k (5%) | In 15m: Team Standup (work)Session Info (from Claude Code)
| Field | Color | Example |
|-------|-------|---------|
| Project name | Blue | glancebar, my-app |
| Git branch | Magenta | main, feature-x* (asterisk = uncommitted changes) |
| Model name | Yellow | Opus, Sonnet |
| Cost | Green | $0.01, $0.1234 |
| Lines changed | Green/Red | +156 -23 |
| Context usage | Green/Yellow/Red | 9.7k/200k (5%) |
| CPU usage | Green/Yellow/Red | CPU 12% |
| Memory usage | Green/Yellow/Red | Mem 8.2/16.0GB |
Context usage color changes based on percentage:
- Green: < 50%
- Yellow: 50-80%
- Red: > 80%
Calendar Events
| State | Format | Example |
|-------|--------|---------|
| Meeting warning | Red alert when ≤5m away | Meeting in 3m - wrap up! |
| Upcoming (within threshold) | In Xm: Title (account) | In 15m: Team Standup (work) |
| Current | Now: Title (account) | Now: Team Standup (work) |
| Later | HH:MM AM/PM: Title (account) | 2:30 PM: Meeting (work) |
| No events | No upcoming events | |
Zoho Tasks
| State | Color | Example |
|-------|-------|---------|
| Overdue task | Red | Overdue task title |
| High priority | Yellow | High priority task |
| Normal task | White | Normal task title |
Tasks are displayed as: Tasks: Task 1, Task 2, Task 3
Health Reminders (~5% chance)
| Type | Color | Example |
|------|-------|---------|
| Water | Cyan | Stay hydrated! Drink some water |
| Stretch | Green | Time to stretch! Stand up and move |
| Eye break | Magenta | Eye break! Look 20ft away for 20s |
Configuration
All configuration is stored in ~/.glancebar/:
~/.glancebar/
├── config.json # User settings
├── credentials.json # Google OAuth credentials (you provide)
├── zoho_credentials.json # Zoho OAuth credentials (you provide)
└── tokens/ # OAuth tokens per account
├── google_<email>.json # Google tokens
└── zoho_<email>.json # Zoho tokensDefault Settings
| Setting | Default | Description |
|---------|---------|-------------|
| lookaheadHours | 8 | Hours ahead to look for events |
| countdownThresholdMinutes | 60 | Minutes threshold for countdown display |
| maxTitleLength | 120 | Maximum event title length |
| showCalendarName | true | Show account name after event |
| waterReminderEnabled | true | Enable random water break reminders |
| stretchReminderEnabled | true | Enable random stretch/posture reminders |
| eyeReminderEnabled | true | Enable random eye break reminders (20-20-20 rule) |
| showCpuUsage | false | Show CPU usage percentage |
| showMemoryUsage | false | Show memory usage |
| showZohoTasks | true | Show pending Zoho tasks |
| maxTasksToShow | 3 | Maximum number of tasks to display |
Building from Source
# Clone the repository
git clone https://github.com/vishal-android-freak/glancebar.git
cd glancebar
# Install dependencies
bun install
# Run locally
bun run dev
# Build binaries for all platforms
bun run build:allBuild Targets
| Platform | Command |
|----------|---------|
| Linux x64 | bun run build:linux-x64 |
| Linux ARM64 | bun run build:linux-arm64 |
| macOS x64 | bun run build:darwin-x64 |
| macOS ARM64 | bun run build:darwin-arm64 |
| Windows x64 | bun run build:win-x64 |
Roadmap
- [ ] Task integration (Todoist, Google Tasks)
- [ ] Weather information
- [ ] System stats
- [ ] Custom modules
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Author
Vishal Dubey (@vishal-android-freak)
