From 3f680c02fb245d01ddcb786dbb31dd5c48b60f6e Mon Sep 17 00:00:00 2001 From: minhn4 Date: Wed, 15 Jul 2026 08:11:17 +0700 Subject: [PATCH] fix: rebrand GitHub integration CLI to codev Close the "GitHub Action" rebrand gap: `codev github run` now triggers on /codev, creates codev/* branches, and posts codev-branded footers; `codev github install` scaffolds the fork's codev.yml workflow with GITHUB_TOKEN auth instead of installing upstream's GitHub App. Re-enable the parked GitHub tips in the TUI, rewrite github.mdx (en + es) to match, and update DIVERGENCES.md. Co-Authored-By: Claude Fable 5 --- DIVERGENCES.md | 14 +-- github/README.md | 2 +- .../opencode/src/cli/cmd/github.handler.ts | 102 ++++------------ .../src/feature-plugins/home/tips-view.tsx | 11 +- packages/web/src/content/docs/es/github.mdx | 101 ++++++++-------- packages/web/src/content/docs/github.mdx | 113 ++++++++---------- 6 files changed, 133 insertions(+), 210 deletions(-) diff --git a/DIVERGENCES.md b/DIVERGENCES.md index bdac533c7b..594ef997f7 100644 --- a/DIVERGENCES.md +++ b/DIVERGENCES.md @@ -67,7 +67,7 @@ from the squash message first, or use a plain merge. | `packages/opencode/package.json` | bin key `opencode` → `codev` (shim path `./bin/opencode` unchanged); added `release` script | Installed command is `codev` — matches the CLI's `scriptName` and help text (the hub's command is `codevhub`; it relinquished the `codev` bin in codev-ai ≥ 0.4.0). `bun run release` publishes the version in this file (upstream-synced; script/release.ts is fork-only). | Keep our bin key and release line; take upstream's other fields including `version`. | | `bun.lock` | Mirrors the bin key rename above and the fork-only workspace packages/deps (`@codev/gateway`) | Lockfile records workspace bin mappings and workspace deps. | Regenerate with `bun install`; never hand-merge. | | `packages/tui/package.json` | Added dependency `"@codev/gateway": "workspace:*"` | The fork's gateway configure dialog imports SSO/backend/config-block logic from the fork-only `packages/codev-gateway`. | Keep our dependency line; take upstream's other fields. | -| `packages/tui/src/feature-plugins/home/tips-view.tsx` | `NO_MODELS_TIP` points at `/configure` (CoDev gateway) instead of `/connect`; tip strings rebranded — built-CLI examples `opencode ` → `codev ` (`serve`, `upgrade`, `agent create`, `github install`, `debug config`) and product prose "OpenCode" → "CoDev Code". Dropped the `docker run … ghcr.io/anomalyco/opencode` tip and the `/connect` tip that advertised "OpenCode Zen" (a generic `/connect` tip already exists). **Rebrand gap — parked, not rebranded:** the GitHub-integration tips (`codev github install`, the two `/opencode` issue/PR trigger tips, and the `/oc` PR-review trigger tip) are commented out as a block (with a `TODO(rebrand)`) instead of shown or rebranded. | The tips name the fork's CLI (`codev`) and product; no fork docker image (see web-docs install row); Zen is upstream's hosted gateway. The trigger tips can't be rebranded to `/codev` yet: the GitHub app still fires on `/opencode` & `/oc` (`packages/opencode/src/cli/cmd/github.handler.ts` unchanged), so showing `/codev` would mislead and showing `/opencode` re-introduces the upstream brand — and the `github install` tip sets up that same integration, so the whole cluster is parked to keep docs↔behavior honest until the trigger phrase itself is rebranded. The `opencode.status` command id stays (internal identifier, not user-facing). | Keep our tip text, the docker-tip and Zen-`/connect`-tip deletions, and the commented-out GitHub-integration tip block. When the GitHub trigger phrase is rebranded, re-enable and rebrand that whole block (drop the `TODO`). Rebrand any new upstream `opencode `/"OpenCode" tip; drop any re-added docker/brew/curl install tip. | +| `packages/tui/src/feature-plugins/home/tips-view.tsx` | `NO_MODELS_TIP` points at `/configure` (CoDev gateway) instead of `/connect`; tip strings rebranded — built-CLI examples `opencode ` → `codev ` (`serve`, `upgrade`, `agent create`, `github install`, `debug config`) and product prose "OpenCode" → "CoDev Code". Dropped the `docker run … ghcr.io/anomalyco/opencode` tip and the `/connect` tip that advertised "OpenCode Zen" (a generic `/connect` tip already exists). GitHub-integration tips rebranded to the fork's trigger: the two `/opencode` tips and the `/oc` PR-review tip now say `/codev` (matches the rebranded `github.handler.ts` + `github/action.yml` defaults). | The tips name the fork's CLI (`codev`), product, and `/codev` GitHub trigger; no fork docker image (see web-docs install row); Zen is upstream's hosted gateway. The `opencode.status` command id stays (internal identifier, not user-facing). | Keep our tip text and the docker-tip and Zen-`/connect`-tip deletions. Rebrand any new upstream `opencode `/"OpenCode"/`/opencode`-trigger tip; drop any re-added docker/brew/curl install tip. | | `packages/tui/src/feature-plugins/sidebar/footer.tsx` | Deleted the dismissable "Getting started" card (free-models pitch + `/connect` pointer + `dismissed_getting_started` KV flag); the sidebar footer keeps only the cwd path display | The card advertises upstream's hosted free Zen models — which the fork hides — and points at `/connect` while first-run setup routes through `/configure`; the fork's startup gate covers onboarding. | Keep the card deleted; take upstream's changes to the remaining path display. | | `packages/tui/src/ui/dialog.tsx` | Added a `persistent` store flag (with `setPersistent`/`persistent` accessors): escape and the click-outside backdrop no-op while set, and ctrl+c dispatches `app.exit.confirm` (base-mode-only, so suppressed under modal) instead of closing; every `replace`/`clear` resets it to false | The CoDev gateway configure flow is a non-dismissable first-run gate; ctrl+c stays the quit escape hatch (double-press — see the double-Ctrl+C row). Default-false keeps every other dialog dismissable. | Keep our persistent flag, the escape/backdrop guards, the ctrl+c `app.exit.confirm` dispatch, and the reset lines; take upstream's surrounding changes. | | `packages/tui/src/ui/dialog-select.tsx` | Added a `persistent?` prop that hides the top-right `esc` hint | A non-dismissable select shouldn't advertise `esc` (the dialog store's persistent flag blocks the actual close). | Keep our prop + the `Show` wrapper around the esc label; take upstream's surrounding changes. | @@ -118,12 +118,14 @@ from the squash message first, or use a plain merge. | `CONTRIBUTING.md`, `SECURITY.md` | Product-brand prose "OpenCode" → "CoDev Code"; built-CLI command examples `opencode …` → `codev …` | Docs people actually read should name the fork's product. Upstream issue/advisory links, `packages/opencode` paths, and build-output paths stay upstream; env-var mentions follow the env-var rename row. | Keep our strings; take upstream's structural changes. | | `CONTEXT.md` | Product-brand prose "OpenCode" → "CoDev Code" (title, intro, and defined terms such as "CoDev Code Client" / "Embedded CoDev Code") | The V2 design glossary should name the fork's product; the renamed terms appear only in this file, so nothing desyncs. `@opencode-ai/*` package names stay upstream; env-var mentions follow the env-var rename row. | Keep our brand strings; take upstream's design changes (this file evolves with the V2 session core — merge content, re-apply the brand rename). | | `STATS.md` | Deleted | Upstream's download-stats log; meaningless for the fork. | Keep deleted. | -| Web docs, repo-wide (~70 files under `packages/web/src/content/docs/` en + `es/`) | Product-brand prose "OpenCode" → "CoDev Code" and built-CLI examples `opencode ` → `codev ` (incl. bare `opencode` invocations); XDG data/cache/config path examples corrected to match `Global.Path` (`app = "codev"` in `packages/core/src/global.ts`): `~/.local/share/opencode`→`…/codev`, `~/.cache/opencode`→`…/codev`, `$XDG_CONFIG_HOME/opencode/themes`→`…/codev/themes`, and the `%USERPROFILE%\…` Windows forms. **Install docs rewritten to the fork's real distribution** (`index.mdx`, `windows-wsl.mdx`, `gitlab.mdx` CI, en + es): the fork ships only as the npm package `codev-code` (npm/bun/pnpm/yarn) with GitHub release binaries at `quickbeard/codev-code` — matches `packages/opencode/src/installation/index.ts`. Removed the channels the fork does not publish (upstream's `curl … opencode.ai/install` script, `brew install anomalyco/tap/opencode`, Arch pacman/AUR, Chocolatey, Scoop, Mise `github:anomalyco/opencode`, `docker … ghcr.io/anomalyco/opencode`) and the `anomalyco/opencode/releases` link. NOT renamed (load-bearing / not ours): "OpenCode Zen" and "OpenCode Go" (+ their team refs and `opencode.ai/zen/...` URLs / `opencode`,`opencode-go` provider+model ids), every `opencode.ai` URL incl. the `$schema` values (`config.json`/`tui.json`/`theme.json`), `@opencode-ai/*` SDK/plugin packages, GitHub/GitLab integration (`/opencode` & `/oc` triggers, `opencode-agent` app, `anomalyco/opencode/github@latest`, `.github/workflows/opencode.yml`, `anomalyco/opencode` repo refs), runtime defaults that still match code (`opencode.local` mDNS, `.well-known/opencode`, theme id/sound-pack `opencode`, default basic-auth username `opencode`), the VS Code Marketplace listing name, and third-party project names (`opencode.nvim`, `opencode-helicone-session`, `awesome-opencode`, etc.) | The published docs should name the fork's product and its `codev` CLI, and copy-pasteable commands/paths must work against the fork (binary `codev`, npm package `codev-code`, XDG dir `codev`); documenting install channels the fork doesn't publish sends users to stock opencode. The kept items are external products, real URLs/packages/integration identifiers, or runtime values that must match unchanged code. | Keep our brand/CLI/path/install strings; take upstream's structural doc changes. Rebrand any new upstream `opencode `/"OpenCode" prose and stale `opencode` XDG path, leaving the NOT-renamed list. If upstream re-adds brew/curl/choco/scoop/mise/docker install methods, drop them unless the fork actually publishes to that channel. | +| Web docs, repo-wide (~70 files under `packages/web/src/content/docs/` en + `es/`) | Product-brand prose "OpenCode" → "CoDev Code" and built-CLI examples `opencode ` → `codev ` (incl. bare `opencode` invocations); XDG data/cache/config path examples corrected to match `Global.Path` (`app = "codev"` in `packages/core/src/global.ts`): `~/.local/share/opencode`→`…/codev`, `~/.cache/opencode`→`…/codev`, `$XDG_CONFIG_HOME/opencode/themes`→`…/codev/themes`, and the `%USERPROFILE%\…` Windows forms. **Install docs rewritten to the fork's real distribution** (`index.mdx`, `windows-wsl.mdx`, `gitlab.mdx` CI, en + es): the fork ships only as the npm package `codev-code` (npm/bun/pnpm/yarn) with GitHub release binaries at `quickbeard/codev-code` — matches `packages/opencode/src/installation/index.ts`. Removed the channels the fork does not publish (upstream's `curl … opencode.ai/install` script, `brew install anomalyco/tap/opencode`, Arch pacman/AUR, Chocolatey, Scoop, Mise `github:anomalyco/opencode`, `docker … ghcr.io/anomalyco/opencode`) and the `anomalyco/opencode/releases` link. NOT renamed (load-bearing / not ours): "OpenCode Zen" and "OpenCode Go" (+ their team refs and `opencode.ai/zen/...` URLs / `opencode`,`opencode-go` provider+model ids), every `opencode.ai` URL incl. the `$schema` values (`config.json`/`tui.json`/`theme.json`), `@opencode-ai/*` SDK/plugin packages, GitLab integration (third-party `nagyv/gitlab-opencode` component, its `@opencode` trigger, `anomalyco/opencode` repo refs; the GitHub integration is rebranded — see the `github.mdx` row), runtime defaults that still match code (`opencode.local` mDNS, `.well-known/opencode`, theme id/sound-pack `opencode`, default basic-auth username `opencode`), the VS Code Marketplace listing name, and third-party project names (`opencode.nvim`, `opencode-helicone-session`, `awesome-opencode`, etc.) | The published docs should name the fork's product and its `codev` CLI, and copy-pasteable commands/paths must work against the fork (binary `codev`, npm package `codev-code`, XDG dir `codev`); documenting install channels the fork doesn't publish sends users to stock opencode. The kept items are external products, real URLs/packages/integration identifiers, or runtime values that must match unchanged code. | Keep our brand/CLI/path/install strings; take upstream's structural doc changes. Rebrand any new upstream `opencode `/"OpenCode" prose and stale `opencode` XDG path, leaving the NOT-renamed list. If upstream re-adds brew/curl/choco/scoop/mise/docker install methods, drop them unless the fork actually publishes to that channel. | | Test prose across `packages/*/test`, `packages/opencode/test/lib` | describe titles + comments naming the CLI command or product: `opencode `/"opencode CLI"/"OpenCode" → `codev …`/"CoDev Code" (incl. help-snapshot keys/labels — regenerate the `.snap`, see the scriptName row). Functional names stay: `@opencode-ai/*`, `~/.opencode/bin` install paths, provider id `opencode`, fixture APIs (`opencode.run`, `OpencodeCli`), auth method `opencode-login`, default username `opencode`, upstream issue refs, third-party names. Config-file and config-dir fixtures follow the rename rows (`codev.json`, `.codev/`). | Test names/comments are read by people; identifiers are load-bearing. | Keep our prose; take upstream's test-logic changes. | | `README.*.md` (21 translations) | Deleted | Upstream marketing translations, irrelevant to the fork. | Keep deleted (`git rm` the upstream side of modify/delete conflicts). | | `screenshot-uk.png` | Deleted | Orphaned README-translation asset; referenced by nothing. | Keep deleted. | | `artifacts/` (whole directory) | Deleted | Upstream's Remotion marketing-video project (`glm52-rise-video`) with rendered MP4/PNG binaries committed; irrelevant to the fork and bloats every clone. | Keep deleted (`git rm` the upstream side of modify/delete conflicts); delete new upstream additions under `artifacts/` too. | | `github/action.yml`, `github/index.ts`, `github/README.md` | Action name/prose "opencode" → "CoDev Code"; the action installs `codev-code` from npm (version from the npm registry, `npm install --prefix ~/.codev-code`, cache key `codev-*`) and runs `codev github run`; `mentions` input defaults to `/codev` (index.ts trigger matcher likewise); `share` input defaults to `"false"`; `use_github_token` defaults to `"true"`; README setup targets `quickbeard/codev-code/github@main` with GITHUB_TOKEN auth; index.ts spawns `codev serve`, generates `codev/*` branches, and rebrands visible strings | The action must install and run the fork's published CLI, not stock opencode. The fork has no GitHub App and its share service defaults off (config.ts row), so token exchange and sharing default off here too. NOT renamed: the `@opencode-ai/sdk` import, `api.opencode.ai` exchange endpoints, the `opencode-github-action` OIDC audience, `opencode.ai` share URLs, the social-cards URL, and internal identifiers (`createOpencode`, `assertOpencodeConnected`). | Keep our install steps, input defaults, and strings; take upstream's surrounding logic changes. | +| `packages/opencode/src/cli/cmd/github.handler.ts` | CLI side of the GitHub integration rebranded to match `github/` (row above). `githubRun`: `MENTIONS` default `/opencode,/oc` → `/codev`, generated branches `opencode/*` → `codev/*`, comment footer `[opencode session]` → `[codev session]`, visible log/prompt strings "opencode" → "codev". `githubInstall`: no longer installs upstream's GitHub App (browser flow + `api.opencode.ai` install poll removed; the fork's action defaults to GITHUB_TOKEN auth); scaffolds `.github/workflows/codev.yml` (was `opencode.yml`) triggering on `/codev` with `contents`/`issues`/`pull-requests: write` permissions, `uses: quickbeard/codev-code/github@main`, and `GITHUB_TOKEN` in `env`; next-steps text says `/codev summarize` and links the fork's `github/` README. | The trigger phrase, branches, footer, and scaffolded workflow are user-facing and must match the fork's action defaults (`github/action.yml` row); the fork has no GitHub App to install. NOT renamed: `AGENT_USERNAME` `opencode-agent[bot]` (upstream App bot identity, used for reaction cleanup in the app-token path), `api.opencode.ai` exchange endpoints, the `opencode-github-action` OIDC audience, `opencode.ai` share URLs, and the social-cards URL. | Keep our trigger/branch/footer strings and the app-less install flow; take upstream's surrounding logic changes. If upstream adds new user-facing "opencode" strings or workflow scaffold changes, rebrand them the same way. | +| `packages/web/src/content/docs/github.mdx` (en + es) | GitHub-integration docs rebrand: trigger `/opencode`/`/oc` → `/codev`, workflow examples `.github/workflows/opencode*.yml` → `codev*.yml` with `uses: quickbeard/codev-code/github@main` and `GITHUB_TOKEN` in `env`; the "Install the GitHub app" manual-setup step removed (GITHUB_TOKEN auth is the default; `use_github_token`/`mentions` documented, upstream App documented as the opt-out `use_github_token: false` path); `share` documented as defaulting to false; example permissions swap `id-token: write` for the `contents`/`issues`/`pull-requests: write` the token path needs. | Docs must match the rebranded CLI handler + action defaults (rows above); documenting upstream's `/opencode` trigger and GitHub App would mislead fork users. | Keep our triggers, action ref, auth model, and defaults; take upstream's structural doc changes. | | `.github/TEAM_MEMBERS` | Deleted | Upstream's team roster. The five workflows that read it (pr-standards, pr-management, triage, duplicate-issues, compliance-close) fetch it from a `dev` branch this fork doesn't have, so they are already inert here. | Keep deleted. | | `packages/script/src/index.ts` | Guard the `.github/TEAM_MEMBERS` read: fall back to an empty team list when the file is absent instead of throwing at module load | This module is imported by the publish path (`publish.ts`); the deleted `TEAM_MEMBERS` (row above) made `bun run release` crash with ENOENT. `Script.team` has no consumers in the fork. | Keep our `exists()` guard; take upstream's surrounding changes. | | `.github/workflows/` — 22 upstream workflows deleted (beta, close-issues, close-prs, compliance-close, containers, deploy, docs-locale-sync, docs-update, duplicate-issues, generate, nix-hashes, notify-discord, opencode, pr-management, pr-standards, publish, publish-github-action, publish-vscode, release-github-action, review, stats, triage) | Deleted | All inert or upstream-only here: gated on `anomalyco/opencode`, publish/deploy to upstream infra, need upstream secrets (`OPENCODE_APP_SECRET`, `OPENCODE_API_KEY`, marketplace/Discord/PostHog tokens), trigger only on a `dev` branch the fork lacks, or read the deleted `TEAM_MEMBERS`. | Keep deleted; delete new upstream workflows too unless they're generic self-contained CI. | @@ -156,14 +158,6 @@ from the squash message first, or use a plain merge. formats we can't author well — need design assets), desktop app ICONS (resources/icons — need design assets), and the `ai.opencode.desktop` appId / `opencode://` scheme (identity plumbing wired into deep-link handling). -- **GitHub Action**: `github/` is rebranded (see table row), but the CLI side is not: - `codev github run` (`packages/opencode/src/cli/cmd/github.handler.ts`) still posts - upstream-branded comment footers ("opencode session" links, social-card images), - creates `opencode/*` branches, and `codev github install` still scaffolds upstream's - opencode workflow + GitHub App (the README points at manual setup instead). The npm - `latest` (1.17.16, published from a pre-rename tree) also still ships the `codev-code` - bin, so the action's `codev` invocation needs the next release. Patch before external - distribution. - **Internal names**: `@opencode-ai/*` package names and file names inside `~/.local/share/codev` (e.g. `opencode-local.db`) keep upstream naming on purpose. Renaming them would be a permanent merge-conflict machine for names users never see. diff --git a/github/README.md b/github/README.md index c0e7c03fae..fb3641c60e 100644 --- a/github/README.md +++ b/github/README.md @@ -50,7 +50,7 @@ This allows for more targeted requests without needing to specify file paths or ## Installation -> Note: `codev github install` still scaffolds upstream's opencode workflow and GitHub App; use the manual setup below instead. +Run `codev github install` from the repo to scaffold the workflow file, or set it up manually: 1. Add the following workflow file to `.github/workflows/codev.yml` in your repo. Set the appropriate `model` and required API keys in `env`. diff --git a/packages/opencode/src/cli/cmd/github.handler.ts b/packages/opencode/src/cli/cmd/github.handler.ts index 0fa7c2e5d8..26a414bccb 100644 --- a/packages/opencode/src/cli/cmd/github.handler.ts +++ b/packages/opencode/src/cli/cmd/github.handler.ts @@ -1,5 +1,4 @@ import path from "path" -import { exec } from "child_process" import { Filesystem } from "@/util/filesystem" import * as prompts from "@clack/prompts" import { map, pipe, sortBy, values } from "remeda" @@ -140,7 +139,7 @@ type IssueQueryResponse = { const AGENT_USERNAME = "opencode-agent[bot]" const AGENT_REACTION = "eyes" -const WORKFLOW_FILE = ".github/workflows/opencode.yml" +const WORKFLOW_FILE = ".github/workflows/codev.yml" // Event categories for routing // USER_EVENTS: triggered by user actions, have actor/issueId, support reactions/comments @@ -163,7 +162,6 @@ export const githubInstall = Effect.fn("Cli.github.install")(function* () { UI.empty() prompts.intro("Install GitHub agent") const app = await getAppInfo() - await installGitHubApp() const providers = await Effect.runPromise(modelsDev.get()).then((p) => { // TODO: add guide for copilot, for now just hide it @@ -198,9 +196,9 @@ export const githubInstall = Effect.fn("Cli.github.install")(function* () { ` 1. Commit the \`${WORKFLOW_FILE}\` file and push`, step2, "", - " 3. Go to a GitHub issue and comment `/oc summarize` to see the agent in action", + " 3. Go to a GitHub issue and comment `/codev summarize` to see the agent in action", "", - " Learn more about the GitHub agent - https://opencode.ai/docs/github/#usage-examples", + " Learn more about the GitHub agent - https://github.com/quickbeard/codev-code/tree/main/github", ].join("\n"), ) } @@ -275,66 +273,15 @@ export const githubInstall = Effect.fn("Cli.github.install")(function* () { return model } - async function installGitHubApp() { - const s = prompts.spinner() - s.start("Installing GitHub app") - - // Get installation - const installation = await getInstallation() - if (installation) return s.stop("GitHub app already installed") - - // Open browser - const url = "https://github.com/apps/opencode-agent" - const command = - process.platform === "darwin" - ? `open "${url}"` - : process.platform === "win32" - ? `start "" "${url}"` - : `xdg-open "${url}"` - - exec(command, (error) => { - if (error) { - prompts.log.warn(`Could not open browser. Please visit: ${url}`) - } - }) - - // Wait for installation - s.message("Waiting for GitHub app to be installed") - const MAX_RETRIES = 120 - let retries = 0 - do { - const installation = await getInstallation() - if (installation) break - - if (retries > MAX_RETRIES) { - s.stop( - `Failed to detect GitHub app installation. Make sure to install the app for the \`${app.owner}/${app.repo}\` repository.`, - ) - throw new UI.CancelledError() - } - - retries++ - await sleep(1000) - } while (true) // oxlint-disable-line no-constant-condition - - s.stop("Installed GitHub app") - - async function getInstallation() { - return await fetch(`https://api.opencode.ai/get_github_app_installation?owner=${app.owner}&repo=${app.repo}`) - .then((res) => res.json()) - .then((data) => data.installation) - } - } - async function addWorkflowFiles() { - const envStr = + const providerEnv = provider === "amazon-bedrock" ? "" - : `\n env:${providers[provider].env.map((e) => `\n ${e}: \${{ secrets.${e} }}`).join("")}` + : providers[provider].env.map((e) => `\n ${e}: \${{ secrets.${e} }}`).join("") await Filesystem.write( path.join(app.root, WORKFLOW_FILE), - `name: opencode + `name: codev on: issue_comment: @@ -343,26 +290,25 @@ on: types: [created] jobs: - opencode: + codev: if: | - contains(github.event.comment.body, ' /oc') || - startsWith(github.event.comment.body, '/oc') || - contains(github.event.comment.body, ' /opencode') || - startsWith(github.event.comment.body, '/opencode') + contains(github.event.comment.body, ' /codev') || + startsWith(github.event.comment.body, '/codev') runs-on: ubuntu-latest permissions: - id-token: write - contents: read - pull-requests: read - issues: read + contents: write + issues: write + pull-requests: write steps: - name: Checkout repository uses: actions/checkout@v6 with: persist-credentials: false - - name: Run opencode - uses: anomalyco/opencode/github@latest${envStr} + - name: Run codev + uses: quickbeard/codev-code/github@main + env: + GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}${providerEnv} with: model: ${provider}/${model}`, ) @@ -494,7 +440,7 @@ export const githubRun = Effect.fn("Cli.github.run")(function* (args: { event?: await addReaction(commentType) } - // Setup opencode session + // Setup codev session const repoData = await fetchRepo() session = await runLocalEffect( sessionSvc.create({ @@ -736,7 +682,7 @@ export const githubRun = Effect.fn("Cli.github.run")(function* (args: { event?: } const reviewContext = getReviewCommentContext() - const mentions = (process.env["MENTIONS"] || "/opencode,/oc") + const mentions = (process.env["MENTIONS"] || "/codev") .split(",") .map((m) => m.trim().toLowerCase()) .filter(Boolean) @@ -887,7 +833,7 @@ export const githubRun = Effect.fn("Cli.github.run")(function* (args: { event?: } async function chat(message: string, files: PromptFiles = []) { - console.log("Sending message to opencode...") + console.log("Sending message to codev...") return runLocalEffect( Effect.gen(function* () { @@ -1076,9 +1022,9 @@ export const githubRun = Effect.fn("Cli.github.run")(function* (args: { event?: .join("") if (type === "schedule" || type === "dispatch") { const hex = crypto.randomUUID().slice(0, 6) - return `opencode/${type}-${hex}-${timestamp}` + return `codev/${type}-${hex}-${timestamp}` } - return `opencode/${type}${issueId}-${timestamp}` + return `codev/${type}${issueId}-${timestamp}` } async function pushToNewBranch(summary: string, branch: string, commit: boolean, isSchedule: boolean) { @@ -1352,7 +1298,7 @@ export const githubRun = Effect.fn("Cli.github.run")(function* (args: { event?: return `${titleAlt}\n` })() - const shareUrl = shareId ? `[opencode session](${shareBaseUrl}/s/${shareId})  |  ` : "" + const shareUrl = shareId ? `[codev session](${shareBaseUrl}/s/${shareId})  |  ` : "" return `\n\n${image}${shareUrl}[github run](${runUrl})` } @@ -1413,7 +1359,7 @@ query($owner: String!, $repo: String!, $number: Int!) { return [ "", "You are running as a GitHub Action. Important:", - "- Git push and PR creation are handled AUTOMATICALLY by the opencode infrastructure after your response", + "- Git push and PR creation are handled AUTOMATICALLY by the codev infrastructure after your response", "- Do NOT include warnings or disclaimers about GitHub tokens, workflow permissions, or PR creation capabilities", "- Do NOT suggest manual steps for creating PRs or pushing code - this happens automatically", "- Focus only on the code changes and your analysis/response", @@ -1551,7 +1497,7 @@ query($owner: String!, $repo: String!, $number: Int!) { return [ "", "You are running as a GitHub Action. Important:", - "- Git push and PR creation are handled AUTOMATICALLY by the opencode infrastructure after your response", + "- Git push and PR creation are handled AUTOMATICALLY by the codev infrastructure after your response", "- Do NOT include warnings or disclaimers about GitHub tokens, workflow permissions, or PR creation capabilities", "- Do NOT suggest manual steps for creating PRs or pushing code - this happens automatically", "- Focus only on the code changes and your analysis/response", diff --git a/packages/tui/src/feature-plugins/home/tips-view.tsx b/packages/tui/src/feature-plugins/home/tips-view.tsx index e2d01216c0..e284e13bfa 100644 --- a/packages/tui/src/feature-plugins/home/tips-view.tsx +++ b/packages/tui/src/feature-plugins/home/tips-view.tsx @@ -244,13 +244,10 @@ const TIPS: Tip[] = [ "Run {highlight}codev upgrade{/highlight} to update to the latest version", "Run {highlight}codev auth list{/highlight} to see all configured providers", "Run {highlight}codev agent create{/highlight} for guided agent creation", - // TODO(rebrand): the GitHub integration still triggers on /opencode and /oc - // (github.handler.ts is not yet rebranded), so these tips are parked commented-out - // until the trigger phrase changes — see the tips-view row in DIVERGENCES.md. - // "Run {highlight}codev github install{/highlight} to set up the GitHub workflow", - // "Use {highlight}/opencode{/highlight} in GitHub issues/PRs to trigger AI actions", - // "Comment {highlight}/opencode fix this{/highlight} on issues to auto-create PRs", - // "Comment {highlight}/oc{/highlight} on PR code lines for targeted code reviews", + "Run {highlight}codev github install{/highlight} to set up the GitHub workflow", + "Use {highlight}/codev{/highlight} in GitHub issues/PRs to trigger AI actions", + "Comment {highlight}/codev fix this{/highlight} on issues to auto-create PRs", + "Comment {highlight}/codev{/highlight} on PR code lines for targeted code reviews", 'Use {highlight}"theme": "system"{/highlight} to match your terminal\'s colors', "Create JSON theme files in {highlight}.codev/themes/{/highlight} directory", "Themes support dark/light variants for both modes", diff --git a/packages/web/src/content/docs/es/github.mdx b/packages/web/src/content/docs/es/github.mdx index 3d4d951db7..2bc8e497bb 100644 --- a/packages/web/src/content/docs/es/github.mdx +++ b/packages/web/src/content/docs/es/github.mdx @@ -3,7 +3,7 @@ title: GitHub description: Utilice CoDev Code en problemas y solicitudes de extracción de GitHub. --- -CoDev Code se integra con su flujo de trabajo GitHub. Mencione `/opencode` o `/oc` en su comentario y CoDev Code ejecutará tareas dentro de su corredor de acciones GitHub. +CoDev Code se integra con su flujo de trabajo GitHub. Mencione `/codev` en su comentario y CoDev Code ejecutará tareas dentro de su corredor de acciones GitHub. --- @@ -23,7 +23,7 @@ Ejecute el siguiente comando en un proyecto que se encuentra en un repositorio G codev github install ``` -Esto lo guiará a través de la instalación de la aplicación GitHub, la creación del flujo de trabajo y la configuración de secretos. +Esto lo guiará a través de la creación del archivo de flujo de trabajo y la configuración de secretos. --- @@ -31,16 +31,12 @@ Esto lo guiará a través de la instalación de la aplicación GitHub, la creaci O puede configurarlo manualmente. -1. **Instale la aplicación GitHub** +1. **Agregar el flujo de trabajo** - Dirígete a [**github.com/apps/opencode-agent**](https://github.com/apps/opencode-agent). Asegúrese de que esté instalado en el repositorio de destino. + Agregue el siguiente archivo de flujo de trabajo a `.github/workflows/codev.yml` en su repositorio. Asegúrese de configurar las claves `model` apropiadas y API requeridas en `env`. -2. **Agregar el flujo de trabajo** - - Agregue el siguiente archivo de flujo de trabajo a `.github/workflows/opencode.yml` en su repositorio. Asegúrese de configurar las claves `model` apropiadas y API requeridas en `env`. - - ```yml title=".github/workflows/opencode.yml" {24,26} - name: opencode + ```yml title=".github/workflows/codev.yml" {25,30} + name: codev on: issue_comment: @@ -49,31 +45,32 @@ O puede configurarlo manualmente. types: [created] jobs: - opencode: - if: | - contains(github.event.comment.body, '/oc') || - contains(github.event.comment.body, '/opencode') + codev: + if: contains(github.event.comment.body, '/codev') runs-on: ubuntu-latest permissions: - id-token: write + contents: write + issues: write + pull-requests: write steps: - - name: Checkout repository - uses: actions/checkout@v6 - with: - fetch-depth: 1 - persist-credentials: false - - - name: Run CoDev Code - uses: anomalyco/opencode/github@latest + - name: Checkout repository + uses: actions/checkout@v6 + with: + fetch-depth: 1 + persist-credentials: false + + - name: Run CoDev Code + uses: quickbeard/codev-code/github@main env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: model: anthropic/claude-sonnet-4-20250514 - # share: true - # github_token: xxxx ``` -3. **Guarda las claves API en secretos** + La acción se autentica de forma predeterminada con el [`GITHUB_TOKEN` incorporado](https://docs.github.com/en/actions/tutorials/authenticate-with-github_token) del flujo de trabajo, por lo que no es necesario instalar ninguna aplicación GitHub. Las confirmaciones, los comentarios y las solicitudes de extracción aparecen como provenientes de `github-actions[bot]`. + +2. **Guarda las claves API en secretos** En la **configuración** de tu organización o proyecto, expande **Secretos y variables** a la izquierda y selecciona **Acciones**. Y agregue las claves API requeridas. @@ -83,21 +80,19 @@ O puede configurarlo manualmente. - `model`: El modelo a usar con CoDev Code. Toma el formato de `provider/model`. Esto es **obligatorio**. - `agent`: El agente a utilizar. Debe ser un agente primario. Vuelve a `default_agent` desde la configuración o `"build"` si no se encuentra. -- `share`: si se comparte la sesión CoDev Code. El valor predeterminado es **verdadero** para repositorios públicos. +- `share`: si se comparte la sesión CoDev Code. El valor predeterminado es **falso**; compartir publica la sesión en el servicio de compartir del proyecto original (upstream). - `prompt`: mensaje personalizado opcional para anular el comportamiento predeterminado. Utilice esto para personalizar cómo CoDev Code procesa las solicitudes. -- `token`: token de acceso GitHub opcional para realizar operaciones como crear comentarios, confirmar cambios y abrir solicitudes de extracción. De forma predeterminada, CoDev Code usa el token de acceso a la instalación de la aplicación CoDev Code GitHub, por lo que las confirmaciones, los comentarios y las solicitudes de extracción aparecen como provenientes de la aplicación. - - Alternativamente, puede usar el GitHub Action Runner [`GITHUB_TOKEN`](https://docs.github.com/en/actions/tutorials/authenticate-with-github_token) incorporado sin instalar la aplicación CoDev Code GitHub. Solo asegúrese de otorgar los permisos necesarios en su flujo de trabajo: +- `mentions`: lista separada por comas de frases desencadenantes (sin distinguir mayúsculas de minúsculas). El valor predeterminado es `/codev`. +- `use_github_token`: si se autentica con el `GITHUB_TOKEN` del flujo de trabajo. El valor predeterminado es **verdadero**. Asegúrese de otorgar los permisos necesarios en su flujo de trabajo: ```yaml permissions: - id-token: write contents: write pull-requests: write issues: write ``` - También puede utilizar [tokens de acceso personal](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)(PAT) si lo prefiere. + Configúrelo en `false` solo si la aplicación [opencode-agent GitHub App](https://github.com/apps/opencode-agent) del proyecto original está instalada en el repositorio; la acción entonces intercambia un token OIDC por un token de aplicación (esto requiere el permiso `id-token: write`), y la actividad aparece como proveniente de la aplicación. --- @@ -107,8 +102,8 @@ CoDev Code puede desencadenarse por los siguientes eventos GitHub: | Tipo de evento | Activado por | Detalles | | ----------------------------- | --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -| `issue_comment` | Comentar sobre un tema o PR | Mencione `/opencode` o `/oc` en su comentario. CoDev Code lee el contexto y puede crear ramas, abrir relaciones públicas o responder. | -| `pull_request_review_comment` | Comente líneas de código específicas en un PR | Mencione `/opencode` o `/oc` mientras revisa el código. CoDev Code recibe la ruta del archivo, los números de línea y el contexto de diferencias. | +| `issue_comment` | Comentar sobre un tema o PR | Mencione `/codev` en su comentario. CoDev Code lee el contexto y puede crear ramas, abrir relaciones públicas o responder. | +| `pull_request_review_comment` | Comente líneas de código específicas en un PR | Mencione `/codev` mientras revisa el código. CoDev Code recibe la ruta del archivo, los números de línea y el contexto de diferencias. | | `issues` | Número abierto o editado | Activa automáticamente CoDev Code cuando se crean o modifican problemas. Requiere entrada `prompt`. | | `pull_request` | PR abierto o actualizado | Activa automáticamente CoDev Code cuando los PR se abren, sincronizan o vuelven a abrir. Útil para revisiones automatizadas. | | `schedule` | Programación basada en cron | Ejecute CoDev Code según una programación. Requiere entrada `prompt`. La salida va a registros y relaciones públicas (no hay temas que comentar). | @@ -118,7 +113,7 @@ CoDev Code puede desencadenarse por los siguientes eventos GitHub: Ejecute CoDev Code según una programación para realizar tareas automatizadas: -```yaml title=".github/workflows/opencode-scheduled.yml" +```yaml title=".github/workflows/codev-scheduled.yml" name: Scheduled CoDev Code Task on: @@ -126,10 +121,9 @@ on: - cron: "0 9 * * 1" # Every Monday at 9am UTC jobs: - opencode: + codev: runs-on: ubuntu-latest permissions: - id-token: write contents: write pull-requests: write issues: write @@ -140,9 +134,10 @@ jobs: persist-credentials: false - name: Run CoDev Code - uses: anomalyco/opencode/github@latest + uses: quickbeard/codev-code/github@main env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: model: anthropic/claude-sonnet-4-20250514 prompt: | @@ -158,8 +153,8 @@ Para eventos programados, la entrada `prompt` es **obligatoria** ya que no hay c Revisar automáticamente los PR cuando se abren o actualizan: -```yaml title=".github/workflows/opencode-review.yml" -name: opencode-review +```yaml title=".github/workflows/codev-review.yml" +name: codev-review on: pull_request: @@ -169,21 +164,19 @@ jobs: review: runs-on: ubuntu-latest permissions: - id-token: write contents: read - pull-requests: read - issues: read + pull-requests: write + issues: write steps: - uses: actions/checkout@v6 with: persist-credentials: false - - uses: anomalyco/opencode/github@latest + - uses: quickbeard/codev-code/github@main env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: model: anthropic/claude-sonnet-4-20250514 - use_github_token: true prompt: | Review this pull request: - Check for code quality issues @@ -199,7 +192,7 @@ Para los eventos `pull_request`, si no se proporciona `prompt`, CoDev Code revis Clasifique automáticamente nuevos problemas. Este ejemplo filtra cuentas con más de 30 días para reducir el spam: -```yaml title=".github/workflows/opencode-triage.yml" +```yaml title=".github/workflows/codev-triage.yml" name: Issue Triage on: @@ -210,7 +203,6 @@ jobs: triage: runs-on: ubuntu-latest permissions: - id-token: write contents: write pull-requests: write issues: write @@ -233,10 +225,11 @@ jobs: with: persist-credentials: false - - uses: anomalyco/opencode/github@latest + - uses: quickbeard/codev-code/github@main if: steps.check.outputs.result == 'true' env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: model: anthropic/claude-sonnet-4-20250514 prompt: | @@ -254,8 +247,8 @@ Para eventos `issues`, la entrada `prompt` es **obligatoria** ya que no hay ning Anule el mensaje predeterminado para personalizar el comportamiento de CoDev Code para su flujo de trabajo. -```yaml title=".github/workflows/opencode.yml" -- uses: anomalyco/opencode/github@latest +```yaml title=".github/workflows/codev.yml" +- uses: quickbeard/codev-code/github@main with: model: anthropic/claude-sonnet-4-5 prompt: | @@ -278,7 +271,7 @@ A continuación se muestran algunos ejemplos de cómo puede utilizar CoDev Code Agregue este comentario en una edición GitHub. ``` - /opencode explain this issue + /codev explain this issue ``` CoDev Code leerá el hilo completo, incluidos todos los comentarios, y responderá con una explicación clara. @@ -288,7 +281,7 @@ A continuación se muestran algunos ejemplos de cómo puede utilizar CoDev Code En un problema GitHub, diga: ``` - /opencode fix this + /codev fix this ``` Y CoDev Code creará una nueva rama, implementará los cambios y abrirá un PR con los cambios. @@ -298,7 +291,7 @@ A continuación se muestran algunos ejemplos de cómo puede utilizar CoDev Code Deja el siguiente comentario en un GitHub PR. ``` - Delete the attachment from S3 when the note is removed /oc + Delete the attachment from S3 when the note is removed /codev ``` CoDev Code implementará el cambio solicitado y lo comprometerá con el mismo PR. @@ -309,7 +302,7 @@ A continuación se muestran algunos ejemplos de cómo puede utilizar CoDev Code ``` [Comment on specific lines in Files tab] - /oc add error handling here + /codev add error handling here ``` Al comentar líneas específicas, CoDev Code recibe: diff --git a/packages/web/src/content/docs/github.mdx b/packages/web/src/content/docs/github.mdx index b8a89e32f9..c4fd525e27 100644 --- a/packages/web/src/content/docs/github.mdx +++ b/packages/web/src/content/docs/github.mdx @@ -3,7 +3,7 @@ title: GitHub description: Use CoDev Code in GitHub issues and pull-requests. --- -CoDev Code integrates with your GitHub workflow. Mention `/opencode` or `/oc` in your comment, and CoDev Code will execute tasks within your GitHub Actions runner. +CoDev Code integrates with your GitHub workflow. Mention `/codev` in your comment, and CoDev Code will execute tasks within your GitHub Actions runner. --- @@ -23,7 +23,7 @@ Run the following command in a project that is in a GitHub repo: codev github install ``` -This will walk you through installing the GitHub app, creating the workflow, and setting up secrets. +This will walk you through creating the workflow file and setting up secrets. --- @@ -31,16 +31,12 @@ This will walk you through installing the GitHub app, creating the workflow, and Or you can set it up manually. -1. **Install the GitHub app** +1. **Add the workflow** - Head over to [**github.com/apps/opencode-agent**](https://github.com/apps/opencode-agent). Make sure it's installed on the target repository. + Add the following workflow file to `.github/workflows/codev.yml` in your repo. Make sure to set the appropriate `model` and required API keys in `env`. -2. **Add the workflow** - - Add the following workflow file to `.github/workflows/opencode.yml` in your repo. Make sure to set the appropriate `model` and required API keys in `env`. - - ```yml title=".github/workflows/opencode.yml" {24,26} - name: opencode + ```yml title=".github/workflows/codev.yml" {25,30} + name: codev on: issue_comment: @@ -49,31 +45,32 @@ Or you can set it up manually. types: [created] jobs: - opencode: - if: | - contains(github.event.comment.body, '/oc') || - contains(github.event.comment.body, '/opencode') + codev: + if: contains(github.event.comment.body, '/codev') runs-on: ubuntu-latest permissions: - id-token: write + contents: write + issues: write + pull-requests: write steps: - - name: Checkout repository - uses: actions/checkout@v6 - with: - fetch-depth: 1 - persist-credentials: false - - - name: Run CoDev Code - uses: anomalyco/opencode/github@latest + - name: Checkout repository + uses: actions/checkout@v6 + with: + fetch-depth: 1 + persist-credentials: false + + - name: Run CoDev Code + uses: quickbeard/codev-code/github@main env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: model: anthropic/claude-sonnet-4-20250514 - # share: true - # github_token: xxxx ``` -3. **Store the API keys in secrets** + The action authenticates with the workflow's [built-in `GITHUB_TOKEN`](https://docs.github.com/en/actions/tutorials/authenticate-with-github_token) by default, so no GitHub App install is needed. Commits, comments, and pull requests appear as coming from `github-actions[bot]`. + +2. **Store the API keys in secrets** In your organization or project **settings**, expand **Secrets and variables** on the left and select **Actions**. And add the required API keys. @@ -83,21 +80,19 @@ Or you can set it up manually. - `model`: The model to use with CoDev Code. Takes the format of `provider/model`. This is **required**. - `agent`: The agent to use. Must be a primary agent. Falls back to `default_agent` from config or `"build"` if not found. -- `share`: Whether to share the CoDev Code session. Defaults to **true** for public repositories. +- `share`: Whether to share the CoDev Code session. Defaults to **false**; sharing publishes the session to upstream's share service. - `prompt`: Optional custom prompt to override the default behavior. Use this to customize how CoDev Code processes requests. -- `token`: Optional GitHub access token for performing operations such as creating comments, committing changes, and opening pull requests. By default, CoDev Code uses the installation access token from the CoDev Code GitHub App, so commits, comments, and pull requests appear as coming from the app. - - Alternatively, you can use the GitHub Action runner's [built-in `GITHUB_TOKEN`](https://docs.github.com/en/actions/tutorials/authenticate-with-github_token) without installing the CoDev Code GitHub App. Just make sure to grant the required permissions in your workflow: +- `mentions`: Comma-separated list of trigger phrases (case-insensitive). Defaults to `/codev`. +- `use_github_token`: Whether to authenticate with the workflow's `GITHUB_TOKEN`. Defaults to **true**. Make sure to grant the required permissions in your workflow: ```yaml permissions: - id-token: write contents: write pull-requests: write issues: write ``` - You can also use a [personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)(PAT) if preferred. + Set it to `false` only if the upstream [opencode-agent GitHub App](https://github.com/apps/opencode-agent) is installed on the repository; the action then exchanges an OIDC token for an app token (this requires `id-token: write` permission), and activity appears as coming from the app. --- @@ -105,20 +100,20 @@ Or you can set it up manually. CoDev Code can be triggered by the following GitHub events: -| Event Type | Triggered By | Details | -| ----------------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `issue_comment` | Comment on an issue or PR | Mention `/opencode` or `/oc` in your comment. CoDev Code reads context and can create branches, open PRs, or reply. | -| `pull_request_review_comment` | Comment on specific code lines in a PR | Mention `/opencode` or `/oc` while reviewing code. CoDev Code receives file path, line numbers, and diff context. | -| `issues` | Issue opened or edited | Automatically trigger CoDev Code when issues are created or modified. Requires `prompt` input. | -| `pull_request` | PR opened or updated | Automatically trigger CoDev Code when PRs are opened, synchronized, or reopened. Useful for automated reviews. | -| `schedule` | Cron-based schedule | Run CoDev Code on a schedule. Requires `prompt` input. Output goes to logs and PRs (no issue to comment on). | -| `workflow_dispatch` | Manual trigger from GitHub UI | Trigger CoDev Code on demand via Actions tab. Requires `prompt` input. Output goes to logs and PRs. | +| Event Type | Triggered By | Details | +| ----------------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `issue_comment` | Comment on an issue or PR | Mention `/codev` in your comment. CoDev Code reads context and can create branches, open PRs, or reply. | +| `pull_request_review_comment` | Comment on specific code lines in a PR | Mention `/codev` while reviewing code. CoDev Code receives file path, line numbers, and diff context. | +| `issues` | Issue opened or edited | Automatically trigger CoDev Code when issues are created or modified. Requires `prompt` input. | +| `pull_request` | PR opened or updated | Automatically trigger CoDev Code when PRs are opened, synchronized, or reopened. Useful for automated reviews. | +| `schedule` | Cron-based schedule | Run CoDev Code on a schedule. Requires `prompt` input. Output goes to logs and PRs (no issue to comment on). | +| `workflow_dispatch` | Manual trigger from GitHub UI | Trigger CoDev Code on demand via Actions tab. Requires `prompt` input. Output goes to logs and PRs. | ### Schedule Example Run CoDev Code on a schedule to perform automated tasks: -```yaml title=".github/workflows/opencode-scheduled.yml" +```yaml title=".github/workflows/codev-scheduled.yml" name: Scheduled CoDev Code Task on: @@ -126,10 +121,9 @@ on: - cron: "0 9 * * 1" # Every Monday at 9am UTC jobs: - opencode: + codev: runs-on: ubuntu-latest permissions: - id-token: write contents: write pull-requests: write issues: write @@ -140,9 +134,10 @@ jobs: persist-credentials: false - name: Run CoDev Code - uses: anomalyco/opencode/github@latest + uses: quickbeard/codev-code/github@main env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: model: anthropic/claude-sonnet-4-20250514 prompt: | @@ -158,8 +153,8 @@ For scheduled events, the `prompt` input is **required** since there's no commen Automatically review PRs when they are opened or updated: -```yaml title=".github/workflows/opencode-review.yml" -name: opencode-review +```yaml title=".github/workflows/codev-review.yml" +name: codev-review on: pull_request: @@ -169,21 +164,19 @@ jobs: review: runs-on: ubuntu-latest permissions: - id-token: write contents: read - pull-requests: read - issues: read + pull-requests: write + issues: write steps: - uses: actions/checkout@v6 with: persist-credentials: false - - uses: anomalyco/opencode/github@latest + - uses: quickbeard/codev-code/github@main env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: model: anthropic/claude-sonnet-4-20250514 - use_github_token: true prompt: | Review this pull request: - Check for code quality issues @@ -199,7 +192,7 @@ For `pull_request` events, if no `prompt` is provided, CoDev Code defaults to re Automatically triage new issues. This example filters to accounts older than 30 days to reduce spam: -```yaml title=".github/workflows/opencode-triage.yml" +```yaml title=".github/workflows/codev-triage.yml" name: Issue Triage on: @@ -210,7 +203,6 @@ jobs: triage: runs-on: ubuntu-latest permissions: - id-token: write contents: write pull-requests: write issues: write @@ -233,10 +225,11 @@ jobs: with: persist-credentials: false - - uses: anomalyco/opencode/github@latest + - uses: quickbeard/codev-code/github@main if: steps.check.outputs.result == 'true' env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: model: anthropic/claude-sonnet-4-20250514 prompt: | @@ -254,8 +247,8 @@ For `issues` events, the `prompt` input is **required** since there's no comment Override the default prompt to customize CoDev Code's behavior for your workflow. -```yaml title=".github/workflows/opencode.yml" -- uses: anomalyco/opencode/github@latest +```yaml title=".github/workflows/codev.yml" +- uses: quickbeard/codev-code/github@main with: model: anthropic/claude-sonnet-4-5 prompt: | @@ -278,7 +271,7 @@ Here are some examples of how you can use CoDev Code in GitHub. Add this comment in a GitHub issue. ``` - /opencode explain this issue + /codev explain this issue ``` CoDev Code will read the entire thread, including all comments, and reply with a clear explanation. @@ -288,7 +281,7 @@ Here are some examples of how you can use CoDev Code in GitHub. In a GitHub issue, say: ``` - /opencode fix this + /codev fix this ``` And CoDev Code will create a new branch, implement the changes, and open a PR with the changes. @@ -298,7 +291,7 @@ Here are some examples of how you can use CoDev Code in GitHub. Leave the following comment on a GitHub PR. ``` - Delete the attachment from S3 when the note is removed /oc + Delete the attachment from S3 when the note is removed /codev ``` CoDev Code will implement the requested change and commit it to the same PR. @@ -309,7 +302,7 @@ Here are some examples of how you can use CoDev Code in GitHub. ``` [Comment on specific lines in Files tab] - /oc add error handling here + /codev add error handling here ``` When commenting on specific lines, CoDev Code receives: