██████╗ ██████╗ ███╗ ██╗████████╗███████╗██╗ ██╗████████╗ ██████╗ ██████╗ ██╗██████╗ ██████╗ ███████╗
██╔════╝██╔═══██╗████╗ ██║╚══██╔══╝██╔════╝╚██╗██╔╝╚══██╔══╝ ██╔══██╗██╔══██╗██║██╔══██╗██╔════╝ ██╔════╝
██║ ██║ ██║██╔██╗ ██║ ██║ █████╗ ╚███╔╝ ██║ █████╗██████╔╝██████╔╝██║██║ ██║██║ ███╗█████╗
██║ ██║ ██║██║╚██╗██║ ██║ ██╔══╝ ██╔██╗ ██║ ╚════╝██╔══██╗██╔══██╗██║██║ ██║██║ ██║██╔══╝
╚██████╗╚██████╔╝██║ ╚████║ ██║ ███████╗██╔╝ ██╗ ██║ ██████╔╝██║ ██║██║██████╔╝╚██████╔╝███████╗
╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝╚═════╝ ╚═════╝ ╚══════╝
Your dev tools are scattered. Your focus shouldn't be.
context-bridge links your GitHub PRs, Linear tickets, Slack threads, and CI logs - automatically - so you can stop hunting and start shipping.
✨ New: Click-to-copy branch names and git checkout commands with keyboard shortcuts c and g!
🚀 Quick Start · ⚡ Commands · 🔌 Integrations · 🖥️ Dashboard · 🤝 Contributing
You're deep in debugging fix/auth-timeout. Then you get pulled into another meeting, another branch, another fire.
When you come back - you open 10 tabs, scroll through Slack history, check GitHub PR comments, hunt through CI logs, re-read the Jira ticket...
That's 30 minutes wasted before you write a single line of code.
Multiply that by every context switch. Every day. Every developer on your team.
cb status╭─────────────────────────────────────────────────────────────╮
│ context-bridge · fix/auth-timeout │
├─────────────────────────────────────────────────────────────┤
│ 📋 AUTH-412 → Login timeout after 30s [In Progress] │
│ 🔁 PR #231 → 2 unresolved comments (Rahul asked smth) │
│ ❌ CI Failed → 3rd time · Error: timeout on line 84 │
│ 💬 Slack → Sarah: "might be AWS lambda cold start" │
│ #backend · 2 hours ago │
╰─────────────────────────────────────────────────────────────╯
Context fetched in 1.2s · http://localhost:4242
One command. Every tool. Zero tab switching.
git clone https://github.com/Harsh-Codes-77/context-bridge.git
cd context-bridge
# Windows:
install.bat
# macOS:
chmod +x install-mac.sh && ./install-mac.sh
# Linux:
chmod +x install-linux.sh && ./install-linux.sh
# Then:
cb init
cb status
cb web
# Optional diagnostics:
cb doctorcb init saves tokens to ~/.context-bridge/.env. Note: Only the GitHub token is required! Linear and Slack tokens are completely optional and can be freely skipped.
You can manage repos anytime with cb repo — no need to re-enter tokens.
| Command | Description |
|---|---|
cb status |
Fetch GitHub + Linear + Slack context for the current branch. |
cb status --json |
Output clean JSON instead of rich terminal output. |
cb resume |
Resume context from your last session on this branch. |
cb export |
Export all context for the current branch to a markdown file. |
cb standup |
Generate a daily standup report from the last 24 hours of work. |
cb standup --copy |
Copy the standup report to clipboard (for quick Slack posting). |
cb standup --export |
Save the standup report to a markdown file. |
cb web |
Start local context-bridge web dashboard. |
cb init |
Run first-time setup for API tokens and default repo. |
cb repo |
Manage saved repos — add, switch, list, or remove. |
cb repo add |
Add a new repo and set it as the active one. |
cb repo use |
Switch the active repo to one you've already added. |
cb repo list |
Show all saved repos. |
cb repo current |
Print the currently active repo. |
cb repo remove |
Remove a saved repo. |
cb notes |
Leave yourself reminders or context tied directly to your active branch session. |
cb notes add |
Add a timestamped note to the current branch. |
cb notes show |
Display all notes associated with your current branch. |
cb notes clear |
Clear all notes attached to your current branch. |
cb config |
Manage CLI configuration and API tokens. |
cb config show |
Show current config status (tokens and active repo). |
cb config set |
Set a specific API token without re-running init. |
cb config clear-token |
Remove a specific API token. |
cb doctor |
Check cb installation and local configuration health. |
Fetches and displays your complete current context - branch, PR, ticket, CI, Slack - all at once.
cb statusWhat it shows:
- Current git branch
- Linked Linear/Jira ticket (auto-detected from branch name)
- GitHub PR status + unresolved comments
- Latest CI/CD run result (pass/fail + error location)
- Recent relevant Slack messages
Under the hood:
- ⚡ Parallel Execution: Uses
ThreadPoolExecutorto fetch GitHub, Linear, and Slack data simultaneously, drastically reducing fetch time. - 🛡️ Fault Tolerance: If one integration fails (e.g., Slack token expired), the other integrations will still load successfully, and you'll see a clear warning instead of a crash.
Options:
--json: Outputs a clean JSON object instead of rich terminal formatting. Perfect for scripting and piping into other tools (e.g.,cb status --json | jq '.github.ci_status'). Missing tokens or API errors will gracefully output an"error"field within the JSON instead of breaking the execution.
Woke up? Came back from a meeting? This tells you exactly where you left off.
cb resume╭─────────────────────────────────────────────────────────────╮
│ Resuming · fix/auth-timeout │
├─────────────────────────────────────────────────────────────┤
│ ⏰ Last active: 6 hours ago │
│ 📝 You were working on: auth.js (lines 78-92) │
│ │
│ What changed while you were away: │
│ • Rahul commented on PR #231 │
│ • CI failed 2 more times │
│ • Sarah replied in Slack thread │
│ │
│ ▶ Suggested next step: Reply to Rahul's PR comment │
╰─────────────────────────────────────────────────────────────╯
Exports all your branch context (PR info, CI status, Linear ticket, Slack messages, and notes) into a clean Markdown file. Perfect for pasting into pull requests, standup updates, or Jira.
cb export
# ✓ Exported to context-bridge-export-fix-auth-timeout-2026-04-24.md[NEW - Killer Feature] Auto-generate your daily standup from the last 24 hours of work!
This command aggregates all your branch activity from the past day and generates a beautifully formatted standup report. It pulls real data from GitHub PRs, Linear tickets, and your session history.
cb standupOutput:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 DAILY STANDUP — May 08, 2026
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ DONE (Yesterday):
- fix/CON-3-api-timeout → Updated timeout config
CON-3: Implement API timeout handling
Status: In Progress
🔄 IN PROGRESS (Today):
- feature/CON-5-login-timeout → Resolving PR comments
CON-5: Login timeout after 30s
Status: Done
PR #34 → 2 new comments from Rahul
CI → Passing ✓
⚠️ BLOCKERS:
- PR #34 needs 1 more approval before merge
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Smart Features:
- 🧠 Auto-categorizes branches as "Done" (inactive >12hrs) or "In Progress" (recent activity)
- 🔗 Links GitHub PRs with comment counts and CI status
- 🎫 Extracts Linear ticket IDs from branch names (e.g.,
fix/CON-5-auth→ pulls ticket CON-5) ⚠️ Highlights blockers (PR approvals needed, failed CI, etc.)- 💪 Works even with just 1 branch active in the last 24 hours
- 🛡️ Gracefully handles missing API tokens or data
Use Case 1: Daily Team Standup
cb standupRun this during your daily standup meeting to review everything you worked on in the past 24 hours. All info is organized and ready to present.
Use Case 2: Quick Slack Update
cb standup --copyAutomatically copies the entire standup report to your clipboard. Then just paste it into Slack, email, or your team channel:
- ✓ Standup copied to clipboard — paste it in Slack!
Use Case 3: Archival & Record-Keeping
cb standup --exportSaves the standup as standup-2026-05-08.md in your current directory. Great for:
- Keeping a daily log of what you shipped
- Attaching to sprint retrospectives
- Building your portfolio of completed work
- ✓ Standup exported to standup-2026-05-08.md
Use Case 4: Full Workflow (Clipboard + File)
cb standup --copy --exportBoth copies to clipboard AND saves to file. Perfect for submitting to Slack while also archiving for records.
For each branch active in the last 24 hours, the standup includes:
| Item | Source | Example |
|---|---|---|
| Branch Name | Git | feature/CON-5-login-timeout |
| Work Summary | Session history | "Resolving PR comments" |
| GitHub PR | API | #34 → 2 new comments from Rahul |
| CI Status | GitHub Actions | CI → Passing ✓ |
| Linear Ticket | Extracted from branch name | CON-5: Login timeout fix |
| Ticket Status | Linear API | Status: In Progress |
| Blockers | PR approval status | PR #34 needs 1 more approval |
Example 1: Yesterday you shipped a feature
$ cb standup
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 DAILY STANDUP — May 08, 2026
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ DONE (Yesterday):
- feature/CON-5-login-timeout → Implemented JWT refresh logic
CON-5: Login timeout after 30s
Status: Done
PR #34 → Merged ✓
CI → Passing ✓Example 2: Today you're debugging CI failures
$ cb standup
🔄 IN PROGRESS (Today):
- fix/CI-timeout-issue → Debugging flaky tests
CI → Failing ✗
PR #35 → Changes requested (Sarah: "needs more error handling")
⚠️ BLOCKERS:
- PR #35 needs changes requested fixes
- CI failing on line 84Example 3: Quick Slack post
$ cb standup --copy
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 DAILY STANDUP — May 08, 2026
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[...full report...]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✓ Standup copied to clipboard — paste it in Slack!
# Then in Slack: Cmd+V (or Ctrl+V on Windows/Linux)Opens a local web dashboard with your full project context, beautiful UI, and live refresh.
cb web
# → Dashboard running at http://localhost:4242Interactive setup wizard. Run once to configure your API tokens.
cb initTokens are saved to ~/.context-bridge/.env. Linear and Slack tokens are completely optional—if you only use GitHub, simply press Enter to skip them. You can optionally set a default repo during init,
or skip it and add repos later with cb repo add.
Manage multiple repos without re-entering tokens. Add, switch, list, or remove repos anytime.
Add a new repo and set it as the active one.
cb repo add harsh/my-app
# ✓ Added and set 'harsh/my-app' as active repo
cb repo add harsh/other-project
# ✓ Added and set 'harsh/other-project' as active repoSwitch the active repo to one you've already added.
cb repo use harsh/my-app
# ✓ Switched to 'harsh/my-app'Show all saved repos. The active repo is highlighted in green.
cb repo list Saved Repos
┏━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Name ┃ Full Name ┃ Status ┃
┡━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ my-app │ harsh/my-app │ Active ✓ │
│ other-project │ harsh/other-project │ - │
└───────────────┴─────────────────────┴──────────┘
Total repos: 2
Print the currently active repo.
cb repo current
# Active repo: harsh/my-appRemove a saved repo (asks for confirmation first).
cb repo remove harsh/other-project
# Remove harsh/other-project? [y/N]: y
# ✓ Removed 'harsh/other-project'Leave yourself reminders or context tied directly to your active branch session so you never forget where you left off.
Add a timestamped note to the current branch.
cb notes add "Need to review auth timeout tests before pushing"
# ✓ Note saved to fix/auth-timeoutDisplay all notes associated with your current branch.
cb notes showClear all notes attached to your current branch.
📝 Fun fact: Notes automatically appear at the bottom of your cb status output when they exist for your branch!
Manage your configuration and API tokens without needing to run the full cb init wizard again.
Show the status of your configured tokens and active repository. Tokens are safely masked.
cb config show┏━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Token ┃ Status ┃ Last 4 chars ┃
┡━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ GitHub │ ✓ Set │ ...x4f2 │
│ Linear │ ✓ Set │ ...a9k1 │
│ Slack │ ✗ Not set│ — │
└────────┴──────────┴──────────────┘
Active Repo harsh/my-app
Update or add a specific API token. The input prompt is hidden.
cb config set github-token
# Enter new GitHub Token:
# ✓ GitHub token updatedRemove a specific API token from your configuration.
cb config clear-token slack
# Remove Slack token? [y/N]: y
# ✓ Slack token removedCheck the health of your installation, local configuration, file paths, and environment settings.
cb doctorUseful if you are migrating environments, debugging tokens, or just making sure your local setup is perfectly healthy!
| Tool | What it fetches |
|---|---|
| GitHub | Current PR, unresolved comments, CI/CD status, failed job logs |
| Linear | Ticket title, status, assignee, priority, recent comments |
| Jira | Issue details, status, sprint info (coming soon) |
| Slack | Messages mentioning your ticket ID or branch name |
(Note: Only the GitHub token is required! Linear and Slack tokens are completely optional, and their summaries will dynamically hide from the dashboard and CLI if not provided.)
📍 GitHub Token
- Go to github.com/settings/tokens
- Click "Generate new token (classic)"
- Select scopes:
repo,workflow - Copy the token → paste in
cb init
📍 Linear Token
- Open Linear → Settings → API
- Click "Create new API key"
- Copy the key → paste in
cb init
📍 Slack Token
- Go to api.slack.com/apps
- Create a new app → "From scratch"
- Add OAuth scopes:
channels:read,channels:history,groups:read,groups:history,users:read - Optional (for better search results):
search:read - Install app to workspace
- Copy Bot User OAuth Token (or a user token with search permissions) → paste in
cb init
If search.messages is unavailable for your token type, context-bridge automatically falls back to channel history scanning.
Run cb web to get a beautiful local dashboard at http://localhost:4242.
Dashboard features:
- 🌿 All your active branches as cards
- 📊 GitHub PR, CI status, Linear ticket, and Slack context per branch
- ⏱️ Last active timestamps plus cache age visibility
- 📂 Files you've touched per session
- 🔄 Auto-refresh (sessions every 30s, full context every 120s)
- 🔒 Localhost-only - completely private
Find branches instantly when you have 10+ active sessions:
- 🔍 Live Search: Type to filter branches in real-time (no page reload)
- ⌨️ Keyboard Shortcut: Press
/anywhere to focus the search bar - 🎯 Smart Matching: Filters by branch name, repo name, or files touched (case-insensitive)
- ✨ Highlighted Results: Matched text is highlighted in cyan for easy scanning
- 📊 Result Counter: Shows "Showing X of Y branches" while filtering
- ✕ Clear Button: Click
×to reset search instantly - 💬 Server Fallback: GET
/api/search?q=<query>endpoint available for larger datasets
Example:
→ Press "/" to focus search
→ Type "auth" → instantly shows only branches matching "auth"
→ Type "services" → filters to branches with service-related files touched
→ See "Showing 3 of 12 branches" while filtered
→ Click × or clear input → back to full view
Power users: Navigate and control the dashboard entirely with your keyboard. No mouse needed.
| Key | Action |
|---|---|
| r | Refresh all context data (shows brief indicator) |
| / | Focus search bar instantly |
| Esc | Clear search input OR close any dialog/modal |
| ? | Open keyboard shortcuts help overlay |
| Key | Action |
|---|---|
| j or ↓ | Move focus to next branch card |
| k or ↑ | Move focus to previous branch card |
| Enter | Expand focused card to show full details |
| c | Copy branch name of focused card |
| g | Copy git checkout command of focused card |
| Delete or x | Prompt to delete focused card's session |
- Focused card gets a bright cyan highlighted border (distinct from mouse hover)
- Position indicator shows "3 / 12" in bottom right when navigating with keyboard
- Smooth scroll keeps focused card visible and centered
- Footer hint displays "Press ? for keyboard shortcuts" for discoverability
No more manual copy-paste! Quickly copy branch names and git commands with a single click or keyboard shortcut.
Branch Name:
- Hover over the branch name → a copy icon (📋) appears
- Click the branch name or the icon to copy to clipboard
- Inline "✓ Copied!" feedback displays for 2 seconds
- Toast notification shows at bottom-right confirming the copy
Git Checkout Command:
- Click the button below the branch name showing
📋 git checkout fix/branch-name - Copies the full git command to your clipboard
- Same "✓ Copied!" feedback and toast notification
When a branch card is focused (using j/k navigation):
| Key | Action |
|---|---|
| c | Copy branch name to clipboard |
| g | Copy git checkout command to clipboard |
Both show inline feedback and toast notifications on success.
If your browser doesn't support the modern Clipboard API:
- First fallback: Uses
document.execCommand('copy')for older browsers - Last resort: Shows a modal popup with the text pre-selected so you can manually copy with Ctrl+C / Cmd+C
- ✅ Shortcuts don't fire while typing in the search box
- ✅ All shortcuts work in one clean event listener (no interference)
- ✅ Works great with tmux/screen or remote SSH sessions
- ✅ Press ? anytime to see the help overlay with all available shortcuts
Example workflow:
→ Press "/" → Type "auth" → See matching branches
→ Press "j" to move down → Focus on "fix/auth-timeout"
→ Press "g" → Copies "git checkout fix/auth-timeout"
→ Paste in terminal, continue coding
→ Back in dashboard, press "r" → Refreshes all context
→ Done without touching the mouse once!
Everything is 100% local. Here's what we store and where:
~/.context-bridge/
├── data.db ← SQLite: sessions, context cache, and saved repos
└── .env ← Your API tokens (written by cb init)
your-project/
└── .env ← Optional legacy fallback (still supported)
- ❌ No cloud sync
- ❌ No analytics
- ❌ No data sent anywhere
- ✅ Your tokens never leave your machine
- ✅ Works fully offline (with cached data)
context-bridge/
│
├── cli/
│ ├── main.py ← Entry point - all cb commands
│ ├── status.py ← cb status logic
│ └── resume.py ← cb resume logic
│
├── integrations/
│ ├── github.py ← GitHub API integration
│ ├── linear.py ← Linear API integration
│ └── slack.py ← Slack API integration
│
├── storage/
│ └── db.py ← Local SQLite database
│
├── dashboard/
│ ├── app.py ← Flask local server
│ ├── templates/
│ │ └── index.html ← Web UI
│ └── static/
│ └── style.css ← Dashboard styles
│
├── config.py ← Token management
├── requirements.txt ← Dependencies
├── setup.py ← pip install -e . support
└── .env.example ← Token template
| Layer | Technology |
|---|---|
| Language | Python 3.9+ |
| CLI framework | Click |
| Terminal UI | Rich |
| Web dashboard | Flask |
| Local storage | SQLite via sqlite3 |
| HTTP requests | Requests |
| Config | python-dotenv |
context-bridge includes a comprehensive pytest test suite with 71 tests covering all modules and integrations. This ensures code quality and makes contributions safe.
# Install test dependencies (if not already done)
pip install -e .
# Run all tests
pytest tests/
# Run with coverage report
make test-coverage
# Run and stop at first failure
make test-fast| File | Tests | Coverage | Purpose |
|---|---|---|---|
| test_db.py | 27 | 100% | Database operations (sessions, cache, repos, notes) |
| test_linear.py | 11 | 99% | Linear API integration & ticket extraction |
| test_github.py | 10 | 95% | GitHub API integration (PRs, CI status) |
| test_cli.py | 16 | 100% | Click CLI commands |
| test_dashboard.py | 8 | 100% | Flask routes & endpoints |
| conftest.py | - | 88% | Shared test fixtures |
| TOTAL | 71 | 100% tests | Full module coverage |
✅ Isolated Database - Each test gets a fresh SQLite database in /tmp to prevent interference
✅ Mocked APIs - GitHub, Linear, and Slack calls are mocked; no real API requests made
✅ Comprehensive Fixtures - Reusable fixtures for database, environment variables, Flask test client
✅ Error Scenarios - Tests for API failures, missing tokens, invalid inputs, empty data
✅ 100% Pass Rate - All 71 tests pass on every run
pytest tests/
# Output: collected 71 items ... 71 passedpytest tests/test_db.py -v
pytest tests/test_github.py -vpytest tests/test_db.py::TestSessionManagement::test_save_and_get_session -v
pytest tests/test_cli.py::TestCliExists -vmake test-coverage
# Generates HTML coverage report in ./htmlcov/index.htmlmake test-fast
# Useful when debugging failing testsEach test file follows a consistent structure:
# tests/test_db.py
class TestSessionManagement:
"""Tests for session save/load/delete operations."""
def test_save_and_get_session(self, patched_db_path: str) -> None:
"""Test saving and retrieving a session."""
init_db()
branch_name = "fix/CON-5"
save_session(branch_name, "harsh/repo", ["file.js"])
session = get_last_session(branch_name)
assert session["branch_name"] == branch_namepatched_db_path - Creates an isolated SQLite database in /tmp for each test
def test_example(self, patched_db_path: str) -> None:
init_db()
# Database is fresh and isolatedmock_env - Mocks environment variables (API tokens)
def test_with_token(self, mock_env) -> None:
mock_env.setenv("GITHUB_TOKEN", "fake_token")
# Token is mockedflask_test_client - Creates Flask test client with patched database
def test_dashboard(self, flask_test_client) -> None:
response = flask_test_client.get("/api/sessions")
assert response.status_code == 200When adding a new feature, create a test in the appropriate file:
# tests/test_feature.py
from __future__ import annotations
import pytest
class TestNewFeature:
"""Tests for my new feature."""
def test_feature_basic(self, patched_db_path: str) -> None:
"""Test basic functionality."""
# Setup
init_db()
# Action
result = my_new_function()
# Assert
assert result is not NoneGuidelines:
- Use descriptive test names starting with
test_ - Add docstrings explaining what is tested
- Use fixtures from
conftest.pyfor database and mocking - Mock external API calls with
@patchdecorator - Keep tests focused on a single behavior
- Arrange-Act-Assert pattern for clarity
Tests are configured to run automatically via:
pytest.ini- Test discovery and configurationMakefile- Convenient test targets- GitHub Actions (coming soon) - Auto-run on push
Current coverage breakdown:
tests/ 100% All test files have 100% code coverage
storage/db.py 73% Main logic well-tested
dashboard/app.py 65% Routes and endpoints tested
integrations/ 46-52% Core functions mocked & tested
cli/main.py 21% CLI tested at high level
TOTAL 55% Focused on test code quality
Note: Coverage is focused on test file robustness. Production code is covered where tests are most valuable (integration points, data handling, error scenarios).
- GitHub integration (PR, CI status, comments)
- Linear integration (tickets, status, assignee)
- Slack integration (relevant messages)
- Local SQLite storage
-
cb statuscommand -
cb resumecommand - Local web dashboard
- Multi-repo management (
cb repo) -
cb standup- auto-generate daily standup from your activity - Dashboard search & filter - find branches instantly with
/keyboard shortcut - Click-to-copy branch names and git commands with keyboard shortcuts
- GitLab support
- Jira integration
- VS Code extension
- Notion integration
Contributions are welcome! This project is built by developers, for developers.
# Fork & clone
git clone https://github.com/YOUR_USERNAME/context-bridge.git
cd context-bridge
# Install in dev mode
pip install -e .
# Create a branch
git checkout -b feat/your-integration
# Make changes, then PR!Want to add a new integration? Check integrations/github.py - it's a good template. Each integration needs:
- A
get_*function (fetches data from API) - A
display_*function (renders using Rich)
MIT License - see LICENSE for details.
Free to use, modify, and distribute. If this tool helps you ship faster, give it a ⭐ - it means a lot!
Built with obsession by Harsh
Stop switching tabs. Start shipping.
⭐ Star this repo if context-bridge saved your sanity ⭐