A fast macOS command-line tool that shows time until your next meeting. Answers: "Do I have time to start this task?"
$ mtg
🟢 47m until 1:1 with Sarah (2:00 PM)
You're about to start debugging something. Is it worth it? Do you have 2 hours or 12 minutes? One quick command tells you.
Requires Xcode Command Line Tools.
git clone https://github.com/mrf/meeting-buffer.git
cd meeting-buffer
make installswift build -c release
cp .build/release/mtg /usr/local/bin/mtg # Quick view: time until next meeting
mtg --detail # Detailed view with upcoming events
mtg --json # JSON output for scripting
mtg --no-color # Plain text (for shell prompts)
mtg --config # Show config file location
mtg --help # Show helpDefault:
🟢 47m until 1:1 with Sarah (2:00 PM)
Detail view (mtg --detail):
┌──────────────────────────────────────────┐
│ Next: 1:1 with Sarah │
│ in 47 minutes (2:00 PM) │
│ ────────────────────────────────────── │
│ After that: │
│ 3:00 PM Sprint Planning (1h) │
│ 4:30 PM Eng Sync (30m) │
│ ────────────────────────────────────── │
│ 🟢 You have time for a medium task │
└──────────────────────────────────────────┘
| Color | Time Until | Meaning |
|---|---|---|
| 🟢 Green | > 1 hour | Deep work time |
| 🟡 Yellow | 30-60 min | Medium task ok |
| 🟠 Orange | 10-30 min | Quick task only |
| 🔴 Red | < 10 min | Wrap up |
| 🔵 Blue | In meeting | Currently busy |
Based on available time:
| Buffer | Suggestion |
|---|---|
| > 2h | Deep work: architecture, complex bugs |
| 1-2h | Medium task: feature work, code review |
| 30m-1h | Small task: PR review, quick fix |
| 10-30m | Quick wins: emails, Slack, small PRs |
| < 10m | Prep for meeting, grab coffee |
Config file is optional. Searched in order:
./config.json~/.config/mtg/config.json~/.mtgrc.json
Example config:
{
"hoursAhead": 12,
"calendars": {
"include": null,
"exclude": ["Birthdays", "US Holidays", "Siri Suggestions"]
},
"ignoredEventPatterns": [
"Focus Time",
"Lunch",
"OOO",
"Out of Office",
"Blocked",
"Hold",
"Tentative"
]
}Add to .bashrc or .zshrc:
mtg_prompt() {
mtg --no-color 2>/dev/null || echo ""
}
PS1='$(mtg_prompt) \w $ 'Add to .tmux.conf:
set -g status-right '#(mtg --no-color 2>/dev/null)'
watch -n 60 mtg --detail# Get minutes until next meeting
mtg --json | jq '.bufferMinutes'
# Get next meeting title
mtg --json | jq -r '.nextEvent.title'Uses Apple's EventKit framework to read calendar data directly. This is the same data source Calendar.app uses, so any calendars synced there (Google, Exchange, iCloud, etc.) are automatically available.
Fast: ~0.3 seconds (vs 30+ seconds with AppleScript)
Private: All data stays local. No external API calls.
- macOS 13.0+
- Calendar access permission (granted on first run)
- Xcode Command Line Tools (for building)
make build # Build debug version
make release # Build optimized release
make run # Build and run
make test # Run all output modes
make clean # Clean build artifacts
make help # Show all targetsMIT License - see LICENSE
Contributions welcome! See CONTRIBUTING.md