Terminal UI for inspecting, filtering, and pruning OpenCode metadata stored on disk. The app is written in TypeScript, runs on Bun, and renders with @opentui/react.
Main workspace with Projects (left) and Sessions (right) panels.
Contextual help overlay with key bindings and tips.
- List both OpenCode projects and sessions from a local metadata root.
- Filter by “missing only”, bulk-select, and delete metadata safely.
- Jump from a project directly to its sessions and keep contextual filters.
- Global search bar (
/to focus,Enterto apply,EscorXto clear). - Rich help overlay with live key hints (
?orH). - Zero-install via
bunxso even CI shells can run it without cloning.
- Bun 1.1.0+ (developed/tested on 1.2.x).
- A node-compatible terminal (truecolor improves readability but is optional).
# Clone the repo and install deps
git clone git@github.com:kcrommett/oc-manager.git
cd oc-manager
bun install
# Or run on demand without cloning
bunx opencode-manager --helpThe repository ships with a focused .gitignore, keeping node_modules/, caches, and logs out of Git history.
# Preferred: zero-install command
bunx opencode-manager --root ~/.local/share/opencode
# Local dev run (forwards extra args after --)
bun run tui -- --root ~/.local/share/opencode
# Legacy Python wrapper (still used by some automation)
./manage_opencode_projects.py --root ~/.local/share/opencode -- --helpKeyboard reference:
- Global:
Tab/1/2switch tabs,/search,Xclear search,Rreload,Qquit,?help. - Projects:
Spacetoggle selection,Aselect all,Mmissing-only filter,Ddelete,Enterjump to Sessions. - Sessions:
Spaceselect,Stoggle updated/created sort,Ddelete,Cclear project filter,Enterdetails.
- Install dependencies with
bun install. - Run the TUI via
bun run tui(pass storage flags after--). - Use
bun run devfor watch mode. - Type-check with
bun run typecheck(tsc --noEmit).
src/
bin/opencode-manager.ts # Bun-native CLI shim exposed as the bin entry
opencode-tui.tsx # Main TUI implementation (panels, search, help)
manage_opencode_projects.py # Legacy Python launcher for backwards compatibility
opencode-gen.sh # Spec snapshot helper script
PROJECT-SUMMARY.md # Extended design notes & roadmap
bun installbun run typecheck- Update
versioninpackage.json npm publish(package exposes theopencode-managerbin with public access)
- tmux failures: Some sandboxed environments block tmux sockets under
/tmp. Runbun run tuidirectly if tmux refuses to start. - Rendering glitches: OpenTUI expects all textual content inside
<text>nodes. When adding UI components, follow the existing helpers (e.g.,KeyChip,Bullet). - Search won’t clear: Press
Escwhile the search bar is focused, or hitXwhile in normal navigation.
Issues and pull requests are welcome. Please include reproduction steps for metadata edge cases and run bun run typecheck before submitting patches.
MIT © OpenCode contributors. See LICENSE.