Skip to content
    ↑↓ select↵ openesc close
    English中文
    jradtilbrook

    Worktrunk

    v0.2.1Git & VCS
    opencode-worktrunk

    Show OpenCode session status in worktrunk's wt list output

    GitHub stars

    0

    Monthly installs

    19

    5 in 7 days

    Composite scoreSCORE

    19.3

    Multi-signal model

    Last commit

    5 months ago

    2026-03-10

    Install and configure

    opencode.json

    Writes to this project's opencode.json — applies to this repository only.

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["opencode-worktrunk@0.2.1"]
    }

    opencode loads npm dependencies through its embedded runtime on startup and caches them locally — no manual global install needed.

    See which worktrees have active OpenCode sessions at a glance.

    An OpenCode plugin that shows session status markers in worktrunk's wt list output.

    What It Does

    When you're running OpenCode in a git worktree, this plugin automatically sets status markers that appear in wt list:

    $ wt list
      Branch       Status        HEAD±    main↕  Remote⇅  Path                 Commit    Age   Message
    @ main             ^⇡                         ⇡1      .                    33323bc1  1d    Initial commit
    + feature-api      ↑ 🤖              ↑1               ../repo.feature-api  70343f03  1d    Add REST API endpoints
    + review-ui      ? ↑ 💬              ↑1               ../repo.review-ui    a585d6ed  1d    Add dashboard component
    + wip-docs       ? –                                  ../repo.wip-docs     33323bc1  1d    Initial commit
    
    • 🤖 — OpenCode is working
    • 💬 — OpenCode is waiting for input

    Prerequisites

    • worktrunk must be installed (cargo install worktrunk or brew install max-sixty/tap/worktrunk)
    • OpenCode v0.1.0+

    Installation

    Via npm (recommended)

    Add to your OpenCode config:

    // opencode.json or ~/.config/opencode/opencode.json
    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["opencode-worktrunk"]
    }
    

    Via local plugin

    Copy the plugin file to your OpenCode plugins directory:

    mkdir -p ~/.config/opencode/plugins
    curl -o ~/.config/opencode/plugins/worktrunk.ts \
      https://raw.githubusercontent.com/jradtilbrook/opencode-worktrunk/main/src/plugin/index.ts
    

    How It Works

    The plugin listens to OpenCode session events:

    Event Marker Meaning
    session.status (busy) 🤖 AI is actively working
    session.idle 💬 AI is waiting for your input
    session.deleted (cleared) Session ended

    Markers are stored in git config and persist until cleared. If you close OpenCode without a clean session end (e.g., Ctrl+C), the marker may persist — just run wt config state marker clear to reset it.

    Manual Marker Control

    You can also set markers manually for any workflow:

    wt config state marker set "🚧"                   # Current branch
    wt config state marker set "✅" --branch feature  # Specific branch
    wt config state marker clear                      # Clear current branch
    wt config state marker clear --all                # Clear all markers
    

    Related

    License

    MIT