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

    Postgres

    v0.1.3其他
    opencode-postgres

    OpenCode plugin that lets agents run Postgres SQL queries.

    GitHub 星标

    1

    月装机量

    40

    近 7 天 6

    综合评分SCORE

    28.5

    生态多维模型

    最近提交

    2 个月前

    2026-06-04

    快速安装与配置

    opencode.json

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

    opencode.json

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

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

    My personal OpenCode plugins.

    Packages

    • opencode-postgres: adds a Postgres Query tool for running SQL against a configured Postgres database.
    • opencode-mysql: adds a MySQL Query tool for running SQL against a configured MySQL 8+ database.
    • opencode-exit-plan: switches from the plan mode to a build agent when you say phrases like "go ahead".
    • opencode-keep-going: sends a continue prompt when you press Enter on an empty input.
    • opencode-quick-links: searches and opens links from the active conversation.

    Development

    npm install
    npm run typecheck
    npm run build
    npm run smoke
    npm run pack:dry-run
    

    Run a package script for one plugin with -w:

    npm run typecheck -w opencode-postgres
    

    Start local databases for the Postgres and MySQL plugins:

    docker compose up -d --wait
    

    The local Postgres wrapper connects on port 5432. The local MySQL wrapper connects on port 3307 so it can coexist with other MySQL services using the default port.

    License

    MIT