Skip to content
ishaan-bitsPublic

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

A glassmorphism web dashboard to browse, search, filter, and resume OpenCode sessions.

Python License: MIT Zero Dependencies Platform

OpenCode Session Browser is a zero-dependency Python tool that reads your local OpenCode session database and displays it in a beautiful dark glass UI. Search, filter, sort, rename, delete, and resume sessions — all from your browser.

Quickstart

git clone https://github.com/ishaan-bits/sessions.git
cd sessions
python3 server.py

The browser opens automatically at http://127.0.0.1:8765.

Add a shell alias for instant access:

# Add to ~/.zshrc or ~/.bashrc
sessions() {
  nohup python3 "$HOME/path/to/sessions/server.py" > /tmp/opencode-session.log 2>&1 &
  sleep 1 && open "http://127.0.0.1:8765"
}

Then run sessions from any terminal.

Features

  • Auto-discovery — reads all sessions from ~/.local/share/opencode/opencode.db automatically
  • Glassmorphism UI — dark frosted glass design with animated gradient background
  • Search — find sessions by title, slug, ID, directory, or project description
  • Filter — by agent type (build, plan, explore) and project directory
  • Sort — by last updated, creation date, cost, tokens, or title
  • Resume — open any session directly in a new terminal window
  • Rename — inline editing of session titles
  • Delete — remove sessions with confirmation
  • Copy — session ID and resume command to clipboard
  • Cross-platform — works on macOS, Linux, and Windows
  • Zero dependencies — Python standard library only, no pip install required

Requirements

Requirement Version
Python 3.9+
OpenCode Installed and used at least once

The server reads directly from OpenCode's SQLite database. No data is modified.

How It Works

  1. server.py starts a local HTTP server on port 8765
  2. The HTML/CSS/JS frontend is served inline — single file, no build step
  3. API endpoints query the SQLite database in real-time
  4. Sessions are auto-discovered on every page load — no manual saving

API Endpoints

Endpoint Method Description
/api/sessions GET List all sessions with search/filter
/api/agents GET List unique agent types
/api/projects GET List unique project directories
/api/stats GET Aggregated session statistics
/api/health GET Health check
/api/delete/<id> GET Delete a session
/api/rename/<id>?title= GET Rename a session
/api/open-terminal/<id> GET Open session in terminal

Search Engine Optimization

This repository is optimized for discoverability:

  • Keywords in README headers, description, and topic tags
  • Quickstart in the first screen for immediate understanding
  • Structured tables for features and API reference
  • Badge signals for license, language, and platform
  • Regular updates to maintain freshness signals

License

MIT

Author

Built by ishaan-bits

Releases

Packages

Contributors

Languages