A projects and sessions sidebar for the OpenCode TUI.
The plugin uses OpenCode's native session sidebar slot, so the standard chat layout remains intact. It groups sessions by project, shows session status, and lets you open a session directly from the sidebar.
- OpenCode 1.18.27 or a compatible release with TUI plugin slots
The plugin currently renders in the native session sidebar. It is not shown on the home screen because OpenCode does not expose a home-screen sidebar slot.
Add the npm package to your OpenCode configuration:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-projects-sidebar"]
}Restart OpenCode after changing the configuration.
To use custom options, use the tuple form:
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
[
"opencode-projects-sidebar",
{
"width": 36,
"limit": 500
}
]
]
}- The project and session list is always rendered inside OpenCode's standard session sidebar below the native LSP section.
- The list includes sessions from all local projects known to OpenCode and refreshes every five seconds.
- Click a project header to collapse or expand its sessions.
- Only the two most recent sessions and sessions with an active status are
shown initially; click
moreto show the remaining sessions. - Click a session to open it.
- Hover a project header to create a clean session in its directory or rename the project.
- Hover a session to rename it.
| Option | Default | Description |
|---|---|---|
width |
36 |
Maximum text width used for names, clamped to 20-60 columns |
limit |
500 |
Maximum number of local sessions to request |
npm install
npm run typecheckThe package intentionally ships the TypeScript/TSX entry point. OpenCode loads TypeScript plugins directly.
MIT