Logo
  • NOTES
  • BLOG
  • OSS
  • TALKS
  • WIKI
  • ABOUT
GITHUB

OpenCode + Github + Z.AI Coding Plan

Cover
Date
January 15, 2026
Tags
githubopencode

Combine OpenCode.ai with GitHub CLI to automate release tracking, generate reports, and query GitHub data through natural language prompts.

Quick Setup

OpenCode is an open-source AI coding agent that executes commands and interacts with tools like GitHub CLI. Use the Z.AI Coding Plan provider with glm-4.7 for coding-optimized results.

image

Run everything in Docker using dockette/vibestack:

PROMPT="Use Github CLI, already preconfigured, and list me last 5 releases \\
for github.com/contributte organization."

TOKEN="your_github_token"

docker run \
  -it \
  --rm \
  -v $(pwd):/workspace \
  -w /workspace \
  -e GH_TOKEN="${TOKEN}" \
  dockette/vibestack:latest \
  opencode run "${PROMPT}" 2>&1

Configure OpenCode in opencode.json:

Github

Trigger OpenCode from issue comments using /opencode or /oc. See the Contributte workflow for implementation.

Example prompt:

/opencode Find me all releases for github.com/contributte repositories released in 2025/12.

Example format:

Releases 2025/12 (5x)
1. [contributte/api] - v1.2.3 <https://github.com/contributte/api/releases/tag/v1.2.3>
2. [contributte/forms] - v2.0.0 <https://github.com/contributte/forms/releases/tag/v2.0.0>
3. [contributte/console] - v1.0.0 <https://github.com/contributte/console/releases/tag/v1.0.0>

OpenCode will:

  • Query all repositories in the organization via GitHub CLI
  • Filter releases by date
  • Format output consistently
  • Include direct release links

See issue #67 for a real-world example.

Output

As you can see there is tiny typo 26x releases, but so far so good.

Logo

© f3l1x

GitHubLinkedInXYouTube
{
    "$schema": "<https://opencode.ai/config.json>",
    "provider": {
        "zai-coding-plan": {
            "name": "Z.AI Coding Plan",
            "options": {
                "baseURL": "<https://api.z.ai/api/coding/paas/v4>",
                "apiKey": "your_z.ai_token"
            },
            "models": {
                "glm-4.7": {
                    "name": "glm-4.7"
                }
            }
        }
    },
    "model": "zai-coding-plan/glm-4.7"
}
Releases 2025/12 (26x)
1. [contributte/translation] - v2.0.7 https://github.com/contributte/translation/releases/tag/v2.0.7
2. [contributte/qa] - v0.4.0 https://github.com/contributte/qa/releases/tag/v0.4.0
3. [contributte/mcp] - v0.1.0 https://github.com/contributte/mcp/releases/tag/v0.1.0
4. [contributte/jsonrpc] - v7.0.0 https://github.com/contributte/jsonrpc/releases/tag/v7.0.0
5. [contributte/api-router] - v7.0.0 https://github.com/contributte/api-router/releases/tag/v7.0.0
6. [contributte/nextras-orm-query-object] - v0.6.0 https://github.com/contributte/nextras-orm-query-object/releases/tag/v0.6.0
7. [contributte/latte-parsedown-extra] - 3.0.0 https://github.com/contributte/latte-parsedown-extra/releases/tag/3.0.0
8. [contributte/doctrine-migrations] - v0.10.1 https://github.com/contributte/doctrine-migrations/releases/tag/v0.10.1
9. [contributte/http] - v0.5.0 https://github.com/contributte/http/releases/tag/v0.5.0
10. [contributte/di] - v0.6.0 https://github.com/contributte/di/releases/tag/v0.6.0
11. [contributte/security] - v0.5.0 https://github.com/contributte/security/releases/tag/v0.5.0
12. [contributte/application] - v0.6.2 https://github.com/contributte/application/releases/tag/v0.6.2
13. [contributte/vite] - v0.3.0 https://github.com/contributte/vite/releases/tag/v0.3.0
14. [contributte/api-docu] - v6.0.0 https://github.com/contributte/api-docu/releases/tag/v6.0.0
15. [contributte/api-docu] - v6.0.1 https://github.com/contributte/api-docu/releases/tag/v6.0.1
16. [contributte/latte] - v0.7.0 https://github.com/contributte/latte/releases/tag/v0.7.0
17. [contributte/api] - v0.5.0 https://github.com/contributte/api/releases/tag/v0.5.0
18. [contributte/bootstrap] - v0.7.0 https://github.com/contributte/bootstrap/releases/tag/v0.7.0
19. [contributte/cache] - v0.7.0 https://github.com/contributte/cache/releases/tag/v0.7.0
20. [contributte/database] - v0.4.0 https://github.com/contributte/database/releases/tag/v0.4.0
21. [contributte/phpunit] - v0.3.0 https://github.com/contributte/phpunit/releases/tag/v0.3.0
22. [contributte/juicyphp] - v0.2.0 https://github.com/contributte/juicyphp/releases/tag/v0.2.0
23. [contributte/neonizer] - v0.7.0 https://github.com/contributte/neonizer/releases/tag/v0.7.0
24. [contributte/kernel] - v0.2.0 https://github.com/contributte/kernel/releases/tag/v0.2.0
25. [contributte/dev] - v0.6.0 https://github.com/contributte/dev/releases/tag/v0.6.0
26. [contributte/tracy] - v0.7.0 https://github.com/contributte/tracy/releases/tag/v0.7.0
27. [contributte/doctrine-mongodb] - v0.2.0 https://github.com/contributte/doctrine-mongodb/releases/tag/v0.2.0