Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opencode-session-id

OpenCode TUI plugin that adds one command: copy the current OpenCode session ID to your clipboard.

Command

Use /opencode-copy-session-id from OpenCode.

The command copies the ID of the session you are currently in. If you run it outside a session (for example from the home screen), it shows a warning instead.

On Linux the plugin copies to the local Wayland clipboard with wl-copy. When OpenCode runs on a machine controlled remotely (for example an Ubuntu host operated from a Mac), set OPENCODE_SESSION_ID_SSH_BRIDGE to user@host (the Mac reaches the clipboard through ssh <bridge> pbcopy). Override the SSH key with OPENCODE_SESSION_ID_SSH_KEY (defaults to ~/.ssh/id_rsa).

Local install (used by this setup)

Build the package and point OpenCode's global TUI config at the generated file:

npm install
npm run build
{
  "$schema": "https://opencode.ai/tui.json",
  "plugin": [
    "file:///Users/you/.config/opencode/tui-plugins/opencode-session-id/dist/index.js"
  ]
}

Restart OpenCode after changing tui.json; TUI plugins are loaded at startup.

Install from npm (optional)

Add the published package to your global OpenCode TUI config at ~/.config/opencode/tui.json:

{
  "$schema": "https://opencode.ai/tui.json",
  "plugin": [
    "opencode-session-id"
  ]
}

Restart OpenCode after changing tui.json; TUI plugins are loaded at startup.

Build

npm install
npm run build

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages