| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
sesh helps you find OpenCode sessions across every project on your machine.
OpenCode stores sessions globally, but the built-in /sessions view is scoped to the current project. sesh gives you a small CLI and an OpenCode TUI picker for searching those sessions from anywhere.
It can:
The TUI plugin is intentionally thin. It calls the sesh CLI under the hood and shows the result inside OpenCode.
I kept opening random projects from random directories, then later I could not find the OpenCode session I wanted because it belonged to some other directory I no longer remembered.
After poking around OpenCode's local database and running SQL against ~/.local, I realized the data was already there. I just needed a small tool to make those sessions searchable from anywhere.
The installer installs both parts:
By default it uses the latest GitHub release: the CLI is downloaded from that release tag, and the plugin entry points OpenCode at the release tarball.
curl -fsSL https://raw.githubusercontent.com/pixincreate/opencode-global-sessions/master/scripts/install.sh | bashCheck it:
sesh listRestart OpenCode and run:
/sessions-global
To install a specific release:
curl -fsSL https://raw.githubusercontent.com/pixincreate/opencode-global-sessions/master/scripts/install.sh | bash -s -- --version 1.0.0Use clone mode when working on the plugin locally. It clones the repo, builds the plugin, symlinks the CLI to ~/.local/bin/sesh, and points OpenCode at the local dist/tui.js.
curl -fsSL https://raw.githubusercontent.com/pixincreate/opencode-global-sessions/master/scripts/install.sh | bash -s -- --cloneIf you keep the CLI somewhere else, tell the plugin where it is:
export SESH_BIN="/absolute/path/to/sesh"Run the installer in uninstall mode:
curl -fsSL https://raw.githubusercontent.com/pixincreate/opencode-global-sessions/master/scripts/install.sh | bash -s -- --uninstallThis removes ~/.local/bin/sesh and the installer-managed OpenCode plugin entry. If you set this env var manually, remove it from your shell config too:
SESH_BINRun this inside OpenCode:
/sessions-global
Pick a session:
| Command | What it does |
|---|---|
| sesh list [n] | list recent sessions |
| sesh search q | search titles, directories, prompts, and text replies |
| sesh show id | show session details |
| sesh log id | show user and assistant text |
| sesh prompts id | show user prompts only |
| sesh files id | list files touched in a session |
| sesh resume id | print opencode -s id |
| sesh move id dir | move a session to an existing OpenCode project |
| sesh today | list sessions active in the last 24 hours |
| sesh stats | show simple database stats |
| sesh config | show paths and environment |
Examples:
sesh list 25 --json
sesh search checkout --since 7d --limit 5
sesh search webhook --fuzzy
sesh log ses_xxx --limit 20
sesh resume ses_xxx
sesh move ses_xxx /path/to/project
sesh move ses_xxx /path/to/project --applyOpenCode subagent sessions are hidden from discovery commands by default. Add --verbose to include them:
sesh list --verbose
sesh search tui --verboseDirect commands still work if you already know the session ID:
sesh show ses_xxx
sesh log ses_xxxsesh move is CLI-only. By default it prints the current and target project without writing anything. Add --apply to create a database backup and update the session.
OpenCode stores sessions in:
~/.local/share/opencode/opencode.db
sesh uses that SQLite database directly:
The CLI reads the database. The OpenCode TUI plugin calls:
sesh list <limit> --jsonThen it renders those rows in an OpenCode picker.
Most commands are read-only. sesh move ... --apply is the exception: it creates a backup next to opencode.db, then updates one existing session row to point at an existing project row. It uses a normal SQLite UPDATE; it does not alter the schema or run a migration.
Run the full local check:
npm run checkThat runs ShellCheck, builds the TUI plugin, and runs E2E tests against a temporary SQLite database.
Create a release:
npm run release -- 1.0.1That updates the package version, runs checks, commits the version bump, creates v1.0.1, and pushes the branch and tag. The release workflow attaches the package tarball to the GitHub release.
Keep the tool small.
Before opening a PR:
npm run checkPrefer changes that keep the CLI useful on its own. The TUI plugin should stay a thin wrapper around the CLI unless there is a strong reason to duplicate logic.
| Back | FazBrowse Home | New Git URL |