跳到主要内容
    ↑↓ 选择↵ 打开esc 关闭
    中文English
    warpdotdev

    Warp

    v0.1.7工具与命令
    @warp-dot-dev/opencode-warp

    Warp terminal integration for OpenCode — native notifications and more

    GitHub 星标

    28

    月装机量

    6,509

    近 7 天 1.2k

    综合评分SCORE

    51.5

    生态多维模型

    最近提交

    2 个月前

    2026-06-05

    快速安装与配置

    opencode.json

    写入当前项目的 opencode.json,只对这个仓库生效。

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["@warp-dot-dev/opencode-warp@0.1.7"]
    }

    opencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。

    Official Warp terminal integration for OpenCode.

    Features

    🔔 Native Notifications

    Get native Warp notifications when OpenCode:

    • Completes a task — with a summary showing your prompt and the response
    • Needs your input — when a permission request is pending
    • Runs a tool — status updates as tools execute

    Notifications appear in Warp's notification center and as system notifications, so you can context-switch while OpenCode works and get alerted when attention is needed.

    Installation

    From npm (recommended)

    Add the plugin to your opencode.json:

    {
      "$schema": "https://opencode.ai/config.json",
      "plugin": ["@warp-dot-dev/opencode-warp"]
    }
    

    From local files

    Copy or symlink the built plugin into your OpenCode plugins directory:

    # Global
    cp dist/index.js ~/.config/opencode/plugins/opencode-warp.js
    
    # Or project-level
    cp dist/index.js .opencode/plugins/opencode-warp.js
    

    Requirements

    How It Works

    This plugin uses Warp's pluggable notifications feature via OSC escape sequences. When OpenCode triggers an event, the plugin:

    1. Reads event data from OpenCode's plugin API
    2. Formats a concise notification payload
    3. Sends an OSC 777 escape sequence to Warp, which displays a native notification

    The plugin hooks into these OpenCode events:

    • session.created — confirms the plugin is active
    • session.idle — fires when OpenCode finishes responding, includes your prompt and the response
    • permission.updated / permission.asked — fires when OpenCode needs tool approval
    • message.updated — fires when a user prompt is submitted
    • tool.execute.after — fires when a tool call completes

    Configuration

    Notifications work out of the box. To customize Warp's notification behavior (sounds, system notifications, etc.), see Warp's notification settings.

    Development

    # Install dependencies
    bun install
    
    # Type check
    bun run typecheck
    
    # Run tests
    bun test
    
    # Build
    bun run build
    

    Uninstall

    Remove "@warp-dot-dev/opencode-warp" from the plugin array in your opencode.json.

    Contributing

    Contributions welcome! Please open an issue or PR on GitHub.

    License

    MIT License — see LICENSE for details.