A local web dashboard for monitoring git branches and GitHub pull requests. Designed for AI coding agents to display real-time session data to users.
- Live Updates: Server-sent events for real-time data refresh
- GitHub-style Diff View: Syntax-highlighted diffs with collapsible files
- PR Comments: Review threads with resolved/unresolved status
- File Navigation: Sticky sidebar to jump between changed files
- Adaptive UI: Tabs hide when data isn't available
- Extensible: Plugin system for adding custom data sources
- Node.js 16+
- Git: Must be run from within a git repo
- GitHub Token: For PR info and comments (see Authentication below)
# Install Node.js (macOS)
brew install nodeThe dashboard needs a GitHub token to fetch PR info and comments. It checks in this order:
GITHUB_TOKENenvironment variable- Token from
gh auth token(GitHub CLI)
# Install and authenticate
brew install gh
gh auth loginThe dashboard will automatically use your gh CLI token.
# Set token directly
export GITHUB_TOKEN=ghp_xxxxxxxxxxxx
# Or pass when starting
GITHUB_TOKEN=ghp_xxx agentdashboard /path/to/repoWithout a token, the dashboard still works but PR features are disabled:
- No PR status or link
- No review comments
- No PR stack
# Clone the repo
git clone <repo-url> ~/Developer/session-dashboard
cd ~/Developer/session-dashboard
# Run install script
./install.shThis will:
- Check requirements
- Build the web UI
- Link
agentdashboardcommand globally - Link as a Claude Code skill
# Current directory
agentdashboard
# Specific path
agentdashboard /path/to/repo
# Open browser automatically
agentdashboard -o
# Specific port
agentdashboard -p 8080The dashboard will:
- Find an available port (starting at 3456)
- Print the URL
- Watch for changes and push updates via SSE
session-dashboard/
├── bin/cli.js # CLI entry point
├── server.js # Node.js server with SSE
├── package.json # Dependencies and scripts
├── install.sh # Installation script
├── web/ # React frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── hooks/ # useData hook for SSE
│ │ ├── types/ # TypeScript types
│ │ └── styles.css # GitHub-dark theme
│ └── dist/ # Built files (generated)
└── SKILL.md # Claude Code skill definition
- Server collects data from git and GitHub CLI
- Data is sent to clients via Server-Sent Events
- React app renders with syntax highlighting
- Changes trigger automatic re-render
| Endpoint | Description |
|---|---|
GET / |
Serve dashboard with embedded data |
GET /api/data |
Get current data as JSON |
POST /api/refresh |
Force data refresh |
GET /events |
SSE stream for live updates |
AI coding agents can create custom dashboard tabs by adding HTML files to .sessiondashboard/tabs/ in the working directory. The dashboard automatically watches this directory and updates when files change.
- Create
.sessiondashboard/tabs/in the repo root (created automatically when dashboard starts) - Add an HTML file:
.sessiondashboard/tabs/my-status.html - The tab appears automatically with title "My Status" (filename converted to title case)
- Edit the HTML file and changes appear live
The file should contain valid HTML that will be rendered inside the dashboard. You have access to the dashboard's CSS variables for consistent styling:
<!-- .sessiondashboard/tabs/build-status.html -->
<div class="card">
<div class="card-header">Build Status</div>
<div class="card-content">
<div class="stats-grid">
<div class="stat">
<div class="stat-value additions">Passing</div>
<div class="stat-label">Tests</div>
</div>
<div class="stat">
<div class="stat-value">42s</div>
<div class="stat-label">Duration</div>
</div>
</div>
</div>
</div>Available CSS variables for consistent theming:
--bg: Primary background (#0d1117)--bg-secondary: Secondary background (#161b22)--bg-tertiary: Tertiary background (#21262d)--border: Border color (#30363d)--text: Primary text (#e6edf3)--text-muted: Muted text (#8b949e)--accent: Accent color (#58a6ff)--green: Success color (#3fb950)--red: Error color (#f85149)--purple: Purple (#a371f7)--orange: Warning color (#d29922)
- Display build/test progress
- Show agent task status
- Render diagrams or visualizations
- Display custom metrics
- Show logs or output
<!-- .sessiondashboard/tabs/progress.html -->
<div class="card">
<div class="card-header">Task Progress</div>
<div class="card-content">
<div style="display: flex; flex-direction: column; gap: 12px;">
<div style="display: flex; align-items: center; gap: 8px;">
<span style="color: var(--green);">✓</span>
<span>Parse requirements</span>
</div>
<div style="display: flex; align-items: center; gap: 8px;">
<span style="color: var(--green);">✓</span>
<span>Generate code</span>
</div>
<div style="display: flex; align-items: center; gap: 8px;">
<span style="color: var(--accent);">●</span>
<span>Running tests...</span>
</div>
<div style="display: flex; align-items: center; gap: 8px; opacity: 0.5;">
<span>○</span>
<span>Create PR</span>
</div>
</div>
</div>
</div>const dashboard = require('session-dashboard/server');
dashboard.registerPlugin({
id: 'my-plugin',
name: 'My Custom Data',
collect: (data) => {
// Return custom data to add to the dashboard
return { myField: 'value' };
}
});
dashboard.start();- Add data in your plugin's
collectfunction - Create a new React component in
web/src/components/ - Add the tab to
App.tsx - Rebuild:
npm run build
# Install dependencies
npm install
cd web && npm install
# Run server (uses built files)
npm start
# Build web UI
npm run buildRun from within a git repository.
Install with brew install gh and authenticate with gh auth login.
- Ensure PR exists and has review comments
- Check
gh auth statusfor authentication
The CLI will automatically find an available port. Or specify one with -p.
MIT