From b117c16d656f601735fd5e34f57bb19f217d9ee1 Mon Sep 17 00:00:00 2001 From: CreatorGhost Date: Sat, 11 Jul 2026 15:11:25 +0530 Subject: [PATCH 1/8] chore(cli): rename binary opencode -> dcode --- .github/workflows/nix-hashes.yml | 15 +++++---------- bun.lock | 2 +- flake.nix | 8 +++++--- nix/opencode.nix | 16 ++++++++-------- package.json | 4 ++-- packages/opencode/Dockerfile | 8 ++++---- packages/opencode/bin/{opencode => dcode} | 8 ++++---- packages/opencode/package.json | 2 +- packages/opencode/script/build.ts | 12 +++++++----- packages/opencode/script/postinstall.mjs | 10 +++++----- packages/opencode/src/index.ts | 4 ++-- packages/opencode/src/temporary.ts | 2 +- 12 files changed, 45 insertions(+), 46 deletions(-) rename packages/opencode/bin/{opencode => dcode} (95%) diff --git a/.github/workflows/nix-hashes.yml b/.github/workflows/nix-hashes.yml index ce1d9237fde5..9619d16432f1 100644 --- a/.github/workflows/nix-hashes.yml +++ b/.github/workflows/nix-hashes.yml @@ -30,9 +30,9 @@ jobs: matrix: include: - system: x86_64-linux - runner: blacksmith-4vcpu-ubuntu-2404 + runner: ubuntu-24.04 - system: aarch64-linux - runner: blacksmith-4vcpu-ubuntu-2404-arm + runner: ubuntu-24.04-arm - system: x86_64-darwin runner: macos-15-intel - system: aarch64-darwin @@ -91,22 +91,15 @@ jobs: update-hashes: needs: compute-hash if: github.event_name != 'pull_request' - runs-on: blacksmith-4vcpu-ubuntu-2404 + runs-on: ubuntu-24.04 steps: - name: Checkout repository uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 with: - persist-credentials: false fetch-depth: 0 ref: ${{ github.ref_name }} - - name: Setup git committer - uses: ./.github/actions/setup-git-committer - with: - opencode-app-id: ${{ vars.OPENCODE_APP_ID }} - opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }} - - name: Pull latest changes run: | git pull --rebase --autostash origin "$GITHUB_REF_NAME" @@ -142,6 +135,8 @@ jobs: - name: Commit changes run: | set -euo pipefail + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" HASH_FILE="nix/hashes.json" diff --git a/bun.lock b/bun.lock index 2f31450ed0f4..558a52982a3c 100644 --- a/bun.lock +++ b/bun.lock @@ -560,7 +560,7 @@ "name": "opencode", "version": "1.17.18", "bin": { - "opencode": "./bin/opencode", + "dcode": "./bin/dcode", }, "dependencies": { "@actions/core": "1.11.1", diff --git a/flake.nix b/flake.nix index 8737c3b542f7..f0ccb3e878dd 100644 --- a/flake.nix +++ b/flake.nix @@ -39,9 +39,10 @@ }; in rec { - opencode = final.callPackage ./nix/opencode.nix { + dcode = final.callPackage ./nix/opencode.nix { inherit node_modules; }; + opencode = dcode; opencode-desktop = final.callPackage ./nix/desktop.nix { inherit opencode; }; @@ -56,10 +57,11 @@ }; in rec { - default = opencode; - opencode = pkgs.callPackage ./nix/opencode.nix { + default = dcode; + dcode = pkgs.callPackage ./nix/opencode.nix { inherit node_modules; }; + opencode = dcode; opencode-desktop = pkgs.callPackage ./nix/desktop.nix { inherit opencode; }; diff --git a/nix/opencode.nix b/nix/opencode.nix index a22f7d3d2473..e8f5a6626427 100644 --- a/nix/opencode.nix +++ b/nix/opencode.nix @@ -14,7 +14,7 @@ node_modules ? callPackage ./node-modules.nix { }, }: stdenvNoCC.mkDerivation (finalAttrs: { - pname = "opencode"; + pname = "dcode"; inherit (node_modules) version src; inherit node_modules; @@ -62,10 +62,10 @@ stdenvNoCC.mkDerivation (finalAttrs: { installPhase = '' runHook preInstall - install -Dm755 dist/opencode-*/bin/opencode $out/bin/opencode + install -Dm755 dist/dcode-*/bin/dcode $out/bin/dcode install -Dm644 schema.json $out/share/opencode/schema.json - wrapProgram $out/bin/opencode \ + wrapProgram $out/bin/dcode \ --prefix PATH : ${ lib.makeBinPath ( [ @@ -81,9 +81,9 @@ stdenvNoCC.mkDerivation (finalAttrs: { postInstall = lib.optionalString (stdenvNoCC.buildPlatform.canExecute stdenvNoCC.hostPlatform) '' # trick yargs into also generating zsh completions - installShellCompletion --cmd opencode \ - --bash <($out/bin/opencode completion) \ - --zsh <(SHELL=/bin/zsh $out/bin/opencode completion) + installShellCompletion --cmd dcode \ + --bash <($out/bin/dcode completion) \ + --zsh <(SHELL=/bin/zsh $out/bin/dcode completion) ''; nativeInstallCheckInputs = [ @@ -101,9 +101,9 @@ stdenvNoCC.mkDerivation (finalAttrs: { meta = { description = "The open source coding agent"; - homepage = "https://opencode.ai"; + homepage = "https://github.com/CreatorGhost/TheCode"; license = lib.licenses.mit; - mainProgram = "opencode"; + mainProgram = "dcode"; inherit (node_modules.meta) platforms; }; }) diff --git a/package.json b/package.json index 4fa33992640c..17d3e9a8f5b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/package.json", - "name": "opencode", + "name": "dcode", "description": "AI-powered development tool", "private": true, "type": "module", @@ -118,7 +118,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/anomalyco/opencode" + "url": "https://github.com/CreatorGhost/TheCode" }, "license": "MIT", "prettier": { diff --git a/packages/opencode/Dockerfile b/packages/opencode/Dockerfile index f92b48a6d1b5..fddf4eecd430 100644 --- a/packages/opencode/Dockerfile +++ b/packages/opencode/Dockerfile @@ -7,12 +7,12 @@ ENV BUN_RUNTIME_TRANSPILER_CACHE_PATH=${BUN_RUNTIME_TRANSPILER_CACHE_PATH} RUN apk add libgcc libstdc++ ripgrep FROM base AS build-amd64 -COPY dist/opencode-linux-x64-baseline-musl/bin/opencode /usr/local/bin/opencode +COPY dist/dcode-linux-x64-baseline-musl/bin/dcode /usr/local/bin/dcode FROM base AS build-arm64 -COPY dist/opencode-linux-arm64-musl/bin/opencode /usr/local/bin/opencode +COPY dist/dcode-linux-arm64-musl/bin/dcode /usr/local/bin/dcode ARG TARGETARCH FROM build-${TARGETARCH} -RUN opencode --version -ENTRYPOINT ["opencode"] +RUN dcode --version +ENTRYPOINT ["dcode"] diff --git a/packages/opencode/bin/opencode b/packages/opencode/bin/dcode similarity index 95% rename from packages/opencode/bin/opencode rename to packages/opencode/bin/dcode index a7101f42b0fe..06f7627ccf9a 100755 --- a/packages/opencode/bin/opencode +++ b/packages/opencode/bin/dcode @@ -49,7 +49,7 @@ const scriptPath = fs.realpathSync(__filename) const scriptDir = path.dirname(scriptPath) // -const cached = path.join(scriptDir, ".opencode") +const cached = path.join(scriptDir, ".dcode") const platformMap = { darwin: "darwin", @@ -70,8 +70,8 @@ let arch = archMap[os.arch()] if (!arch) { arch = os.arch() } -const base = "opencode-" + platform + "-" + arch -const binary = platform === "windows" ? "opencode.exe" : "opencode" +const base = "dcode-" + platform + "-" + arch +const binary = platform === "windows" ? "dcode.exe" : "dcode" function supportsAvx2() { if (arch !== "x64") return false @@ -189,7 +189,7 @@ function findBinary(startDir) { const resolved = envPath || (fs.existsSync(cached) ? cached : findBinary(scriptDir)) if (!resolved) { console.error( - "It seems that your package manager failed to install the right version of the opencode CLI for your platform. You can try manually installing " + + "It seems that your package manager failed to install the right version of the DCode CLI for your platform. You can try manually installing " + names.map((n) => `\"${n}\"`).join(" or ") + " package", ) diff --git a/packages/opencode/package.json b/packages/opencode/package.json index 89574054c37a..131ce608299c 100644 --- a/packages/opencode/package.json +++ b/packages/opencode/package.json @@ -16,7 +16,7 @@ "dev:temporary": "bun run --conditions=browser ./src/temporary.ts" }, "bin": { - "opencode": "./bin/opencode" + "dcode": "./bin/dcode" }, "exports": { "./*": "./src/*.ts" diff --git a/packages/opencode/script/build.ts b/packages/opencode/script/build.ts index 236838dbdee7..0cd0eecee0ab 100755 --- a/packages/opencode/script/build.ts +++ b/packages/opencode/script/build.ts @@ -17,6 +17,8 @@ const generated = await import("./generate.ts") import { Script } from "@opencode-ai/script" import pkg from "../package.json" +const artifactName = "dcode" + const singleFlag = process.argv.includes("--single") const baselineFlag = process.argv.includes("--baseline") const skipInstall = process.argv.includes("--skip-install") @@ -144,7 +146,7 @@ if (!skipInstall) { } for (const item of targets) { const name = [ - pkg.name, + artifactName, // changing to win32 flags npm for some reason item.os === "win32" ? "windows" : item.os, item.arch, @@ -179,9 +181,9 @@ for (const item of targets) { autoloadDotenv: false, autoloadTsconfig: true, autoloadPackageJson: true, - target: name.replace(pkg.name, "bun") as any, - outfile: `dist/${name}/bin/opencode`, - execArgv: [`--user-agent=opencode/${Script.version}`, "--use-system-ca", "--"], + target: name.replace(artifactName, "bun") as any, + outfile: `dist/${name}/bin/dcode`, + execArgv: [`--user-agent=dcode/${Script.version}`, "--use-system-ca", "--"], windows: {}, }, files: embeddedFileMap ? { "opencode-web-ui.gen.ts": embeddedFileMap } : {}, @@ -200,7 +202,7 @@ for (const item of targets) { // Smoke test: only run if binary is for current platform if (item.os === process.platform && item.arch === process.arch && !item.abi) { - const binaryPath = `dist/${name}/bin/opencode` + const binaryPath = `dist/${name}/bin/dcode` console.log(`Running smoke test: ${binaryPath} --version`) try { const versionOutput = await $`${binaryPath} --version`.text() diff --git a/packages/opencode/script/postinstall.mjs b/packages/opencode/script/postinstall.mjs index fa303b746b8c..ff483aae8033 100644 --- a/packages/opencode/script/postinstall.mjs +++ b/packages/opencode/script/postinstall.mjs @@ -24,9 +24,9 @@ const archMap = { const platform = platformMap[os.platform()] ?? os.platform() const arch = archMap[os.arch()] ?? os.arch() -const base = `opencode-${platform}-${arch}` -const sourceBinary = platform === "windows" ? "opencode.exe" : "opencode" -const targetBinary = path.join(__dirname, "bin", "opencode.exe") +const base = `dcode-${platform}-${arch}` +const sourceBinary = platform === "windows" ? "dcode.exe" : "dcode" +const targetBinary = path.join(__dirname, "bin", "dcode.exe") function supportsAvx2() { if (arch !== "x64") return false @@ -127,7 +127,7 @@ function installPackage(name) { const version = packageJson.optionalDependencies?.[name] if (!version) return - const temp = fs.mkdtempSync(path.join(os.tmpdir(), "opencode-install-")) + const temp = fs.mkdtempSync(path.join(os.tmpdir(), "dcode-install-")) try { const result = childProcess.spawnSync( "npm", @@ -175,7 +175,7 @@ function main() { } throw new Error( - `It seems your package manager failed to install the right opencode CLI package. Try manually installing ${packageNames() + `It seems your package manager failed to install the right DCode CLI package. Try manually installing ${packageNames() .map((name) => JSON.stringify(name)) .join(" or ")}.`, ) diff --git a/packages/opencode/src/index.ts b/packages/opencode/src/index.ts index 13540a73a36f..ceaff4876036 100644 --- a/packages/opencode/src/index.ts +++ b/packages/opencode/src/index.ts @@ -34,7 +34,7 @@ const args = hideBin(process.argv) function show(out: string) { const text = out.trimStart() - if (!text.startsWith("opencode ")) { + if (!text.startsWith("dcode ")) { process.stderr.write(UI.logo() + EOL + EOL) process.stderr.write(text + EOL) return @@ -44,7 +44,7 @@ function show(out: string) { const cli = yargs(args) .parserConfiguration({ "populate--": true }) - .scriptName("opencode") + .scriptName("dcode") .wrap(100) .help("help", "show help") .alias("help", "h") diff --git a/packages/opencode/src/temporary.ts b/packages/opencode/src/temporary.ts index 95461f301b5c..f7e393bb0591 100644 --- a/packages/opencode/src/temporary.ts +++ b/packages/opencode/src/temporary.ts @@ -4,7 +4,7 @@ import { InstallationVersion } from "@opencode-ai/core/installation/version" import { hideBin } from "yargs/helpers" const cli = yargs(hideBin(process.argv)) .parserConfiguration({ "populate--": true }) - .scriptName("opencode") + .scriptName("dcode") .wrap(100) .help("help", "show help") .alias("help", "h") From e12f362145e6a317533f9811acbe561eca220b3f Mon Sep 17 00:00:00 2001 From: CreatorGhost Date: Sat, 11 Jul 2026 15:11:35 +0530 Subject: [PATCH 2/8] fix(installation): repoint updates to CreatorGhost/TheCode and disable upstream autoupdate --- packages/opencode/script/publish.ts | 213 ------------------ packages/opencode/src/cli/cmd/uninstall.ts | 68 +----- packages/opencode/src/cli/cmd/upgrade.ts | 20 +- packages/opencode/src/cli/upgrade.ts | 3 +- packages/opencode/src/installation/index.ts | 183 ++------------- .../test/installation/installation.test.ts | 133 +++-------- .../test/server/httpapi-global.test.ts | 2 +- script/publish.ts | 3 - 8 files changed, 64 insertions(+), 561 deletions(-) delete mode 100755 packages/opencode/script/publish.ts diff --git a/packages/opencode/script/publish.ts b/packages/opencode/script/publish.ts deleted file mode 100755 index ac1cafff56f4..000000000000 --- a/packages/opencode/script/publish.ts +++ /dev/null @@ -1,213 +0,0 @@ -#!/usr/bin/env bun -import { $ } from "bun" -import pkg from "../package.json" -import { Script } from "@opencode-ai/script" -import { fileURLToPath } from "url" - -const dir = fileURLToPath(new URL("..", import.meta.url)) -process.chdir(dir) - -async function published(name: string, version: string) { - return (await $`npm view ${name}@${version} version`.nothrow()).exitCode === 0 -} - -async function publish(dir: string, name: string, version: string) { - // GitHub artifact downloads can drop the executable bit, and Docker uses the - // unpacked dist binaries directly rather than the published tarball. - if (process.platform !== "win32") await $`chmod -R 755 .`.cwd(dir) - if (await published(name, version)) { - console.log(`already published ${name}@${version}`) - return - } - await $`bun pm pack`.cwd(dir) - await $`npm publish *.tgz --access public --tag ${Script.channel}`.cwd(dir) -} - -const binaries: Record = {} -for (const filepath of new Bun.Glob("*/package.json").scanSync({ cwd: "./dist" })) { - const pkg = await Bun.file(`./dist/${filepath}`).json() - binaries[pkg.name] = pkg.version -} -console.log("binaries", binaries) -const version = Object.values(binaries)[0] - -await $`mkdir -p ./dist/${pkg.name}` -await $`mkdir -p ./dist/${pkg.name}/bin` -await $`cp ./script/postinstall.mjs ./dist/${pkg.name}/postinstall.mjs` -await Bun.file(`./dist/${pkg.name}/LICENSE`).write(await Bun.file("../../LICENSE").text()) -await Bun.file(`./dist/${pkg.name}/bin/${pkg.name}.exe`).write( - [ - `echo "Error: ${pkg.name}-ai's postinstall script was not run." >&2`, - 'echo "" >&2', - 'echo "This occurs when using --ignore-scripts during installation, or when using a" >&2', - 'echo "package manager like pnpm that does not run postinstall scripts by default." >&2', - 'echo "" >&2', - 'echo "To fix this, run the postinstall script manually:" >&2', - `echo " cd node_modules/${pkg.name}-ai && node postinstall.mjs" >&2`, - 'echo "" >&2', - `echo "Or reinstall ${pkg.name}-ai without the --ignore-scripts flag." >&2`, - "exit 1", - "", - ].join("\n"), -) - -await Bun.file(`./dist/${pkg.name}/package.json`).write( - JSON.stringify( - { - name: pkg.name + "-ai", - bin: { - [pkg.name]: `./bin/${pkg.name}.exe`, - }, - scripts: { - postinstall: "node ./postinstall.mjs", - }, - version: version, - license: pkg.license, - os: ["darwin", "linux", "win32"], - cpu: ["arm64", "x64"], - optionalDependencies: binaries, - }, - null, - 2, - ), -) - -const tasks = Object.entries(binaries).map(async ([name]) => { - await publish(`./dist/${name}`, name, binaries[name]) -}) -await Promise.all(tasks) -await publish(`./dist/${pkg.name}`, `${pkg.name}-ai`, version) - -const image = "ghcr.io/anomalyco/opencode" -const platforms = "linux/amd64,linux/arm64" -const tags = [`${image}:${version}`, `${image}:${Script.channel}`] -const tagFlags = tags.flatMap((t) => ["-t", t]) - -// registries -if (!Script.preview) { - await $`docker buildx build --platform ${platforms} ${tagFlags} --push .` - // Calculate SHA values - const arm64Sha = await $`sha256sum ./dist/opencode-linux-arm64.tar.gz | cut -d' ' -f1`.text().then((x) => x.trim()) - const x64Sha = await $`sha256sum ./dist/opencode-linux-x64.tar.gz | cut -d' ' -f1`.text().then((x) => x.trim()) - const macX64Sha = await $`sha256sum ./dist/opencode-darwin-x64.zip | cut -d' ' -f1`.text().then((x) => x.trim()) - const macArm64Sha = await $`sha256sum ./dist/opencode-darwin-arm64.zip | cut -d' ' -f1`.text().then((x) => x.trim()) - - const [pkgver, _subver = ""] = Script.version.split(/(-.*)/, 2) - - // arch - const binaryPkgbuild = [ - "# Maintainer: dax", - "# Maintainer: adam", - "", - "pkgname='opencode-bin'", - `pkgver=${pkgver}`, - `_subver=${_subver}`, - "options=('!debug' '!strip')", - "pkgrel=1", - "pkgdesc='The AI coding agent built for the terminal.'", - "url='https://github.com/anomalyco/opencode'", - "arch=('aarch64' 'x86_64')", - "license=('MIT')", - "provides=('opencode')", - "conflicts=('opencode')", - "depends=('ripgrep')", - "", - `source_aarch64=("\${pkgname}_\${pkgver}_aarch64.tar.gz::https://github.com/anomalyco/opencode/releases/download/v\${pkgver}\${_subver}/opencode-linux-arm64.tar.gz")`, - `sha256sums_aarch64=('${arm64Sha}')`, - - `source_x86_64=("\${pkgname}_\${pkgver}_x86_64.tar.gz::https://github.com/anomalyco/opencode/releases/download/v\${pkgver}\${_subver}/opencode-linux-x64.tar.gz")`, - `sha256sums_x86_64=('${x64Sha}')`, - "", - "package() {", - ' install -Dm755 ./opencode "${pkgdir}/usr/bin/opencode"', - "}", - "", - ].join("\n") - - for (const [pkg, pkgbuild] of [["opencode-bin", binaryPkgbuild]]) { - for (let i = 0; i < 30; i++) { - try { - await $`rm -rf ./dist/aur-${pkg}` - await $`git clone ssh://aur@aur.archlinux.org/${pkg}.git ./dist/aur-${pkg}` - await $`cd ./dist/aur-${pkg} && git checkout master` - await Bun.file(`./dist/aur-${pkg}/PKGBUILD`).write(pkgbuild) - await $`cd ./dist/aur-${pkg} && makepkg --printsrcinfo > .SRCINFO` - await $`cd ./dist/aur-${pkg} && git add PKGBUILD .SRCINFO` - if ((await $`cd ./dist/aur-${pkg} && git diff --cached --quiet`.nothrow()).exitCode === 0) break - await $`cd ./dist/aur-${pkg} && git commit -m "Update to v${Script.version}"` - await $`cd ./dist/aur-${pkg} && git push` - break - } catch { - continue - } - } - } - - // Homebrew formula - const homebrewFormula = [ - "# typed: false", - "# frozen_string_literal: true", - "", - "# This file was generated by GoReleaser. DO NOT EDIT.", - "class Opencode < Formula", - ` desc "The AI coding agent built for the terminal."`, - ` homepage "https://github.com/anomalyco/opencode"`, - ` version "${Script.version.split("-")[0]}"`, - "", - ` depends_on "ripgrep"`, - "", - " on_macos do", - " if Hardware::CPU.intel?", - ` url "https://github.com/anomalyco/opencode/releases/download/v${Script.version}/opencode-darwin-x64.zip"`, - ` sha256 "${macX64Sha}"`, - "", - " def install", - ' bin.install "opencode"', - " end", - " end", - " if Hardware::CPU.arm?", - ` url "https://github.com/anomalyco/opencode/releases/download/v${Script.version}/opencode-darwin-arm64.zip"`, - ` sha256 "${macArm64Sha}"`, - "", - " def install", - ' bin.install "opencode"', - " end", - " end", - " end", - "", - " on_linux do", - " if Hardware::CPU.intel? and Hardware::CPU.is_64_bit?", - ` url "https://github.com/anomalyco/opencode/releases/download/v${Script.version}/opencode-linux-x64.tar.gz"`, - ` sha256 "${x64Sha}"`, - " def install", - ' bin.install "opencode"', - " end", - " end", - " if Hardware::CPU.arm? and Hardware::CPU.is_64_bit?", - ` url "https://github.com/anomalyco/opencode/releases/download/v${Script.version}/opencode-linux-arm64.tar.gz"`, - ` sha256 "${arm64Sha}"`, - " def install", - ' bin.install "opencode"', - " end", - " end", - " end", - "end", - "", - "", - ].join("\n") - - const token = process.env.GITHUB_TOKEN - if (!token) { - console.error("GITHUB_TOKEN is required to update homebrew tap") - process.exit(1) - } - const tap = `https://x-access-token:${token}@github.com/anomalyco/homebrew-tap.git` - await $`rm -rf ./dist/homebrew-tap` - await $`git clone ${tap} ./dist/homebrew-tap` - await Bun.file("./dist/homebrew-tap/opencode.rb").write(homebrewFormula) - await $`cd ./dist/homebrew-tap && git add opencode.rb` - if ((await $`cd ./dist/homebrew-tap && git diff --cached --quiet`.nothrow()).exitCode !== 0) { - await $`cd ./dist/homebrew-tap && git commit -m "Update to v${Script.version}"` - await $`cd ./dist/homebrew-tap && git push` - } -} diff --git a/packages/opencode/src/cli/cmd/uninstall.ts b/packages/opencode/src/cli/cmd/uninstall.ts index 0afdc518545d..6223f55dfabb 100644 --- a/packages/opencode/src/cli/cmd/uninstall.ts +++ b/packages/opencode/src/cli/cmd/uninstall.ts @@ -7,7 +7,6 @@ import fs from "fs/promises" import path from "path" import os from "os" import { Filesystem } from "@/util/filesystem" -import { Process } from "@/util/process" interface UninstallArgs { keepConfig: boolean @@ -24,20 +23,20 @@ interface RemovalTargets { export const UninstallCommand = { command: "uninstall", - describe: "uninstall opencode and remove all related files", + describe: "uninstall DCode", builder: (yargs: Argv) => yargs .option("keep-config", { alias: "c", type: "boolean", describe: "keep configuration files", - default: false, + default: true, }) .option("keep-data", { alias: "d", type: "boolean", describe: "keep session data and snapshots", - default: false, + default: true, }) .option("dry-run", { type: "boolean", @@ -55,7 +54,7 @@ export const UninstallCommand = { UI.empty() UI.println(UI.logo(" ")) UI.empty() - prompts.intro("Uninstall OpenCode") + prompts.intro("Uninstall DCode") const method = await Installation.method() prompts.log.info(`Installation method: ${method}`) @@ -90,9 +89,7 @@ export const UninstallCommand = { async function collectRemovalTargets(args: UninstallArgs, method: Installation.Method): Promise { const directories: RemovalTargets["directories"] = [ { path: Global.Path.data, label: "Data", keep: args.keepData }, - { path: Global.Path.cache, label: "Cache", keep: false }, { path: Global.Path.config, label: "Config", keep: args.keepConfig }, - { path: Global.Path.state, label: "State", keep: false }, ] const shellConfig = method === "curl" ? await getShellConfigFile() : null @@ -127,18 +124,6 @@ async function showRemovalSummary(targets: RemovalTargets, method: Installation. prompts.log.info(` ✓ Shell PATH in ${shortenPath(targets.shellConfig)}`) } - if (method !== "curl" && method !== "unknown") { - const cmds: Record = { - npm: "npm uninstall -g opencode-ai", - pnpm: "pnpm uninstall -g opencode-ai", - bun: "bun remove -g opencode-ai", - yarn: "yarn global remove opencode-ai", - brew: "brew uninstall opencode", - choco: "choco uninstall opencode", - scoop: "scoop uninstall opencode", - } - prompts.log.info(` ✓ Package: ${cmds[method] || method}`) - } } async function executeUninstall(method: Installation.Method, targets: RemovalTargets) { @@ -178,44 +163,13 @@ async function executeUninstall(method: Installation.Method, targets: RemovalTar } } - if (method !== "curl" && method !== "unknown") { - const cmds: Record = { - npm: ["npm", "uninstall", "-g", "opencode-ai"], - pnpm: ["pnpm", "uninstall", "-g", "opencode-ai"], - bun: ["bun", "remove", "-g", "opencode-ai"], - yarn: ["yarn", "global", "remove", "opencode-ai"], - brew: ["brew", "uninstall", "opencode"], - choco: ["choco", "uninstall", "opencode"], - scoop: ["scoop", "uninstall", "opencode"], - } - - const cmd = cmds[method] - if (cmd) { - spinner.start(`Running ${cmd.join(" ")}...`) - const result = await Process.run(method === "choco" ? ["choco", "uninstall", "opencode", "-y", "-r"] : cmd, { - nothrow: true, - }) - if (result.code !== 0) { - spinner.stop(`Package manager uninstall failed: exit code ${result.code}`, 1) - const text = `${result.stdout.toString("utf8")}\n${result.stderr.toString("utf8")}` - if (method === "choco" && text.includes("not running from an elevated command shell")) { - prompts.log.warn(`You may need to run '${cmd.join(" ")}' from an elevated command shell`) - } else { - prompts.log.warn(`You may need to run manually: ${cmd.join(" ")}`) - } - } else { - spinner.stop("Package removed") - } - } - } - if (method === "curl" && targets.binary) { UI.empty() prompts.log.message("To finish removing the binary, run:") prompts.log.info(` rm "${targets.binary}"`) const binDir = path.dirname(targets.binary) - if (binDir.includes(".opencode")) { + if (binDir.includes(".dcode")) { prompts.log.info(` rmdir "${binDir}" 2>/dev/null`) } } @@ -229,7 +183,7 @@ async function executeUninstall(method: Installation.Method, targets: RemovalTar } UI.empty() - prompts.log.success("Thank you for using OpenCode!") + prompts.log.success("Thank you for using DCode!") } async function getShellConfigFile(): Promise { @@ -266,7 +220,7 @@ async function getShellConfigFile(): Promise { if (!exists) continue const content = await Filesystem.readText(file).catch(() => "") - if (content.includes("# opencode") || content.includes(".opencode/bin")) { + if (content.includes("# dcode") || content.includes(".dcode/bin")) { return file } } @@ -284,21 +238,21 @@ async function cleanShellConfig(file: string) { for (const line of lines) { const trimmed = line.trim() - if (trimmed === "# opencode") { + if (trimmed === "# dcode") { skip = true continue } if (skip) { skip = false - if (trimmed.includes(".opencode/bin") || trimmed.includes("fish_add_path")) { + if (trimmed.includes(".dcode/bin") || trimmed.includes("fish_add_path")) { continue } } if ( - (trimmed.startsWith("export PATH=") && trimmed.includes(".opencode/bin")) || - (trimmed.startsWith("fish_add_path") && trimmed.includes(".opencode")) + (trimmed.startsWith("export PATH=") && trimmed.includes(".dcode/bin")) || + (trimmed.startsWith("fish_add_path") && trimmed.includes(".dcode")) ) { continue } diff --git a/packages/opencode/src/cli/cmd/upgrade.ts b/packages/opencode/src/cli/cmd/upgrade.ts index 3c1604a0b835..51b484395c0b 100644 --- a/packages/opencode/src/cli/cmd/upgrade.ts +++ b/packages/opencode/src/cli/cmd/upgrade.ts @@ -6,7 +6,7 @@ import { InstallationVersion } from "@opencode-ai/core/installation/version" export const UpgradeCommand = { command: "upgrade [target]", - describe: "upgrade opencode to the latest or a specific version", + describe: "upgrade DCode to the latest or a specific version", builder: (yargs: Argv) => { return yargs .positional("target", { @@ -17,7 +17,7 @@ export const UpgradeCommand = { alias: "m", describe: "installation method to use", type: "string", - choices: ["curl", "npm", "pnpm", "bun", "brew", "choco", "scoop"], + choices: ["curl"], }) }, handler: async (args: { target?: string; method?: string }) => { @@ -28,7 +28,7 @@ export const UpgradeCommand = { const detectedMethod = await Installation.method() const method = (args.method as Installation.Method) ?? detectedMethod if (method === "unknown") { - prompts.log.error(`opencode is installed to ${process.execPath} and may be managed by a package manager`) + prompts.log.error(`DCode is installed to ${process.execPath} and was not installed by the DCode installer`) const install = await prompts.select({ message: "Install anyways?", options: [ @@ -42,11 +42,12 @@ export const UpgradeCommand = { return } } - prompts.log.info("Using method: " + method) + const upgradeMethod = method === "unknown" ? "curl" : method + prompts.log.info("Using method: " + upgradeMethod) const target = args.target ? args.target.replace(/^v/, "") : await Installation.latest() if (InstallationVersion === target) { - prompts.log.warn(`opencode upgrade skipped: ${target} is already installed`) + prompts.log.warn(`DCode upgrade skipped: ${target} is already installed`) prompts.outro("Done") return } @@ -54,16 +55,11 @@ export const UpgradeCommand = { prompts.log.info(`From ${InstallationVersion} → ${target}`) const spinner = prompts.spinner() spinner.start("Upgrading...") - const err = await Installation.upgrade(method, target).catch((err) => err) + const err = await Installation.upgrade(upgradeMethod, target).catch((err) => err) if (err) { spinner.stop("Upgrade failed", 1) if (err instanceof Installation.UpgradeFailedError) { - // necessary because choco only allows install/upgrade in elevated terminals - if (method === "choco" && err.stderr.includes("not running from an elevated command shell")) { - prompts.log.error("Please run the terminal as Administrator and try again") - } else { - prompts.log.error(err.stderr) - } + prompts.log.error(err.stderr) } else if (err instanceof Error) prompts.log.error(err.message) prompts.outro("Done") return diff --git a/packages/opencode/src/cli/upgrade.ts b/packages/opencode/src/cli/upgrade.ts index 62b230a63364..38a1163c2421 100644 --- a/packages/opencode/src/cli/upgrade.ts +++ b/packages/opencode/src/cli/upgrade.ts @@ -7,7 +7,8 @@ import { GlobalBus } from "@/bus/global" export async function upgrade() { const config = await AppRuntime.runPromise(Config.Service.use((cfg) => cfg.getGlobal())) - if (config.autoupdate === false || Flag.OPENCODE_DISABLE_AUTOUPDATE) return + if (Flag.OPENCODE_DISABLE_AUTOUPDATE) return + if (config.autoupdate !== true && config.autoupdate !== "notify" && !Flag.OPENCODE_ALWAYS_NOTIFY_UPDATE) return const method = await Installation.method() const latest = await Installation.latest(method).catch(() => {}) if (!latest) return diff --git a/packages/opencode/src/installation/index.ts b/packages/opencode/src/installation/index.ts index 4300220255b3..8ec3e1d0bd50 100644 --- a/packages/opencode/src/installation/index.ts +++ b/packages/opencode/src/installation/index.ts @@ -5,17 +5,15 @@ import { Effect, Layer, Schema, Context, Stream } from "effect" import { serviceUse } from "@opencode-ai/core/effect/service-use" import { HttpClient, HttpClientRequest, HttpClientResponse } from "effect/unstable/http" import { withTransientReadRetry } from "@/util/effect-http-client" -import { errorMessage } from "@/util/error" import { ChildProcess } from "effect/unstable/process" import { AppProcess } from "@opencode-ai/core/process" import path from "path" import { makeRuntime } from "@opencode-ai/core/effect/runtime" import semver from "semver" import { InstallationChannel, InstallationVersion } from "@opencode-ai/core/installation/version" -import { NpmConfig } from "@opencode-ai/core/npm-config" import { InstallationEvent } from "@opencode-ai/schema/installation-event" -export type Method = "curl" | "npm" | "yarn" | "pnpm" | "bun" | "brew" | "scoop" | "choco" | "unknown" +export type Method = "curl" | "unknown" export type ReleaseType = "patch" | "minor" | "major" @@ -39,7 +37,7 @@ export const Info = Schema.Struct({ export type Info = Schema.Schema.Type export function userAgent(client = "cli") { - return `opencode/${InstallationChannel}/${InstallationVersion}/${client}` + return `dcode/${InstallationChannel}/${InstallationVersion}/${client}` } export const USER_AGENT = userAgent() @@ -52,6 +50,11 @@ export function isLocal() { return InstallationChannel === "local" } +export function methodFromExecPath(execPath: string): Method { + if (["dcode", "dcode.exe"].includes(path.basename(execPath.replaceAll("\\", "/")).toLowerCase())) return "curl" + return "unknown" +} + export class UpgradeFailedError extends Schema.TaggedErrorClass()("UpgradeFailedError", { stderr: Schema.String, }) { @@ -62,15 +65,6 @@ export class UpgradeFailedError extends Schema.TaggedErrorClass Effect.Effect @@ -104,34 +98,7 @@ const layer: Layer.Layer Effect.succeed("")), ) - const run = Effect.fnUntraced( - function* (cmd: string[], opts?: { cwd?: string; env?: Record }) { - const result = yield* appProcess.run( - ChildProcess.make(cmd[0], cmd.slice(1), { - cwd: opts?.cwd, - env: opts?.env, - extendEnv: true, - }), - ) - return { - code: result.exitCode, - stdout: result.stdout.toString("utf8"), - stderr: result.stderr.toString("utf8"), - } - }, - Effect.catch((err) => Effect.succeed({ code: 1, stdout: "", stderr: errorMessage(err) })), - ) - - const getBrewFormula = Effect.fnUntraced(function* () { - const tapFormula = yield* text(["brew", "list", "--formula", "anomalyco/tap/opencode"]) - if (tapFormula.includes("opencode")) return "anomalyco/tap/opencode" - const coreFormula = yield* text(["brew", "list", "--formula", "opencode"]) - if (coreFormula.includes("opencode")) return "opencode" - return "opencode" - }) - const upgradeFailure = (method: Method, result?: { code: number; stdout: string; stderr: string }) => { - if (method === "choco") return "not running from an elevated command shell" if (result) return `Upgrade failed for ${method} (exit code ${result.code}).` return `Upgrade failed for ${method}.` } @@ -144,7 +111,9 @@ const layer: Layer.Layer Effect.Effect }> = [ - { name: "npm", command: () => text(["npm", "list", "-g", "--depth=0"]) }, - { name: "yarn", command: () => text(["yarn", "global", "list"]) }, - { name: "pnpm", command: () => text(["pnpm", "list", "-g", "--depth=0"]) }, - { name: "bun", command: () => text(["bun", "pm", "ls", "-g"]) }, - { name: "brew", command: () => text(["brew", "list", "--formula", "opencode"]) }, - { name: "scoop", command: () => text(["scoop", "list", "opencode"]) }, - { name: "choco", command: () => text(["choco", "list", "--limit-output", "opencode"]) }, - ] - - checks.sort((a, b) => { - const aMatches = exec.includes(a.name) - const bMatches = exec.includes(b.name) - if (aMatches && !bMatches) return -1 - if (!aMatches && bMatches) return 1 - return 0 - }) - - for (const check of checks) { - const output = yield* check.command() - const installedName = - check.name === "brew" || check.name === "choco" || check.name === "scoop" ? "opencode" : "opencode-ai" - if (output.includes(installedName)) { - return check.name - } - } - - return "unknown" as Method + return methodFromExecPath(process.execPath) }), - latest: Effect.fn("Installation.latest")(function* (installMethod?: Method) { - const detectedMethod = installMethod || (yield* result.method()) - - if (detectedMethod === "brew") { - const formula = yield* getBrewFormula() - if (formula.includes("/")) { - const infoJson = yield* text(["brew", "info", "--json=v2", formula]) - const info = yield* Schema.decodeUnknownEffect(Schema.fromJsonString(BrewInfoV2))(infoJson) - return info.formulae[0].versions.stable - } - const response = yield* httpOk.execute( - HttpClientRequest.get("https://formulae.brew.sh/api/formula/opencode.json").pipe( - HttpClientRequest.acceptJson, - ), - ) - const data = yield* HttpClientResponse.schemaBodyJson(BrewFormula)(response) - return data.versions.stable - } - - if (detectedMethod === "npm" || detectedMethod === "bun" || detectedMethod === "pnpm") { - const response = yield* httpOk.execute( - HttpClientRequest.get( - `${yield* NpmConfig.registry(process.cwd())}/opencode-ai/${InstallationChannel}`, - ).pipe(HttpClientRequest.acceptJson), - ) - const data = yield* HttpClientResponse.schemaBodyJson(NpmPackage)(response) - return data.version - } - - if (detectedMethod === "choco") { - const response = yield* httpOk.execute( - HttpClientRequest.get( - "https://community.chocolatey.org/api/v2/Packages?$filter=Id%20eq%20%27opencode%27%20and%20IsLatestVersion&$select=Version", - ).pipe(HttpClientRequest.setHeaders({ Accept: "application/json;odata=verbose" })), - ) - const data = yield* HttpClientResponse.schemaBodyJson(ChocoPackage)(response) - return data.d.results[0].Version - } - - if (detectedMethod === "scoop") { - const response = yield* httpOk.execute( - HttpClientRequest.get( - "https://raw.githubusercontent.com/ScoopInstaller/Main/master/bucket/opencode.json", - ).pipe(HttpClientRequest.setHeaders({ Accept: "application/json" })), - ) - const data = yield* HttpClientResponse.schemaBodyJson(ScoopManifest)(response) - return data.version - } - + latest: Effect.fn("Installation.latest")(function* (_installMethod?: Method) { const response = yield* httpOk.execute( - HttpClientRequest.get("https://api.github.com/repos/anomalyco/opencode/releases/latest").pipe( + HttpClientRequest.get("https://api.github.com/repos/CreatorGhost/TheCode/releases/latest").pipe( HttpClientRequest.acceptJson, ), ) @@ -263,51 +153,8 @@ const layer: Layer.Layer { + describe("methodFromExecPath", () => { + test("recognizes DCode binaries in any install directory", () => { + expect(Installation.methodFromExecPath("/home/user/bin/dcode")).toBe("curl") + expect(Installation.methodFromExecPath("C:\\Users\\user\\bin\\dcode.exe")).toBe("curl") + expect(Installation.methodFromExecPath("/usr/local/bin/bun")).toBe("unknown") + }) + }) + describe("latest", () => { - testEffect(testLayer(() => jsonResponse({ tag_name: "v1.2.3" }))).effect( + const githubCalls: string[] = [] + testEffect( + testLayer((request) => { + githubCalls.push(request.url) + return jsonResponse({ tag_name: "v1.2.3" }) + }), + ).effect( "reads release version from GitHub releases", () => Effect.gen(function* () { const result = yield* Installation.use.latest("unknown") expect(result).toBe("1.2.3") + expect(githubCalls).toContain("https://api.github.com/repos/CreatorGhost/TheCode/releases/latest") }), ) @@ -86,124 +100,30 @@ describe("installation", () => { }), ) - const npmCalls: string[] = [] - testEffect( - testLayer((request) => { - npmCalls.push(request.url) - return jsonResponse({ version: "1.5.0" }) - }), - ).effect("reads npm versions via registry", () => - Effect.gen(function* () { - const result = yield* Installation.use.latest("npm") - expect(result).toBe("1.5.0") - expect(npmCalls).toContain(`https://registry.npmjs.org/opencode-ai/${InstallationChannel}`) - }), - ) - - const bunCalls: string[] = [] - testEffect( - testLayer((request) => { - bunCalls.push(request.url) - return jsonResponse({ version: "1.6.0" }) - }), - ).effect("reads bun versions via registry", () => - Effect.gen(function* () { - const result = yield* Installation.use.latest("bun") - expect(result).toBe("1.6.0") - expect(bunCalls).toContain(`https://registry.npmjs.org/opencode-ai/${InstallationChannel}`) - }), - ) - - const pnpmCalls: string[] = [] - testEffect( - testLayer((request) => { - pnpmCalls.push(request.url) - return jsonResponse({ version: "1.7.0" }) - }), - ).effect("reads pnpm versions via registry", () => - Effect.gen(function* () { - const result = yield* Installation.use.latest("pnpm") - expect(result).toBe("1.7.0") - expect(pnpmCalls).toContain(`https://registry.npmjs.org/opencode-ai/${InstallationChannel}`) - }), - ) - - testEffect(testLayer(() => jsonResponse({ version: "2.3.4" }))).effect("reads scoop manifest versions", () => - Effect.gen(function* () { - const result = yield* Installation.use.latest("scoop") - expect(result).toBe("2.3.4") - }), - ) - - testEffect(testLayer(() => jsonResponse({ d: { results: [{ Version: "3.4.5" }] } }))).effect( - "reads chocolatey feed versions", - () => - Effect.gen(function* () { - const result = yield* Installation.use.latest("choco") - expect(result).toBe("3.4.5") - }), - ) - - testEffect( - testLayer( - () => jsonResponse({ versions: { stable: "2.0.0" } }), - (cmd, args) => { - // getBrewFormula: return core formula (no tap) - if (cmd === "brew" && args.includes("--formula") && args.includes("anomalyco/tap/opencode")) return "" - if (cmd === "brew" && args.includes("--formula") && args.includes("opencode")) return "opencode" - return "" - }, - ), - ).effect("reads brew formulae API versions", () => - Effect.gen(function* () { - const result = yield* Installation.use.latest("brew") - expect(result).toBe("2.0.0") - }), - ) - - const brewInfoJson = JSON.stringify({ - formulae: [{ versions: { stable: "2.1.0" } }], - }) - testEffect( - testLayer( - () => jsonResponse({}), // HTTP not used for tap formula - (cmd, args) => { - if (cmd === "brew" && args.includes("anomalyco/tap/opencode") && args.includes("--formula")) return "opencode" - if (cmd === "brew" && args.includes("--json=v2")) return brewInfoJson - return "" - }, - ), - ).effect("reads brew tap info JSON via CLI", () => - Effect.gen(function* () { - const result = yield* Installation.use.latest("brew") - expect(result).toBe("2.1.0") - }), - ) }) describe("upgrade", () => { testEffect( testLayer( () => jsonResponse({}), - (cmd) => { - if (cmd === "npm") return { code: 1, stderr: "token=secret command output" } - return "" - }, + () => "", ), - ).effect("returns sanitized typed errors for failed package upgrades", () => + ).effect("rejects unsupported installation methods", () => Effect.gen(function* () { - const error = yield* Effect.flip(Installation.use.upgrade("npm", "9.9.9")) + const error = yield* Effect.flip(Installation.use.upgrade("unknown", "9.9.9")) expect(error).toBeInstanceOf(Installation.UpgradeFailedError) - expect(error.stderr).toBe("Upgrade failed for npm (exit code 1).") + expect(error.stderr).toBe("Unknown installation method: unknown") expect(error.message).toBe(error.stderr) - expect(error.stderr).not.toContain("secret") - expect(error.stderr).not.toContain("command output") }), ) + const installerCalls: string[] = [] testEffect( testLayer( - () => new Response("install script with token=secret", { status: 200 }), + (request) => { + installerCalls.push(request.url) + return new Response("install script with token=secret", { status: 200 }) + }, (cmd, args) => { if (cmd === "bash" && args[0] === "--version") return "GNU bash" if (cmd === "bash" || cmd === "sh") return { code: 1, stderr: "script output with token=secret" } @@ -218,6 +138,7 @@ describe("installation", () => { expect(error.message).toBe(error.stderr) expect(error.stderr).not.toContain("secret") expect(error.stderr).not.toContain("script output") + expect(installerCalls).toContain("https://raw.githubusercontent.com/CreatorGhost/TheCode/v9.9.9/install") }), ) diff --git a/packages/opencode/test/server/httpapi-global.test.ts b/packages/opencode/test/server/httpapi-global.test.ts index bcbe7aecbba4..0fd008d18e66 100644 --- a/packages/opencode/test/server/httpapi-global.test.ts +++ b/packages/opencode/test/server/httpapi-global.test.ts @@ -33,7 +33,7 @@ const apiLayer = HttpRouter.serve( Layer.provide(Layer.mock(MoveSession.Service)({})), Layer.provide( Layer.mock(Installation.Service)({ - method: () => Effect.succeed("npm"), + method: () => Effect.succeed("curl"), latest: () => Effect.succeed("9.9.9"), upgrade: () => Effect.void, }), diff --git a/script/publish.ts b/script/publish.ts index 3dc0dee94e60..205e250843fd 100755 --- a/script/publish.ts +++ b/script/publish.ts @@ -35,9 +35,6 @@ if (Script.release && !Script.preview) { await prepareReleaseFiles() -console.log("\n=== cli ===\n") -await $`bun ./packages/opencode/script/publish.ts` - console.log("\n=== preview cli ===\n") await $`bun ./packages/cli/script/publish.ts` From ceef441b61f4c38a210f5674f4108ce60b130186 Mon Sep 17 00:00:00 2001 From: CreatorGhost Date: Sat, 11 Jul 2026 15:11:46 +0530 Subject: [PATCH 3/8] feat(installer): fork install script and release flow to CreatorGhost/TheCode --- .github/ISSUE_TEMPLATE/bug-report.yml | 4 +- .github/ISSUE_TEMPLATE/config.yml | 5 - .github/workflows/beta.yml | 37 -- .github/workflows/containers.yml | 45 -- .github/workflows/deploy.yml | 48 -- .github/workflows/docs-locale-sync.yml | 100 ---- .github/workflows/docs-update.yml | 72 --- .github/workflows/duplicate-issues.yml | 221 -------- .github/workflows/notify-discord.yml | 14 - .github/workflows/opencode.yml | 34 -- .github/workflows/pr-management.yml | 95 ---- .github/workflows/pr-standards.yml | 351 ------------ .github/workflows/publish-github-action.yml | 30 - .github/workflows/publish-vscode.yml | 37 -- .github/workflows/publish.yml | 521 ------------------ .github/workflows/release-github-action.yml | 29 - .github/workflows/release.yml | 57 ++ .github/workflows/review.yml | 83 --- .github/workflows/stats.yml | 35 -- .github/workflows/triage.yml | 56 -- github/action.yml | 32 +- install | 84 +-- .../opencode/src/cli/cmd/github.handler.ts | 22 +- 23 files changed, 138 insertions(+), 1874 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/config.yml delete mode 100644 .github/workflows/beta.yml delete mode 100644 .github/workflows/containers.yml delete mode 100644 .github/workflows/deploy.yml delete mode 100644 .github/workflows/docs-locale-sync.yml delete mode 100644 .github/workflows/docs-update.yml delete mode 100644 .github/workflows/duplicate-issues.yml delete mode 100644 .github/workflows/notify-discord.yml delete mode 100644 .github/workflows/opencode.yml delete mode 100644 .github/workflows/pr-management.yml delete mode 100644 .github/workflows/pr-standards.yml delete mode 100644 .github/workflows/publish-github-action.yml delete mode 100644 .github/workflows/publish-vscode.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/release-github-action.yml create mode 100644 .github/workflows/release.yml delete mode 100644 .github/workflows/review.yml delete mode 100644 .github/workflows/stats.yml delete mode 100644 .github/workflows/triage.yml diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index da82bde2e12d..c5be6c164cc4 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -21,8 +21,8 @@ body: - type: input id: opencode-version attributes: - label: OpenCode version - description: What version of OpenCode are you using? + label: DCode version + description: What version of DCode are you using? validations: required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 9501a1be6516..000000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: 💬 Discord Community - url: https://discord.gg/opencode - about: For support, troubleshooting, how-to questions, and real-time discussion. diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml deleted file mode 100644 index e93d5fbdb260..000000000000 --- a/.github/workflows/beta.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: beta - -on: - workflow_dispatch: - schedule: - - cron: "0 * * * *" - -jobs: - sync: - runs-on: blacksmith-4vcpu-ubuntu-2404 - permissions: - contents: write - pull-requests: write - steps: - - name: Checkout repository - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - with: - fetch-depth: 0 - - - name: Setup Bun - uses: ./.github/actions/setup-bun - - - name: Setup Git Committer - id: setup-git-committer - uses: ./.github/actions/setup-git-committer - with: - opencode-app-id: ${{ vars.OPENCODE_APP_ID }} - opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }} - - - name: Install OpenCode - run: bun i -g opencode-ai - - - name: Sync beta branch - env: - GH_TOKEN: ${{ steps.setup-git-committer.outputs.token }} - OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} - run: bun script/beta.ts diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml deleted file mode 100644 index 15bf0783160e..000000000000 --- a/.github/workflows/containers.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: containers - -on: - push: - branches: - - dev - paths: - - packages/containers/** - - .github/workflows/containers.yml - - package.json - workflow_dispatch: - -permissions: - contents: read - packages: write - -jobs: - build: - runs-on: blacksmith-4vcpu-ubuntu-2404 - env: - REGISTRY: ghcr.io/${{ github.repository_owner }} - TAG: "24.04" - steps: - - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - - - uses: ./.github/actions/setup-bun - - - name: Set up QEMU - uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0 - - - name: Login to GHCR - uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push containers - run: bun ./packages/containers/script/build.ts --push - env: - REGISTRY: ${{ env.REGISTRY }} - TAG: ${{ env.TAG }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 18e6cf7acb44..000000000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: deploy - -on: - push: - branches: - - dev - - production - workflow_dispatch: - -concurrency: ${{ github.workflow }}-${{ github.ref }} - -permissions: - contents: read - id-token: write - -jobs: - deploy: - if: github.repository == 'anomalyco/opencode' && (github.ref_name == 'dev' || github.ref_name == 'production') - runs-on: ubuntu-latest - environment: ${{ github.ref_name }} - steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - - - uses: ./.github/actions/setup-bun - - - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - with: - node-version: "24" - - - uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1 - with: - role-to-assume: ${{ vars.AWS_DEPLOY_ROLE_ARN }} - role-session-name: opencode-${{ github.run_id }} - aws-region: us-east-1 - - - run: bun sst deploy --stage=${{ github.ref_name }} - env: - CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} - PLANETSCALE_SERVICE_TOKEN_NAME: ${{ secrets.PLANETSCALE_SERVICE_TOKEN_NAME }} - PLANETSCALE_SERVICE_TOKEN: ${{ secrets.PLANETSCALE_SERVICE_TOKEN }} - STRIPE_SECRET_KEY: ${{ github.ref_name == 'production' && secrets.STRIPE_SECRET_KEY_PROD || secrets.STRIPE_SECRET_KEY_DEV }} - HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY }} - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_ORG: ${{ vars.SENTRY_ORG }} - SENTRY_PROJECT: ${{ vars.WEB_SENTRY_PROJECT }} - SENTRY_RELEASE: web@${{ github.sha }} - VITE_SENTRY_DSN: ${{ vars.WEB_SENTRY_DSN }} - VITE_SENTRY_RELEASE: web@${{ github.sha }} diff --git a/.github/workflows/docs-locale-sync.yml b/.github/workflows/docs-locale-sync.yml deleted file mode 100644 index 5f921e8bb717..000000000000 --- a/.github/workflows/docs-locale-sync.yml +++ /dev/null @@ -1,100 +0,0 @@ -name: docs-locale-sync - -on: - push: - branches: - - dev - paths: - - packages/web/src/content/docs/*.mdx - -jobs: - sync-locales: - if: false - #if: github.actor != 'opencode-agent[bot]' - runs-on: blacksmith-4vcpu-ubuntu-2404 - permissions: - contents: write - steps: - - name: Checkout repository - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - with: - persist-credentials: false - fetch-depth: 0 - ref: ${{ github.ref_name }} - - - name: Setup Bun - uses: ./.github/actions/setup-bun - - - name: Setup git committer - id: committer - uses: ./.github/actions/setup-git-committer - with: - opencode-app-id: ${{ vars.OPENCODE_APP_ID }} - opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }} - - - name: Compute changed English docs - id: changes - run: | - FILES=$(git diff --name-only "${{ github.event.before }}" "${{ github.sha }}" -- ':(glob)packages/web/src/content/docs/*.mdx' || true) - if [ -z "$FILES" ]; then - echo "has_changes=false" >> "$GITHUB_OUTPUT" - echo "No English docs changed in push range" - exit 0 - fi - echo "has_changes=true" >> "$GITHUB_OUTPUT" - { - echo "files<> "$GITHUB_OUTPUT" - - - name: Install OpenCode - if: steps.changes.outputs.has_changes == 'true' - run: curl -fsSL https://opencode.ai/install | bash - - - name: Sync locale docs with OpenCode - if: steps.changes.outputs.has_changes == 'true' - env: - OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} - OPENCODE_CONFIG_CONTENT: | - { - "permission": { - "*": "deny", - "read": "allow", - "edit": "allow", - "glob": "allow", - "task": "allow" - } - } - run: | - opencode run --agent docs --model opencode/gpt-5.3-codex <<'EOF' - Update localized docs to match the latest English docs changes. - - Changed English doc files: - - ${{ steps.changes.outputs.files }} - - - Requirements: - 1. Update all relevant locale docs under packages/web/src/content/docs// so they reflect these English page changes. - 2. You MUST use the Task tool for translation work and launch subagents with subagent_type `translator` (defined in .opencode/agent/translator.md). - 3. Do not translate directly in the primary agent. Use translator subagent output as the source for locale text updates. - 4. Run translator subagent Task calls in parallel whenever file/locale translation work is independent. - 5. Use only the minimum tools needed for this task (read/glob, file edits, and translator Task). Do not use shell, web, search, or GitHub tools for translation work. - 6. Preserve frontmatter keys, internal links, code blocks, and existing locale-specific metadata unless the English change requires an update. - 7. Keep locale docs structure aligned with their corresponding English pages. - 8. Do not modify English source docs in packages/web/src/content/docs/*.mdx. - 9. If no locale updates are needed, make no changes. - EOF - - - name: Commit and push locale docs updates - if: steps.changes.outputs.has_changes == 'true' - run: | - if [ -z "$(git status --porcelain)" ]; then - echo "No locale docs changes to commit" - exit 0 - fi - git add -A - git commit -m "docs(i18n): sync locale docs from english changes" - git pull --rebase --autostash origin "$GITHUB_REF_NAME" - git push origin HEAD:"$GITHUB_REF_NAME" diff --git a/.github/workflows/docs-update.yml b/.github/workflows/docs-update.yml deleted file mode 100644 index 4767dec53999..000000000000 --- a/.github/workflows/docs-update.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: docs-update - -on: - schedule: - - cron: "0 */12 * * *" - workflow_dispatch: - -env: - LOOKBACK_HOURS: 4 - -jobs: - update-docs: - if: github.repository == 'sst/opencode' - runs-on: blacksmith-4vcpu-ubuntu-2404 - permissions: - id-token: write - contents: write - pull-requests: write - steps: - - name: Checkout repository - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - with: - fetch-depth: 0 # Fetch full history to access commits - - - name: Setup Bun - uses: ./.github/actions/setup-bun - - - name: Get recent commits - id: commits - run: | - COMMITS=$(git log --since="${{ env.LOOKBACK_HOURS }} hours ago" --pretty=format:"- %h %s" 2>/dev/null || echo "") - if [ -z "$COMMITS" ]; then - echo "No commits in the last ${{ env.LOOKBACK_HOURS }} hours" - echo "has_commits=false" >> $GITHUB_OUTPUT - else - echo "has_commits=true" >> $GITHUB_OUTPUT - { - echo "list<> $GITHUB_OUTPUT - fi - - - name: Run opencode - if: steps.commits.outputs.has_commits == 'true' - uses: sst/opencode/github@2c14fc5586fe0b88e5c04732d2e846769cc35671 # latest - env: - OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} - with: - model: opencode/gpt-5.2 - agent: docs - prompt: | - Review the following commits from the last ${{ env.LOOKBACK_HOURS }} hours and identify any new features that may need documentation. - - - ${{ steps.commits.outputs.list }} - - - Steps: - 1. For each commit that looks like a new feature or significant change: - - Read the changed files to understand what was added - - Check if the feature is already documented in packages/web/src/content/docs/* - 2. If you find undocumented features: - - Update the relevant documentation files in packages/web/src/content/docs/* - - Follow the existing documentation style and structure - - Make sure to document the feature clearly with examples where appropriate - 3. If all new features are already documented, report that no updates are needed - 4. If you are creating a new documentation file be sure to update packages/web/astro.config.mjs too. - - Focus on user-facing features and API changes. Skip internal refactors, bug fixes, and test updates unless they affect user-facing behavior. - Don't feel the need to document every little thing. It is perfectly okay to make 0 changes at all. - Try to keep documentation only for large features or changes that already have a good spot to be documented. diff --git a/.github/workflows/duplicate-issues.yml b/.github/workflows/duplicate-issues.yml deleted file mode 100644 index 3972247dafc6..000000000000 --- a/.github/workflows/duplicate-issues.yml +++ /dev/null @@ -1,221 +0,0 @@ -name: duplicate-issues - -on: - issues: - types: [opened, edited] - -jobs: - check-duplicates: - if: github.event.action == 'opened' - runs-on: blacksmith-4vcpu-ubuntu-2404 - permissions: - contents: read - issues: write - steps: - - name: Checkout repository - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - with: - fetch-depth: 1 - - - name: Check exempt issue author - id: author - run: | - LOGIN="${{ github.event.issue.user.login }}" - ASSOCIATION="${{ github.event.issue.author_association }}" - - if [ "$LOGIN" = "opencode-agent[bot]" ] || - [ "$ASSOCIATION" = "OWNER" ] || - [ "$ASSOCIATION" = "MEMBER" ] || - grep -qxiF "$LOGIN" .github/TEAM_MEMBERS; then - echo "skip=true" >> "$GITHUB_OUTPUT" - echo "Skipping issue automation for exempt author: $LOGIN ($ASSOCIATION)" - else - echo "skip=false" >> "$GITHUB_OUTPUT" - fi - - - uses: ./.github/actions/setup-bun - if: steps.author.outputs.skip != 'true' - - - name: Install opencode - if: steps.author.outputs.skip != 'true' - run: curl -fsSL https://opencode.ai/install | bash - - - name: Check duplicates and compliance - if: steps.author.outputs.skip != 'true' - env: - OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - OPENCODE_PERMISSION: | - { - "bash": { - "*": "deny", - "gh issue*": "allow" - }, - "webfetch": "deny" - } - run: | - opencode run -m opencode/claude-sonnet-4-6 "A new issue has been created: - - Issue number: ${{ github.event.issue.number }} - Issue author association: ${{ github.event.issue.author_association }} - - Lookup this issue with gh issue view ${{ github.event.issue.number }}. - - You have TWO tasks. Perform both, then post a SINGLE comment (if needed). - - --- - - TASK 1: CONTRIBUTING GUIDELINES COMPLIANCE CHECK - - Check whether the issue follows our contributing guidelines and issue templates. - - If the issue author association is OWNER or MEMBER, skip this compliance check. Do not add the needs:compliance label for organization-owned issues. - - This project has three issue templates that every issue MUST use one of: - - 1. Bug Report - requires a Description field with real content - 2. Feature Request - requires a verification checkbox and description, title should start with [FEATURE]: - 3. Question - requires the Question field with real content - - Additionally check: - - No AI-generated walls of text (long, AI-generated descriptions are not acceptable) - - The issue has real content, not just template placeholder text left unchanged - - Bug reports should include some context about how to reproduce - - Feature requests should explain the problem or need - - We want to push for having the user provide system description & information - - Do NOT be nitpicky about optional fields. Only flag real problems like: no template used, required fields empty or placeholder text only, obviously AI-generated walls of text, or completely empty/nonsensical content. - - --- - - TASK 2: DUPLICATE CHECK - - Search through existing issues (excluding #${{ github.event.issue.number }}) to find potential duplicates. - Consider: - 1. Similar titles or descriptions - 2. Same error messages or symptoms - 3. Related functionality or components - 4. Similar feature requests - - Additionally, if the issue mentions keybinds, keyboard shortcuts, or key bindings, note the pinned keybinds issue #4997. - - --- - - POSTING YOUR COMMENT: - - Based on your findings, post a SINGLE comment on issue #${{ github.event.issue.number }}. Build the comment as follows: - - If the issue is NOT compliant and the author association is not OWNER or MEMBER, start the comment with: - - Then explain what needs to be fixed and that they have 2 hours to edit the issue before it is automatically closed. Also add the label needs:compliance to the issue using: gh issue edit ${{ github.event.issue.number }} --add-label needs:compliance - - If duplicates were found, include a section about potential duplicates with links. - - If the issue mentions keybinds/keyboard shortcuts, include a note about #4997. - - If the issue IS compliant AND no duplicates were found AND no keybind reference, do NOT comment at all. - - Use this format for the comment: - - [If not compliant:] - - This issue doesn't fully meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md). - - **What needs to be fixed:** - - [specific reasons] - - Please edit this issue to address the above within **2 hours**, or it will be automatically closed. - - [If duplicates found, add:] - --- - This issue might be a duplicate of existing issues. Please check: - - #[issue_number]: [brief description of similarity] - - [If keybind-related, add:] - For keybind-related issues, please also check our pinned keybinds documentation: #4997 - - [End with if not compliant:] - If you believe this was flagged incorrectly, please let a maintainer know. - - Remember: post at most ONE comment combining all findings. If everything is fine, post nothing." - - recheck-compliance: - if: github.event.action == 'edited' && contains(github.event.issue.labels.*.name, 'needs:compliance') - runs-on: blacksmith-4vcpu-ubuntu-2404 - permissions: - contents: read - issues: write - steps: - - name: Checkout repository - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - with: - fetch-depth: 1 - - - name: Check exempt issue author - id: author - run: | - LOGIN="${{ github.event.issue.user.login }}" - ASSOCIATION="${{ github.event.issue.author_association }}" - - if [ "$LOGIN" = "opencode-agent[bot]" ] || - [ "$ASSOCIATION" = "OWNER" ] || - [ "$ASSOCIATION" = "MEMBER" ] || - grep -qxiF "$LOGIN" .github/TEAM_MEMBERS; then - echo "skip=true" >> "$GITHUB_OUTPUT" - echo "Skipping issue automation for exempt author: $LOGIN ($ASSOCIATION)" - else - echo "skip=false" >> "$GITHUB_OUTPUT" - fi - - - uses: ./.github/actions/setup-bun - if: steps.author.outputs.skip != 'true' - - - name: Install opencode - if: steps.author.outputs.skip != 'true' - run: curl -fsSL https://opencode.ai/install | bash - - - name: Recheck compliance - if: steps.author.outputs.skip != 'true' - env: - OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - OPENCODE_PERMISSION: | - { - "bash": { - "*": "deny", - "gh issue*": "allow" - }, - "webfetch": "deny" - } - run: | - opencode run -m opencode/claude-sonnet-4-6 "Issue #${{ github.event.issue.number }} was previously flagged as non-compliant and has been edited. - Issue author association: ${{ github.event.issue.author_association }} - - Lookup this issue with gh issue view ${{ github.event.issue.number }}. - - If the issue author association is OWNER or MEMBER, remove the needs:compliance label if present, delete the previous compliance comment if present, and do not post a new comment. - - Re-check whether the issue now follows our contributing guidelines and issue templates. - - This project has three issue templates that every issue MUST use one of: - - 1. Bug Report - requires a Description field with real content - 2. Feature Request - requires a verification checkbox and description, title should start with [FEATURE]: - 3. Question - requires the Question field with real content - - Additionally check: - - No AI-generated walls of text (long, AI-generated descriptions are not acceptable) - - The issue has real content, not just template placeholder text left unchanged - - Bug reports should include some context about how to reproduce - - Feature requests should explain the problem or need - - We want to push for having the user provide system description & information - - Do NOT be nitpicky about optional fields. Only flag real problems like: no template used, required fields empty or placeholder text only, obviously AI-generated walls of text, or completely empty/nonsensical content. - - If the issue is NOW compliant: - 1. Remove the needs:compliance label: gh issue edit ${{ github.event.issue.number }} --remove-label needs:compliance - 2. Find and delete the previous compliance comment (the one containing ) using: gh api repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments --jq '.[] | select(.body | contains(\"\")) | .id' then delete it with: gh api -X DELETE repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments/{id} - 3. Post a short comment thanking them for updating the issue. - - If the issue is STILL not compliant: - Post a comment explaining what still needs to be fixed. Keep the needs:compliance label." diff --git a/.github/workflows/notify-discord.yml b/.github/workflows/notify-discord.yml deleted file mode 100644 index 0b2b1cde051b..000000000000 --- a/.github/workflows/notify-discord.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: notify-discord - -on: - release: - types: [released] # fires when a draft release is published - -jobs: - notify: - runs-on: blacksmith-4vcpu-ubuntu-2404 - steps: - - name: Send nicely-formatted embed to Discord - uses: SethCohen/github-releases-to-discord@24d166886aee4646d448c8a389ff9e1ebcab3682 # v1.20.0 - with: - webhook_url: ${{ secrets.DISCORD_WEBHOOK }} diff --git a/.github/workflows/opencode.yml b/.github/workflows/opencode.yml deleted file mode 100644 index 3469c21917f8..000000000000 --- a/.github/workflows/opencode.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: opencode - -on: - issue_comment: - types: [created] - pull_request_review_comment: - types: [created] - -jobs: - opencode: - 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') - runs-on: blacksmith-4vcpu-ubuntu-2404 - permissions: - id-token: write - contents: read - pull-requests: read - issues: read - steps: - - name: Checkout repository - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - - - uses: ./.github/actions/setup-bun - - - name: Run opencode - uses: anomalyco/opencode/github@2c14fc5586fe0b88e5c04732d2e846769cc35671 # latest - env: - OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} - OPENCODE_PERMISSION: '{"bash": "deny"}' - with: - model: opencode/claude-opus-4-5 diff --git a/.github/workflows/pr-management.yml b/.github/workflows/pr-management.yml deleted file mode 100644 index b6aa4e589d89..000000000000 --- a/.github/workflows/pr-management.yml +++ /dev/null @@ -1,95 +0,0 @@ -name: pr-management - -on: - pull_request_target: - types: [opened] - -jobs: - check-duplicates: - runs-on: blacksmith-4vcpu-ubuntu-2404 - permissions: - contents: read - pull-requests: write - steps: - - name: Checkout repository - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - with: - fetch-depth: 1 - - - name: Check team membership - id: team-check - run: | - LOGIN="${{ github.event.pull_request.user.login }}" - if [ "$LOGIN" = "opencode-agent[bot]" ] || grep -qxF "$LOGIN" .github/TEAM_MEMBERS; then - echo "is_team=true" >> "$GITHUB_OUTPUT" - echo "Skipping: $LOGIN is a team member or bot" - else - echo "is_team=false" >> "$GITHUB_OUTPUT" - fi - - - name: Setup Bun - if: steps.team-check.outputs.is_team != 'true' - uses: ./.github/actions/setup-bun - - - name: Install dependencies - if: steps.team-check.outputs.is_team != 'true' - run: bun install - - - name: Install opencode - if: steps.team-check.outputs.is_team != 'true' - run: curl -fsSL https://opencode.ai/install | bash - - - name: Build prompt - if: steps.team-check.outputs.is_team != 'true' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR_NUMBER: ${{ github.event.pull_request.number }} - run: | - { - echo "Check for duplicate PRs related to this new PR:" - echo "" - echo "CURRENT_PR_NUMBER: $PR_NUMBER" - echo "" - echo "Title: $(gh pr view "$PR_NUMBER" --json title --jq .title)" - echo "" - echo "Description:" - gh pr view "$PR_NUMBER" --json body --jq .body - } > pr_info.txt - - - name: Check for duplicate PRs - if: steps.team-check.outputs.is_team != 'true' - env: - OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR_NUMBER: ${{ github.event.pull_request.number }} - run: | - COMMENT=$(bun script/duplicate-pr.ts -f pr_info.txt "Check the attached file for PR details and search for duplicates") - - if [ "$COMMENT" != "No duplicate PRs found" ]; then - gh pr comment "$PR_NUMBER" --body "_The following comment was made by an LLM, it may be inaccurate:_ - - $COMMENT" - fi - - add-contributor-label: - runs-on: ubuntu-latest - permissions: - pull-requests: write - issues: write - steps: - - name: Add Contributor Label - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 - with: - script: | - const isPR = !!context.payload.pull_request; - const issueNumber = isPR ? context.payload.pull_request.number : context.payload.issue.number; - const authorAssociation = isPR ? context.payload.pull_request.author_association : context.payload.issue.author_association; - - if (authorAssociation === 'CONTRIBUTOR') { - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: issueNumber, - labels: ['contributor'] - }); - } diff --git a/.github/workflows/pr-standards.yml b/.github/workflows/pr-standards.yml deleted file mode 100644 index 06838089d354..000000000000 --- a/.github/workflows/pr-standards.yml +++ /dev/null @@ -1,351 +0,0 @@ -name: pr-standards - -on: - pull_request_target: - types: [opened, edited, synchronize] - -jobs: - check-standards: - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - steps: - - name: Check PR standards - uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0 - with: - script: | - const pr = context.payload.pull_request; - const login = pr.user.login; - - // Skip PRs older than Feb 18, 2026 at 6PM EST (Feb 19, 2026 00:00 UTC) - const cutoff = new Date('2026-02-19T00:00:00Z'); - const prCreated = new Date(pr.created_at); - if (prCreated < cutoff) { - console.log(`Skipping: PR #${pr.number} was created before cutoff (${prCreated.toISOString()})`); - return; - } - - // Check if author is a team member or bot - if (login === 'opencode-agent[bot]') return; - const { data: file } = await github.rest.repos.getContent({ - owner: context.repo.owner, - repo: context.repo.repo, - path: '.github/TEAM_MEMBERS', - ref: 'dev' - }); - const members = Buffer.from(file.content, 'base64').toString().split('\n').map(l => l.trim()).filter(Boolean); - if (members.includes(login)) { - console.log(`Skipping: ${login} is a team member`); - return; - } - - const title = pr.title; - - async function addLabel(label) { - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: pr.number, - labels: [label] - }); - } - - async function removeLabel(label) { - try { - await github.rest.issues.removeLabel({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: pr.number, - name: label - }); - } catch (e) { - // Label wasn't present, ignore - } - } - - async function comment(marker, body) { - const markerText = ``; - const { data: comments } = await github.rest.issues.listComments({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: pr.number - }); - - const existing = comments.find(c => c.body.includes(markerText)); - if (existing) return; - - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: pr.number, - body: markerText + '\n' + body - }); - } - - // Step 1: Check title format - // Matches: feat:, feat(scope):, feat (scope):, etc. - const titlePattern = /^(feat|fix|docs|chore|refactor|test)\s*(\([a-zA-Z0-9-]+\))?\s*:/; - const hasValidTitle = titlePattern.test(title); - - if (!hasValidTitle) { - await addLabel('needs:title'); - await comment('title', `Hey! Your PR title \`${title}\` doesn't follow conventional commit format. - - Please update it to start with one of: - - \`feat:\` or \`feat(scope):\` new feature - - \`fix:\` or \`fix(scope):\` bug fix - - \`docs:\` or \`docs(scope):\` documentation changes - - \`chore:\` or \`chore(scope):\` maintenance tasks - - \`refactor:\` or \`refactor(scope):\` code refactoring - - \`test:\` or \`test(scope):\` adding or updating tests - - Where \`scope\` is the package name (e.g., \`app\`, \`desktop\`, \`opencode\`). - - See [CONTRIBUTING.md](../blob/dev/CONTRIBUTING.md#pr-titles) for details.`); - return; - } - - await removeLabel('needs:title'); - - // Step 2: Check for linked issue (skip for docs/refactor/feat PRs) - const skipIssueCheck = /^(docs|refactor|feat)\s*(\([a-zA-Z0-9-]+\))?\s*:/.test(title); - if (skipIssueCheck) { - await removeLabel('needs:issue'); - console.log('Skipping issue check for docs/refactor/feat PR'); - return; - } - const query = ` - query($owner: String!, $repo: String!, $number: Int!) { - repository(owner: $owner, name: $repo) { - pullRequest(number: $number) { - closingIssuesReferences(first: 1) { - totalCount - } - } - } - } - `; - - const result = await github.graphql(query, { - owner: context.repo.owner, - repo: context.repo.repo, - number: pr.number - }); - - const linkedIssues = result.repository.pullRequest.closingIssuesReferences.totalCount; - - if (linkedIssues === 0) { - await addLabel('needs:issue'); - await comment('issue', `Thanks for your contribution! - - This PR doesn't have a linked issue. All PRs must reference an existing issue. - - Please: - 1. Open an issue describing the bug/feature (if one doesn't exist) - 2. Add \`Fixes #\` or \`Closes #\` to this PR description - - See [CONTRIBUTING.md](../blob/dev/CONTRIBUTING.md#issue-first-policy) for details.`); - return; - } - - await removeLabel('needs:issue'); - console.log('PR meets all standards'); - - check-compliance: - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - steps: - - name: Check PR template compliance - uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0 - with: - script: | - const pr = context.payload.pull_request; - const login = pr.user.login; - - // Skip PRs older than Feb 18, 2026 at 6PM EST (Feb 19, 2026 00:00 UTC) - const cutoff = new Date('2026-02-19T00:00:00Z'); - const prCreated = new Date(pr.created_at); - if (prCreated < cutoff) { - console.log(`Skipping: PR #${pr.number} was created before cutoff (${prCreated.toISOString()})`); - return; - } - - // Check if author is a team member or bot - if (login === 'opencode-agent[bot]') return; - const { data: file } = await github.rest.repos.getContent({ - owner: context.repo.owner, - repo: context.repo.repo, - path: '.github/TEAM_MEMBERS', - ref: 'dev' - }); - const members = Buffer.from(file.content, 'base64').toString().split('\n').map(l => l.trim()).filter(Boolean); - if (members.includes(login)) { - console.log(`Skipping: ${login} is a team member`); - return; - } - - const body = pr.body || ''; - const title = pr.title; - const isDocsRefactorOrFeat = /^(docs|refactor|feat)\s*(\([a-zA-Z0-9-]+\))?\s*:/.test(title); - - const issues = []; - - // Check: template sections exist - const hasWhatSection = /### What does this PR do\?/.test(body); - const hasTypeSection = /### Type of change/.test(body); - const hasVerifySection = /### How did you verify your code works\?/.test(body); - const hasChecklistSection = /### Checklist/.test(body); - const hasIssueSection = /### Issue for this PR/.test(body); - - if (!hasWhatSection || !hasTypeSection || !hasVerifySection || !hasChecklistSection || !hasIssueSection) { - issues.push('PR description is missing required template sections. Please use the [PR template](../blob/dev/.github/pull_request_template.md).'); - } - - // Check: "What does this PR do?" has real content (not just placeholder text) - if (hasWhatSection) { - const whatMatch = body.match(/### What does this PR do\?\s*\n([\s\S]*?)(?=###|$)/); - const whatContent = whatMatch ? whatMatch[1].trim() : ''; - const placeholder = 'Please provide a description of the issue'; - const onlyPlaceholder = whatContent.includes(placeholder) && whatContent.replace(placeholder, '').replace(/[*\s]/g, '').length < 20; - if (!whatContent || onlyPlaceholder) { - issues.push('"What does this PR do?" section is empty or only contains placeholder text. Please describe your changes.'); - } - } - - // Check: at least one "Type of change" checkbox is checked - if (hasTypeSection) { - const typeMatch = body.match(/### Type of change\s*\n([\s\S]*?)(?=###|$)/); - const typeContent = typeMatch ? typeMatch[1] : ''; - const hasCheckedBox = /- \[x\]/i.test(typeContent); - if (!hasCheckedBox) { - issues.push('No "Type of change" checkbox is checked. Please select at least one.'); - } - } - - // Check: issue reference (skip for docs/refactor/feat) - if (!isDocsRefactorOrFeat && hasIssueSection) { - const issueMatch = body.match(/### Issue for this PR\s*\n([\s\S]*?)(?=###|$)/); - const issueContent = issueMatch ? issueMatch[1].trim() : ''; - const hasIssueRef = /(closes|fixes|resolves)\s+#\d+/i.test(issueContent) || /#\d+/.test(issueContent); - if (!hasIssueRef) { - issues.push('No issue referenced. Please add `Closes #` linking to the relevant issue.'); - } - } - - // Check: "How did you verify" has content - if (hasVerifySection) { - const verifyMatch = body.match(/### How did you verify your code works\?\s*\n([\s\S]*?)(?=###|$)/); - const verifyContent = verifyMatch ? verifyMatch[1].trim() : ''; - if (!verifyContent) { - issues.push('"How did you verify your code works?" section is empty. Please explain how you tested.'); - } - } - - // Check: checklist boxes are checked - if (hasChecklistSection) { - const checklistMatch = body.match(/### Checklist\s*\n([\s\S]*?)(?=###|$)/); - const checklistContent = checklistMatch ? checklistMatch[1] : ''; - const unchecked = (checklistContent.match(/- \[ \]/g) || []).length; - const checked = (checklistContent.match(/- \[x\]/gi) || []).length; - if (checked < 2) { - issues.push('Not all checklist items are checked. Please confirm you have tested locally and have not included unrelated changes.'); - } - } - - // Helper functions - async function addLabel(label) { - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: pr.number, - labels: [label] - }); - } - - async function removeLabel(label) { - try { - await github.rest.issues.removeLabel({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: pr.number, - name: label - }); - } catch (e) {} - } - - const hasComplianceLabel = pr.labels.some(l => l.name === 'needs:compliance'); - - if (issues.length > 0) { - // Non-compliant - if (!hasComplianceLabel) { - await addLabel('needs:compliance'); - } - - const marker = ''; - const { data: comments } = await github.rest.issues.listComments({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: pr.number - }); - const existing = comments.find(c => c.body.includes(marker)); - - const body_text = `${marker} - This PR doesn't fully meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md) and [PR template](../blob/dev/.github/pull_request_template.md). - - **What needs to be fixed:** - ${issues.map(i => `- ${i}`).join('\n')} - - Please edit this PR description to address the above within **2 hours**, or it will be automatically closed. - - If you believe this was flagged incorrectly, please let a maintainer know.`; - - if (existing) { - await github.rest.issues.updateComment({ - owner: context.repo.owner, - repo: context.repo.repo, - comment_id: existing.id, - body: body_text - }); - } else { - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: pr.number, - body: body_text - }); - } - - console.log(`PR #${pr.number} is non-compliant: ${issues.join(', ')}`); - } else if (hasComplianceLabel) { - // Was non-compliant, now fixed - await removeLabel('needs:compliance'); - - const { data: comments } = await github.rest.issues.listComments({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: pr.number - }); - const marker = ''; - const existing = comments.find(c => c.body.includes(marker)); - if (existing) { - await github.rest.issues.deleteComment({ - owner: context.repo.owner, - repo: context.repo.repo, - comment_id: existing.id - }); - } - - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: pr.number, - body: 'Thanks for updating your PR! It now meets our contributing guidelines. :+1:' - }); - - console.log(`PR #${pr.number} is now compliant, label removed`); - } else { - console.log(`PR #${pr.number} is compliant`); - } diff --git a/.github/workflows/publish-github-action.yml b/.github/workflows/publish-github-action.yml deleted file mode 100644 index e5ca91b5618a..000000000000 --- a/.github/workflows/publish-github-action.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: publish-github-action - -on: - workflow_dispatch: - push: - tags: - - "github-v*.*.*" - - "!github-v1" - -concurrency: ${{ github.workflow }}-${{ github.ref }} - -permissions: - contents: write - -jobs: - publish: - runs-on: blacksmith-4vcpu-ubuntu-2404 - steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - with: - fetch-depth: 0 - - - run: git fetch --force --tags - - - name: Publish - run: | - git config --global user.email "opencode@sst.dev" - git config --global user.name "opencode" - ./script/publish - working-directory: ./github diff --git a/.github/workflows/publish-vscode.yml b/.github/workflows/publish-vscode.yml deleted file mode 100644 index 00c7e260482e..000000000000 --- a/.github/workflows/publish-vscode.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: publish-vscode - -on: - workflow_dispatch: - push: - tags: - - "vscode-v*.*.*" - -concurrency: ${{ github.workflow }}-${{ github.ref }} - -permissions: - contents: write - -jobs: - publish: - runs-on: blacksmith-4vcpu-ubuntu-2404 - steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - with: - fetch-depth: 0 - - - uses: ./.github/actions/setup-bun - - - run: git fetch --force --tags - - run: bun install -g @vscode/vsce - - - name: Install extension dependencies - run: bun install - working-directory: ./sdks/vscode - - - name: Publish - run: | - ./script/publish - working-directory: ./sdks/vscode - env: - VSCE_PAT: ${{ secrets.VSCE_PAT }} - OPENVSX_TOKEN: ${{ secrets.OPENVSX_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 037020c03af1..000000000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,521 +0,0 @@ -name: publish -run-name: "${{ format('release {0}', inputs.bump) }}" - -on: - push: - branches: - - ci - - dev - - beta - - fix/npm-native-binary-install - - snapshot-* - workflow_dispatch: - inputs: - bump: - description: "Bump major, minor, or patch" - required: false - type: choice - options: - - major - - minor - - patch - version: - description: "Override version (optional)" - required: false - type: string - -concurrency: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.version || inputs.bump }} - -permissions: - id-token: write - contents: write - packages: write - -jobs: - version: - runs-on: blacksmith-4vcpu-ubuntu-2404 - if: github.repository == 'anomalyco/opencode' - steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - with: - fetch-depth: 0 - - - uses: ./.github/actions/setup-bun - - - name: Setup git committer - id: committer - uses: ./.github/actions/setup-git-committer - with: - opencode-app-id: ${{ vars.OPENCODE_APP_ID }} - opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }} - - - name: Install OpenCode - if: inputs.bump || inputs.version - run: bun i -g opencode-ai - - - id: version - run: | - ./script/version.ts - env: - GH_TOKEN: ${{ steps.committer.outputs.token }} - OPENCODE_BUMP: ${{ inputs.bump }} - OPENCODE_VERSION: ${{ inputs.version }} - OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} - GH_REPO: ${{ (github.ref_name == 'beta' && 'anomalyco/opencode-beta') || github.repository }} - outputs: - version: ${{ steps.version.outputs.version }} - release: ${{ steps.version.outputs.release }} - tag: ${{ steps.version.outputs.tag }} - repo: ${{ steps.version.outputs.repo }} - - build-cli: - needs: version - runs-on: blacksmith-4vcpu-ubuntu-2404 - if: github.repository == 'anomalyco/opencode' - steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - with: - fetch-tags: true - - - uses: ./.github/actions/setup-bun - - - name: Setup git committer - id: committer - uses: ./.github/actions/setup-git-committer - with: - opencode-app-id: ${{ vars.OPENCODE_APP_ID }} - opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }} - - - name: Build - id: build - run: | - ./packages/opencode/script/build.ts ${{ (github.ref_name == 'beta' && '--sourcemaps') || '' }} - ./packages/cli/script/build.ts ${{ (github.ref_name == 'beta' && '--sourcemaps') || '' }} - env: - OPENCODE_VERSION: ${{ needs.version.outputs.version }} - OPENCODE_RELEASE: ${{ needs.version.outputs.release }} - GH_REPO: ${{ needs.version.outputs.repo }} - GH_TOKEN: ${{ steps.committer.outputs.token }} - - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: opencode-cli - path: | - packages/opencode/dist/opencode-darwin* - packages/opencode/dist/opencode-linux* - - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: opencode-cli-windows - path: packages/opencode/dist/opencode-windows* - - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: opencode-preview-cli - path: packages/cli/dist/cli-* - - outputs: - version: ${{ needs.version.outputs.version }} - - sign-cli-windows: - needs: - - build-cli - - version - runs-on: blacksmith-4vcpu-windows-2025 - if: github.repository == 'anomalyco/opencode' - env: - AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} - AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} - AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} - AZURE_TRUSTED_SIGNING_ACCOUNT_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }} - AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE: ${{ secrets.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE }} - AZURE_TRUSTED_SIGNING_ENDPOINT: ${{ secrets.AZURE_TRUSTED_SIGNING_ENDPOINT }} - steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - - - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - with: - name: opencode-cli-windows - path: packages/opencode/dist - - - name: Setup git committer - id: committer - uses: ./.github/actions/setup-git-committer - with: - opencode-app-id: ${{ vars.OPENCODE_APP_ID }} - opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }} - - - name: Azure login - uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 - with: - client-id: ${{ env.AZURE_CLIENT_ID }} - tenant-id: ${{ env.AZURE_TENANT_ID }} - subscription-id: ${{ env.AZURE_SUBSCRIPTION_ID }} - - - uses: azure/artifact-signing-action@b443cf8ea4124818d2ea9f043cba29fc3ec47b16 # v1.2.0 - with: - endpoint: ${{ env.AZURE_TRUSTED_SIGNING_ENDPOINT }} - signing-account-name: ${{ env.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }} - certificate-profile-name: ${{ env.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE }} - files: | - ${{ github.workspace }}\packages\opencode\dist\opencode-windows-arm64\bin\opencode.exe - ${{ github.workspace }}\packages\opencode\dist\opencode-windows-x64\bin\opencode.exe - ${{ github.workspace }}\packages\opencode\dist\opencode-windows-x64-baseline\bin\opencode.exe - exclude-environment-credential: true - exclude-workload-identity-credential: true - exclude-managed-identity-credential: true - exclude-shared-token-cache-credential: true - exclude-visual-studio-credential: true - exclude-visual-studio-code-credential: true - exclude-azure-cli-credential: false - exclude-azure-powershell-credential: true - exclude-azure-developer-cli-credential: true - exclude-interactive-browser-credential: true - - - name: Verify Windows CLI signatures - shell: pwsh - run: | - $files = @( - "${{ github.workspace }}\packages\opencode\dist\opencode-windows-arm64\bin\opencode.exe", - "${{ github.workspace }}\packages\opencode\dist\opencode-windows-x64\bin\opencode.exe", - "${{ github.workspace }}\packages\opencode\dist\opencode-windows-x64-baseline\bin\opencode.exe" - ) - - foreach ($file in $files) { - $sig = Get-AuthenticodeSignature $file - if ($sig.Status -ne "Valid") { - throw "Invalid signature for ${file}: $($sig.Status)" - } - } - - - name: Repack Windows CLI archives - working-directory: packages/opencode/dist - shell: pwsh - run: | - Compress-Archive -Path "opencode-windows-arm64\bin\*" -DestinationPath "opencode-windows-arm64.zip" -Force - Compress-Archive -Path "opencode-windows-x64\bin\*" -DestinationPath "opencode-windows-x64.zip" -Force - Compress-Archive -Path "opencode-windows-x64-baseline\bin\*" -DestinationPath "opencode-windows-x64-baseline.zip" -Force - - - name: Upload signed Windows CLI release assets - if: needs.version.outputs.release != '' - shell: pwsh - env: - GH_TOKEN: ${{ steps.committer.outputs.token }} - run: | - gh release upload "v${{ needs.version.outputs.version }}" ` - "${{ github.workspace }}\packages\opencode\dist\opencode-windows-arm64.zip" ` - "${{ github.workspace }}\packages\opencode\dist\opencode-windows-x64.zip" ` - "${{ github.workspace }}\packages\opencode\dist\opencode-windows-x64-baseline.zip" ` - --clobber ` - --repo "${{ needs.version.outputs.repo }}" - - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: opencode-cli-signed-windows - path: | - packages/opencode/dist/opencode-windows-arm64 - packages/opencode/dist/opencode-windows-x64 - packages/opencode/dist/opencode-windows-x64-baseline - - build-electron: - needs: - - build-cli - - version - if: github.repository == 'anomalyco/opencode' - continue-on-error: false - env: - AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} - AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} - AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }} - AZURE_TRUSTED_SIGNING_ACCOUNT_NAME: ${{ secrets.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }} - AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE: ${{ secrets.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE }} - AZURE_TRUSTED_SIGNING_ENDPOINT: ${{ secrets.AZURE_TRUSTED_SIGNING_ENDPOINT }} - strategy: - fail-fast: false - matrix: - settings: - - host: macos-26-intel - target: x86_64-apple-darwin - platform_flag: --mac --x64 - bun_install_flags: --os=darwin --cpu=x64 - - host: macos-26 - target: aarch64-apple-darwin - platform_flag: --mac --arm64 - bun_install_flags: --os=darwin --cpu=arm64 - # github-hosted: blacksmith lacks ARM64 MSVC cross-compilation toolchain - - host: "windows-2025" - target: aarch64-pc-windows-msvc - platform_flag: --win --arm64 - - host: "blacksmith-4vcpu-windows-2025" - target: x86_64-pc-windows-msvc - platform_flag: --win - - host: "blacksmith-4vcpu-ubuntu-2404" - target: x86_64-unknown-linux-gnu - platform_flag: --linux - - host: "blacksmith-4vcpu-ubuntu-2404-arm" - target: aarch64-unknown-linux-gnu - platform_flag: --linux --arm64 - runs-on: ${{ matrix.settings.host }} - steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - - - uses: apple-actions/import-codesign-certs@8f3fb608891dd2244cdab3d69cd68c0d37a7fe93 # v2.0.0 - if: runner.os == 'macOS' - with: - keychain: build - p12-file-base64: ${{ secrets.APPLE_CERTIFICATE }} - p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} - - - name: Setup Apple API Key - if: runner.os == 'macOS' - run: echo "${{ secrets.APPLE_API_KEY_PATH }}" > $RUNNER_TEMP/apple-api-key.p8 - - - uses: ./.github/actions/setup-bun - with: - install-flags: ${{ matrix.settings.bun_install_flags }} - - - name: Azure login - if: runner.os == 'Windows' - uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 - with: - client-id: ${{ env.AZURE_CLIENT_ID }} - tenant-id: ${{ env.AZURE_TENANT_ID }} - subscription-id: ${{ env.AZURE_SUBSCRIPTION_ID }} - - - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - with: - node-version: "24" - - - name: Cache apt packages - if: contains(matrix.settings.host, 'ubuntu') - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 - with: - path: ~/apt-cache - key: ${{ runner.os }}-${{ matrix.settings.target }}-apt-electron-${{ hashFiles('.github/workflows/publish.yml') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.settings.target }}-apt-electron- - - - name: Install dependencies (ubuntu only) - if: contains(matrix.settings.host, 'ubuntu') - run: | - mkdir -p ~/apt-cache && chmod -R a+rw ~/apt-cache - sudo apt-get update - sudo apt-get install -y --no-install-recommends -o dir::cache::archives="$HOME/apt-cache" rpm - sudo chmod -R a+rw ~/apt-cache - - - name: Setup git committer - id: committer - uses: ./.github/actions/setup-git-committer - with: - opencode-app-id: ${{ vars.OPENCODE_APP_ID }} - opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }} - - - name: Prepare - run: bun ./scripts/prepare.ts - working-directory: packages/desktop - env: - OPENCODE_VERSION: ${{ needs.version.outputs.version }} - OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }} - OPENCODE_CLI_ARTIFACT: ${{ (runner.os == 'Windows' && 'opencode-cli-windows') || 'opencode-cli' }} - RUST_TARGET: ${{ matrix.settings.target }} - GH_TOKEN: ${{ github.token }} - GITHUB_RUN_ID: ${{ github.run_id }} - - - name: Build - run: bun run build - working-directory: packages/desktop - env: - NODE_OPTIONS: --max-old-space-size=4096 - OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }} - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_ORG: ${{ vars.SENTRY_ORG }} - SENTRY_PROJECT: ${{ vars.WEB_SENTRY_PROJECT }} - SENTRY_RELEASE: desktop@${{ needs.version.outputs.version }} - VITE_SENTRY_DSN: ${{ vars.WEB_SENTRY_DSN }} - VITE_SENTRY_ENVIRONMENT: ${{ (github.ref_name == 'beta' && 'beta') || 'production' }} - VITE_SENTRY_RELEASE: desktop@${{ needs.version.outputs.version }} - - - name: Package - if: needs.version.outputs.release - run: npx electron-builder ${{ matrix.settings.platform_flag }} --publish never --config electron-builder.config.ts - working-directory: packages/desktop - timeout-minutes: 60 - env: - OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }} - GH_TOKEN: ${{ steps.committer.outputs.token }} - CSC_LINK: ${{ secrets.APPLE_CERTIFICATE }} - CSC_KEY_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} - APPLE_API_KEY: ${{ runner.temp }}/apple-api-key.p8 - APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY }} - APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }} - - - name: Package (no publish) - if: ${{ !needs.version.outputs.release }} - run: npx electron-builder ${{ matrix.settings.platform_flag }} --publish never --config electron-builder.config.ts - working-directory: packages/desktop - timeout-minutes: 60 - env: - OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }} - - - name: Create macOS .app.tar.gz - if: runner.os == 'macOS' && needs.version.outputs.release - working-directory: packages/desktop/dist - run: | - if [[ "${{ matrix.settings.target }}" == "x86_64-apple-darwin" ]]; then - APP_DIR="mac" - OUT_NAME="opencode-desktop-mac-x64.app.tar.gz" - elif [[ "${{ matrix.settings.target }}" == "aarch64-apple-darwin" ]]; then - APP_DIR="mac-arm64" - OUT_NAME="opencode-desktop-mac-arm64.app.tar.gz" - else - echo "Unknown macOS target: ${{ matrix.settings.target }}" - exit 1 - fi - APP_PATH=$(find "$APP_DIR" -maxdepth 1 -name "*.app" -type d | head -1) - if [ -z "$APP_PATH" ]; then - echo "No .app bundle found in $APP_DIR" - exit 1 - fi - tar -czf "$OUT_NAME" -C "$(dirname "$APP_PATH")" "$(basename "$APP_PATH")" - - - name: Verify signed Windows Electron artifacts - if: runner.os == 'Windows' - shell: pwsh - run: | - $files = @() - $files += Get-ChildItem "${{ github.workspace }}\packages\desktop\dist\*.exe" | Select-Object -ExpandProperty FullName - $files += Get-ChildItem "${{ github.workspace }}\packages\desktop\dist\*unpacked\*.exe" | Select-Object -ExpandProperty FullName - $files += Get-ChildItem "${{ github.workspace }}\packages\desktop\dist\*unpacked\resources\opencode-cli.exe" -ErrorAction SilentlyContinue | Select-Object -ExpandProperty FullName - - foreach ($file in $files | Select-Object -Unique) { - $sig = Get-AuthenticodeSignature $file - if ($sig.Status -ne "Valid") { - throw "Invalid signature for ${file}: $($sig.Status)" - } - } - - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - with: - name: opencode-desktop-${{ matrix.settings.target }} - path: packages/desktop/dist/* - - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 - if: needs.version.outputs.release - with: - name: latest-yml-${{ matrix.settings.target }} - path: packages/desktop/dist/latest*.yml - - publish: - needs: - - version - - build-cli - - sign-cli-windows - - build-electron - if: always() && !failure() && !cancelled() - runs-on: blacksmith-4vcpu-ubuntu-2404 - steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 - - - uses: ./.github/actions/setup-bun - - - name: Login to GitHub Container Registry - uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0 - - - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - with: - node-version: "24" - registry-url: "https://registry.npmjs.org" - - - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - with: - name: opencode-cli - path: packages/opencode/dist - - - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - with: - name: opencode-cli-windows - path: packages/opencode/dist - - - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - with: - name: opencode-cli-signed-windows - path: packages/opencode/dist - - - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - with: - name: opencode-preview-cli - path: packages/cli/dist - - - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - if: needs.version.outputs.release - with: - pattern: latest-yml-* - path: /tmp/latest-yml - - - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 - if: needs.version.outputs.release - with: - pattern: opencode-desktop-* - path: /tmp/desktop - merge-multiple: true - - - name: Setup git committer - id: committer - uses: ./.github/actions/setup-git-committer - with: - opencode-app-id: ${{ vars.OPENCODE_APP_ID }} - opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }} - - - name: Cache apt packages (AUR) - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 - with: - path: /var/cache/apt/archives - key: ${{ runner.os }}-apt-aur-${{ hashFiles('.github/workflows/publish.yml') }} - restore-keys: | - ${{ runner.os }}-apt-aur- - - - name: Setup SSH for AUR - run: | - sudo apt-get update - sudo apt-get install -y pacman-package-manager - mkdir -p ~/.ssh - echo "${{ secrets.AUR_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - git config --global user.email "opencode@sst.dev" - git config --global user.name "opencode" - ssh-keyscan -H aur.archlinux.org >> ~/.ssh/known_hosts || true - - - name: Upload desktop release assets - if: needs.version.outputs.release - env: - GH_TOKEN: ${{ steps.committer.outputs.token }} - run: | - shopt -s nullglob - files=(/tmp/desktop/*.{exe,blockmap,dmg,zip,AppImage,deb,rpm} /tmp/desktop/*.app.tar.gz) - if (( ${#files[@]} == 0 )); then - echo "No desktop release assets found" - exit 1 - fi - gh release upload "v${{ needs.version.outputs.version }}" "${files[@]}" --clobber --repo "${{ needs.version.outputs.repo }}" - - - run: ./script/publish.ts - env: - OPENCODE_VERSION: ${{ needs.version.outputs.version }} - OPENCODE_RELEASE: ${{ needs.version.outputs.release }} - AUR_KEY: ${{ secrets.AUR_KEY }} - GITHUB_TOKEN: ${{ steps.committer.outputs.token }} - GH_REPO: ${{ needs.version.outputs.repo }} - NPM_CONFIG_PROVENANCE: false - LATEST_YML_DIR: /tmp/latest-yml - TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} - TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} diff --git a/.github/workflows/release-github-action.yml b/.github/workflows/release-github-action.yml deleted file mode 100644 index 4a1d7218bb2c..000000000000 --- a/.github/workflows/release-github-action.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: release-github-action - -on: - push: - branches: - - dev - paths: - - "github/**" - -concurrency: ${{ github.workflow }}-${{ github.ref }} - -permissions: - contents: write - -jobs: - release: - runs-on: blacksmith-4vcpu-ubuntu-2404 - steps: - - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - with: - fetch-depth: 0 - - - run: git fetch --force --tags - - - name: Release - run: | - git config --global user.email "opencode@sst.dev" - git config --global user.name "opencode" - ./github/script/release diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000000..38dcd18f30b8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,57 @@ +name: release-dcode + +on: + workflow_dispatch: + inputs: + version: + description: Release version without the leading v + required: true + type: string + +permissions: + contents: write + +concurrency: release-dcode-${{ inputs.version }} + +jobs: + release: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 + with: + fetch-depth: 0 + + - uses: ./.github/actions/setup-bun + + - name: Validate version + env: + VERSION: ${{ inputs.version }} + run: | + if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$ ]]; then + echo "Invalid release version: $VERSION" >&2 + exit 1 + fi + + - name: Create draft release + env: + GH_TOKEN: ${{ github.token }} + VERSION: ${{ inputs.version }} + run: | + gh release view "v$VERSION" --repo "${{ github.repository }}" >/dev/null 2>&1 || \ + gh release create "v$VERSION" --repo "${{ github.repository }}" --draft --generate-notes --target "${{ github.sha }}" + + - name: Build and upload CLI archives + working-directory: packages/opencode + env: + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} + OPENCODE_CHANNEL: latest + OPENCODE_RELEASE: "1" + OPENCODE_VERSION: ${{ inputs.version }} + run: bun run build + + - name: Publish release + env: + GH_TOKEN: ${{ github.token }} + VERSION: ${{ inputs.version }} + run: gh release edit "v$VERSION" --repo "${{ github.repository }}" --draft=false --latest diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml deleted file mode 100644 index 00a4fba8ca13..000000000000 --- a/.github/workflows/review.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: review - -on: - issue_comment: - types: [created] - -jobs: - check-guidelines: - if: | - github.event.issue.pull_request && - startsWith(github.event.comment.body, '/review') && - contains(fromJson('["OWNER","MEMBER"]'), github.event.comment.author_association) - runs-on: blacksmith-4vcpu-ubuntu-2404 - permissions: - contents: read - pull-requests: write - steps: - - name: Get PR number - id: pr-number - run: | - if [ "${{ github.event_name }}" = "pull_request_target" ]; then - echo "number=${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT - else - echo "number=${{ github.event.issue.number }}" >> $GITHUB_OUTPUT - fi - - - name: Checkout repository - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - with: - fetch-depth: 1 - - - uses: ./.github/actions/setup-bun - - - name: Install opencode - run: curl -fsSL https://opencode.ai/install | bash - - - name: Get PR details - id: pr-details - run: | - gh api /repos/${{ github.repository }}/pulls/${{ steps.pr-number.outputs.number }} > pr_data.json - echo "title=$(jq -r .title pr_data.json)" >> $GITHUB_OUTPUT - echo "sha=$(jq -r .head.sha pr_data.json)" >> $GITHUB_OUTPUT - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Check PR guidelines compliance - env: - OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - OPENCODE_PERMISSION: '{ "bash": { "*": "deny", "gh*": "allow", "gh pr review*": "deny" } }' - PR_TITLE: ${{ steps.pr-details.outputs.title }} - run: | - PR_BODY=$(jq -r .body pr_data.json) - opencode run -m opencode/gpt-5.5 --variant medium "A new pull request has been created: '${PR_TITLE}' - - - ${{ steps.pr-number.outputs.number }} - - - - $PR_BODY - - - Please check all the code changes in this pull request against the style guide, also look for any bugs if they exist. Diffs are important but make sure you read the entire file to get proper context. Make it clear the suggestions are merely suggestions and the human can decide what to do - - When critiquing code against the style guide, be sure that the code is ACTUALLY in violation, don't complain about else statements if they already use early returns there. You may complain about excessive nesting though, regardless of else statement usage. - When critiquing code style don't be a zealot, we don't like "let" statements but sometimes they are the simplest option, if someone does a bunch of nesting with let, they should consider using iife (see packages/opencode/src/util.iife.ts) - - Use the gh cli to create comments on the files for the violations. Try to leave the comment on the exact line number. If you have a suggested fix include it in a suggestion code block. - If you are writing suggested fixes, BE SURE THAT the change you are recommending is actually valid typescript, often I have seen missing closing "}" or other syntax errors. - Generally, write a comment instead of writing suggested change if you can help it. - - Command MUST be like this. - \`\`\` - gh api \ - --method POST \ - -H \"Accept: application/vnd.github+json\" \ - -H \"X-GitHub-Api-Version: 2022-11-28\" \ - /repos/${{ github.repository }}/pulls/${{ steps.pr-number.outputs.number }}/comments \ - -f 'body=[summary of issue]' -f 'commit_id=${{ steps.pr-details.outputs.sha }}' -f 'path=[path-to-file]' -F \"line=[line]\" -f 'side=RIGHT' - \`\`\` - - Only create comments for actual violations. If the code follows all guidelines, comment on the issue using gh cli: 'lgtm' AND NOTHING ELSE!!!!." diff --git a/.github/workflows/stats.yml b/.github/workflows/stats.yml deleted file mode 100644 index bc97cfcd7188..000000000000 --- a/.github/workflows/stats.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: stats - -on: - schedule: - - cron: "0 12 * * *" # Run daily at 12:00 UTC - workflow_dispatch: # Allow manual trigger - -concurrency: ${{ github.workflow }}-${{ github.ref }} - -jobs: - stats: - if: github.repository == 'anomalyco/opencode' - runs-on: blacksmith-4vcpu-ubuntu-2404 - permissions: - contents: write - - steps: - - name: Checkout - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - - - name: Setup Bun - uses: ./.github/actions/setup-bun - - - name: Run stats script - run: bun script/stats.ts - - - name: Commit stats - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add STATS.md - git diff --staged --quiet || git commit -m "ignore: update download stats $(date -I)" - git push - env: - POSTHOG_KEY: ${{ secrets.POSTHOG_KEY }} diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml deleted file mode 100644 index 0350e43877c4..000000000000 --- a/.github/workflows/triage.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: triage - -on: - issues: - types: [opened] - -jobs: - triage: - runs-on: blacksmith-4vcpu-ubuntu-2404 - permissions: - contents: read - issues: write - steps: - - name: Checkout repository - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - with: - fetch-depth: 1 - - - name: Check exempt issue author - id: author - run: | - LOGIN="${{ github.event.issue.user.login }}" - ASSOCIATION="${{ github.event.issue.author_association }}" - - if [ "$LOGIN" = "opencode-agent[bot]" ] || - [ "$ASSOCIATION" = "OWNER" ] || - [ "$ASSOCIATION" = "MEMBER" ] || - grep -qxiF "$LOGIN" .github/TEAM_MEMBERS; then - echo "skip=true" >> "$GITHUB_OUTPUT" - echo "Skipping issue automation for exempt author: $LOGIN ($ASSOCIATION)" - else - echo "skip=false" >> "$GITHUB_OUTPUT" - fi - - - name: Setup Bun - if: steps.author.outputs.skip != 'true' - uses: ./.github/actions/setup-bun - - - name: Install opencode - if: steps.author.outputs.skip != 'true' - run: curl -fsSL https://opencode.ai/install | bash - - - name: Triage issue - if: steps.author.outputs.skip != 'true' - env: - OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ISSUE_NUMBER: ${{ github.event.issue.number }} - ISSUE_TITLE: ${{ github.event.issue.title }} - ISSUE_BODY: ${{ github.event.issue.body }} - run: | - opencode run --agent triage "The following issue was just opened, triage it: - - Title: $ISSUE_TITLE - - $ISSUE_BODY" diff --git a/github/action.yml b/github/action.yml index 3d983a160995..831c7931e402 100644 --- a/github/action.yml +++ b/github/action.yml @@ -1,5 +1,5 @@ -name: "opencode GitHub Action" -description: "Run opencode in GitHub Actions workflows" +name: "DCode GitHub Action" +description: "Run DCode in GitHub Actions workflows" branding: icon: "code" color: "orange" @@ -14,7 +14,7 @@ inputs: required: false share: - description: "Share the opencode session (defaults to true for public repos)" + description: "Share the DCode session (defaults to true for public repos)" required: false prompt: @@ -27,7 +27,7 @@ inputs: default: "false" mentions: - description: "Comma-separated list of trigger phrases (case-insensitive). Defaults to '/opencode,/oc'" + description: "Comma-separated list of trigger phrases (case-insensitive). Defaults to '/dcode,/dc'" required: false variant: @@ -41,33 +41,33 @@ inputs: runs: using: "composite" steps: - - name: Get opencode version + - name: Get DCode version id: version shell: bash run: | - VERSION=$(curl -sf https://api.github.com/repos/anomalyco/opencode/releases/latest | grep -o '"tag_name": *"[^"]*"' | cut -d'"' -f4) + VERSION=$(curl -sf https://api.github.com/repos/CreatorGhost/TheCode/releases/latest | grep -o '"tag_name": *"[^"]*"' | cut -d'"' -f4) echo "version=${VERSION:-latest}" >> $GITHUB_OUTPUT - - name: Cache opencode + - name: Cache DCode id: cache uses: actions/cache@v4 with: - path: ~/.opencode/bin - key: opencode-${{ runner.os }}-${{ runner.arch }}-${{ steps.version.outputs.version }} + path: ~/.dcode/bin + key: dcode-${{ runner.os }}-${{ runner.arch }}-${{ steps.version.outputs.version }} - - name: Install opencode + - name: Install DCode if: steps.cache.outputs.cache-hit != 'true' shell: bash - run: curl -fsSL https://opencode.ai/install | bash + run: curl -fsSL https://raw.githubusercontent.com/CreatorGhost/TheCode/dev/install | bash - - name: Add opencode to PATH + - name: Add DCode to PATH shell: bash - run: echo "$HOME/.opencode/bin" >> $GITHUB_PATH + run: echo "$HOME/.dcode/bin" >> $GITHUB_PATH - - name: Run opencode + - name: Run DCode shell: bash - id: run_opencode - run: opencode github run + id: run_dcode + run: dcode github run env: MODEL: ${{ inputs.model }} AGENT: ${{ inputs.agent }} diff --git a/install b/install index b0716d532082..c95f9143edc1 100755 --- a/install +++ b/install @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -euo pipefail -APP=opencode +APP=dcode MUTED='\033[0;2m' RED='\033[0;31m' @@ -9,7 +9,7 @@ NC='\033[0m' # No Color usage() { cat </dev/null 2>&1; then - opencode_path=$(which opencode) + local installed_binary="$INSTALL_DIR/dcode" + if [ "${os:-}" = "windows" ]; then + installed_binary="$INSTALL_DIR/dcode.exe" + fi + if [ -x "$installed_binary" ]; then ## Check the installed version - installed_version=$(opencode --version 2>/dev/null || echo "") + installed_version=$("$installed_binary" --version 2>/dev/null || echo "") if [[ "$installed_version" != "$specific_version" ]]; then print_message info "${MUTED}Installed version: ${NC}$installed_version." @@ -275,7 +288,7 @@ download_with_progress() { fi local tmp_dir=${TMPDIR:-/tmp} - local basename="${tmp_dir}/opencode_install_$$" + local basename="${tmp_dir}/dcode_install_$$" local tracefile="${basename}.trace" rm -f "$tracefile" @@ -325,8 +338,8 @@ download_with_progress() { } download_and_install() { - print_message info "\n${MUTED}Installing ${NC}opencode ${MUTED}version: ${NC}$specific_version" - local tmp_dir="${TMPDIR:-/tmp}/opencode_install_$$" + print_message info "\n${MUTED}Installing ${NC}dcode ${MUTED}version: ${NC}$specific_version" + local tmp_dir="${TMPDIR:-/tmp}/dcode_install_$$" mkdir -p "$tmp_dir" if [[ "$os" == "windows" ]] || ! [ -t 2 ] || ! download_with_progress "$url" "$tmp_dir/$filename"; then @@ -340,15 +353,23 @@ download_and_install() { unzip -q "$tmp_dir/$filename" -d "$tmp_dir" fi - mv "$tmp_dir/opencode" "$INSTALL_DIR" - chmod 755 "${INSTALL_DIR}/opencode" + local binary_name="dcode" + if [ "$os" = "windows" ]; then + binary_name="dcode.exe" + fi + mv "$tmp_dir/$binary_name" "$INSTALL_DIR/$binary_name" + chmod 755 "${INSTALL_DIR}/$binary_name" rm -rf "$tmp_dir" } install_from_binary() { - print_message info "\n${MUTED}Installing ${NC}opencode ${MUTED}from: ${NC}$binary_path" - cp "$binary_path" "${INSTALL_DIR}/opencode" - chmod 755 "${INSTALL_DIR}/opencode" + print_message info "\n${MUTED}Installing ${NC}dcode ${MUTED}from: ${NC}$binary_path" + local binary_name="dcode" + case "$(uname -s)" in + MINGW*|MSYS*|CYGWIN*) binary_name="dcode.exe" ;; + esac + cp "$binary_path" "${INSTALL_DIR}/$binary_name" + chmod 755 "${INSTALL_DIR}/$binary_name" } if [ -n "$binary_path" ]; then @@ -366,9 +387,9 @@ add_to_path() { if grep -Fxq "$command" "$config_file"; then print_message info "Command already exists in $config_file, skipping write." elif [[ -w $config_file ]]; then - echo -e "\n# opencode" >> "$config_file" + echo -e "\n# dcode" >> "$config_file" echo "$command" >> "$config_file" - print_message info "${MUTED}Successfully added ${NC}opencode ${MUTED}to \$PATH in ${NC}$config_file" + print_message info "${MUTED}Successfully added ${NC}dcode ${MUTED}to \$PATH in ${NC}$config_file" else print_message warning "Manually add the directory to $config_file (or similar):" print_message info " $command" @@ -444,17 +465,16 @@ if [ -n "${GITHUB_ACTIONS-}" ] && [ "${GITHUB_ACTIONS}" == "true" ]; then fi echo -e "" -echo -e "${MUTED}  ${NC} ▄ " -echo -e "${MUTED}█▀▀█ █▀▀█ █▀▀█ █▀▀▄ ${NC}█▀▀▀ █▀▀█ █▀▀█ █▀▀█" -echo -e "${MUTED}█░░█ █░░█ █▀▀▀ █░░█ ${NC}█░░░ █░░█ █░░█ █▀▀▀" -echo -e "${MUTED}▀▀▀▀ █▀▀▀ ▀▀▀▀ ▀ ▀ ${NC}▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀" +echo -e "${MUTED}█▀▀▄ ${NC}█▀▀▀ █▀▀█ █▀▀▄ █▀▀▀" +echo -e "${MUTED}█ █ ${NC}█ █ █ █ █ █▀▀▀" +echo -e "${MUTED}▀▀▀ ${NC}▀▀▀▀ ▀▀▀▀ ▀▀▀ ▀▀▀▀" echo -e "" echo -e "" -echo -e "${MUTED}OpenCode includes free models, to start:${NC}" +echo -e "${MUTED}DCode is ready. To start:${NC}" echo -e "" echo -e "cd ${MUTED}# Open directory${NC}" -echo -e "opencode ${MUTED}# Run command${NC}" +echo -e "dcode ${MUTED}# Run command${NC}" echo -e "" -echo -e "${MUTED}For more information visit ${NC}https://opencode.ai/docs" +echo -e "${MUTED}For source and releases visit ${NC}https://github.com/CreatorGhost/TheCode" echo -e "" echo -e "" diff --git a/packages/opencode/src/cli/cmd/github.handler.ts b/packages/opencode/src/cli/cmd/github.handler.ts index d55c0bf3fbfa..1533b0e723d9 100644 --- a/packages/opencode/src/cli/cmd/github.handler.ts +++ b/packages/opencode/src/cli/cmd/github.handler.ts @@ -140,7 +140,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/dcode.yml" // Event categories for routing // USER_EVENTS: triggered by user actions, have actor/issueId, support reactions/comments @@ -198,7 +198,7 @@ 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 `/dc summarize` to see the agent in action", "", " Learn more about the GitHub agent - https://opencode.ai/docs/github/#usage-examples", ].join("\n"), @@ -334,7 +334,7 @@ export const githubInstall = Effect.fn("Cli.github.install")(function* () { await Filesystem.write( path.join(app.root, WORKFLOW_FILE), - `name: opencode + `name: dcode on: issue_comment: @@ -343,12 +343,12 @@ on: types: [created] jobs: - opencode: + dcode: 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, ' /dc') || + startsWith(github.event.comment.body, '/dc') || + contains(github.event.comment.body, ' /dcode') || + startsWith(github.event.comment.body, '/dcode') runs-on: ubuntu-latest permissions: id-token: write @@ -361,8 +361,8 @@ jobs: with: persist-credentials: false - - name: Run opencode - uses: anomalyco/opencode/github@latest${envStr} + - name: Run DCode + uses: CreatorGhost/TheCode/github@dev${envStr} with: model: ${provider}/${model}`, ) @@ -736,7 +736,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"] || "/dcode,/dc") .split(",") .map((m) => m.trim().toLowerCase()) .filter(Boolean) From d40b02a0d06bfaae33eeb5d57300110825617b5e Mon Sep 17 00:00:00 2001 From: CreatorGhost Date: Sat, 11 Jul 2026 15:11:52 +0530 Subject: [PATCH 4/8] feat(tui): DCode branding, logo, and CLI copy --- packages/opencode/src/acp/service.ts | 14 +- packages/opencode/src/cli/cmd/attach.ts | 2 +- packages/opencode/src/cli/cmd/debug/index.ts | 2 +- packages/opencode/src/cli/cmd/mcp.ts | 4 +- packages/opencode/src/cli/cmd/pr.ts | 14 +- packages/opencode/src/cli/cmd/providers.ts | 2 +- packages/opencode/src/cli/cmd/run.ts | 4 +- .../src/cli/cmd/run/permission.shared.ts | 4 +- packages/opencode/src/cli/cmd/run/splash.ts | 2 +- packages/opencode/src/cli/cmd/serve.ts | 2 +- packages/opencode/src/cli/cmd/tui.ts | 4 +- packages/opencode/src/cli/cmd/web.ts | 2 +- packages/opencode/src/cli/error.ts | 6 +- packages/opencode/src/mcp/index.ts | 2 +- packages/opencode/src/plugin/digitalocean.ts | 2 +- .../opencode/src/plugin/snowflake-cortex.ts | 2 +- packages/opencode/src/provider/error.ts | 2 +- packages/opencode/src/provider/provider.ts | 4 +- .../test/cli/acp/initialize-auth.test.ts | 2 +- .../__snapshots__/help-snapshots.test.ts.snap | 221 +++++++++--------- .../test/cli/help/help-snapshots.test.ts | 4 +- packages/tui/src/app.tsx | 10 +- packages/tui/src/attention.ts | 4 +- packages/tui/src/component/dialog-status.tsx | 2 +- .../tui/src/component/error-component.tsx | 10 +- .../src/feature-plugins/home/tips-view.tsx | 25 +- .../src/feature-plugins/sidebar/footer.tsx | 4 +- packages/tui/src/logo.ts | 4 +- .../tui/src/routes/session/permission.tsx | 6 +- packages/tui/src/util/error.ts | 4 +- packages/tui/src/util/presentation.ts | 6 +- packages/tui/test/app-lifecycle.test.tsx | 2 +- packages/tui/test/util/presentation.test.ts | 2 +- 33 files changed, 187 insertions(+), 193 deletions(-) diff --git a/packages/opencode/src/acp/service.ts b/packages/opencode/src/acp/service.ts index 7257efa7658c..fba19fd557df 100644 --- a/packages/opencode/src/acp/service.ts +++ b/packages/opencode/src/acp/service.ts @@ -92,17 +92,17 @@ export function make(input: { const initialize = Effect.fn("ACP.initialize")(function* (params: InitializeRequest) { const started = performance.now() const authMethod: AuthMethod = { - description: "Run `opencode auth login` in the terminal", - name: "Login with opencode", + description: "Run `dcode auth login` in the terminal", + name: "Login with DCode", id: AuthMethodID, } if (params.clientCapabilities?._meta?.["terminal-auth"] === true) { authMethod._meta = { "terminal-auth": { - command: "opencode", + command: "dcode", args: ["auth", "login"], - label: "OpenCode Login", + label: "DCode Login", }, } } @@ -128,7 +128,7 @@ export function make(input: { }, authMethods: [authMethod], agentInfo: { - name: "OpenCode", + name: "DCode", version: InstallationVersion, }, } @@ -866,7 +866,7 @@ const promptResponse = Effect.fn("ACP.promptResponse")(function* ( function promptErrorMessage(error: AssistantError) { if ("message" in error.data && typeof error.data.message === "string") return error.data.message - return "OpenCode prompt failed" + return "DCode prompt failed" } function sendUsageUpdate( @@ -1059,7 +1059,7 @@ function fromUnknownError(error: unknown, service?: string): Error { if (isAuthRequired(error)) { return new ACPError.AuthRequiredError({ providerId: findProviderID(error) }) } - return new ACPError.ServiceFailureError({ safeMessage: "OpenCode service failure", service }) + return new ACPError.ServiceFailureError({ safeMessage: "DCode service failure", service }) } function isACPError(error: unknown): error is Error { diff --git a/packages/opencode/src/cli/cmd/attach.ts b/packages/opencode/src/cli/cmd/attach.ts index 6f5aea6a1248..ed0a11acd3d0 100644 --- a/packages/opencode/src/cli/cmd/attach.ts +++ b/packages/opencode/src/cli/cmd/attach.ts @@ -6,7 +6,7 @@ import { ServerAuth } from "@/server/auth" export const AttachCommand = cmd({ command: "attach ", - describe: "attach to a running opencode server", + describe: "attach to a running DCode server", builder: (yargs) => yargs .positional("url", { diff --git a/packages/opencode/src/cli/cmd/debug/index.ts b/packages/opencode/src/cli/cmd/debug/index.ts index 9dcaa33b3646..d59329786957 100644 --- a/packages/opencode/src/cli/cmd/debug/index.ts +++ b/packages/opencode/src/cli/cmd/debug/index.ts @@ -58,7 +58,7 @@ const InfoCommand = effectCmd({ : undefined const terminal = [termProgram, process.env.TERM].filter((item): item is string => Boolean(item)).join(" / ") - console.log(`opencode version: ${InstallationVersion}`) + console.log(`dcode version: ${InstallationVersion}`) console.log(`os: ${os.type()} ${os.release()} ${os.arch()}`) console.log(`terminal: ${terminal || "unknown"}`) console.log("plugins:") diff --git a/packages/opencode/src/cli/cmd/mcp.ts b/packages/opencode/src/cli/cmd/mcp.ts index c2d2ee2f3b73..2ca627a870f6 100644 --- a/packages/opencode/src/cli/cmd/mcp.ts +++ b/packages/opencode/src/cli/cmd/mcp.ts @@ -119,7 +119,7 @@ export const McpListCommand = effectCmd({ if (servers.length === 0) { prompts.log.warn("No MCP servers configured") - prompts.outro("Add servers with: opencode mcp add") + prompts.outro("Add servers with: dcode mcp add") return } @@ -559,7 +559,7 @@ export const McpAddCommand = effectCmd({ if (type === "local") { const command = await prompts.text({ message: "Enter command to run", - placeholder: "e.g., opencode x @modelcontextprotocol/server-filesystem", + placeholder: "e.g., dcode x @modelcontextprotocol/server-filesystem", validate: (x) => (x && x.length > 0 ? undefined : "Required"), }) if (prompts.isCancel(command)) throw new UI.CancelledError() diff --git a/packages/opencode/src/cli/cmd/pr.ts b/packages/opencode/src/cli/cmd/pr.ts index 420972235746..d0b8c0b4a8d1 100644 --- a/packages/opencode/src/cli/cmd/pr.ts +++ b/packages/opencode/src/cli/cmd/pr.ts @@ -7,7 +7,7 @@ import { Process } from "@/util/process" export const PrCommand = effectCmd({ command: "pr ", - describe: "fetch and checkout a GitHub PR branch, then run opencode", + describe: "fetch and checkout a GitHub PR branch, then run DCode", builder: (yargs) => yargs.positional("number", { type: "number", @@ -76,11 +76,11 @@ export const PrCommand = effectCmd({ const sessionMatch = prInfo.body.match(/https:\/\/opncd\.ai\/s\/([a-zA-Z0-9_-]+)/) if (sessionMatch) { const sessionUrl = sessionMatch[0] - UI.println(`Found opencode session: ${sessionUrl}`) + UI.println(`Found OpenCode-hosted session: ${sessionUrl}`) UI.println(`Importing session...`) const importResult = yield* Effect.promise(() => - Process.text(["opencode", "import", sessionUrl], { nothrow: true }), + Process.text([process.execPath, "import", sessionUrl], { nothrow: true }), ) if (importResult.code === 0) { const sessionIdMatch = importResult.text.trim().match(/Imported session: ([a-zA-Z0-9_-]+)/) @@ -95,13 +95,13 @@ export const PrCommand = effectCmd({ UI.println(`Successfully checked out PR #${prNumber} as branch '${localBranchName}'`) UI.println() - UI.println("Starting opencode...") + UI.println("Starting DCode...") UI.println() - const opencodeArgs = sessionId ? ["-s", sessionId] : [] + const dcodeArgs = sessionId ? ["-s", sessionId] : [] const code = yield* Effect.promise( () => - Process.spawn(["opencode", ...opencodeArgs], { + Process.spawn([process.execPath, ...dcodeArgs], { stdin: "inherit", stdout: "inherit", stderr: "inherit", @@ -110,6 +110,6 @@ export const PrCommand = effectCmd({ ) // Match legacy throw semantics — propagate as a defect so the top-level // index.ts catch handles it identically (exit 1, "Unexpected error" banner). - if (code !== 0) return yield* Effect.die(new Error(`opencode exited with code ${code}`)) + if (code !== 0) return yield* Effect.die(new Error(`DCode exited with code ${code}`)) }), }) diff --git a/packages/opencode/src/cli/cmd/providers.ts b/packages/opencode/src/cli/cmd/providers.ts index 3775123d83bd..884cd79c0353 100644 --- a/packages/opencode/src/cli/cmd/providers.ts +++ b/packages/opencode/src/cli/cmd/providers.ts @@ -304,7 +304,7 @@ export const ProvidersLoginCommand = effectCmd({ builder: (yargs: Argv) => yargs .positional("url", { - describe: "opencode auth provider", + describe: "DCode auth provider", type: "string", }) .option("provider", { diff --git a/packages/opencode/src/cli/cmd/run.ts b/packages/opencode/src/cli/cmd/run.ts index 3927f615a080..f8cf885d0bd7 100644 --- a/packages/opencode/src/cli/cmd/run.ts +++ b/packages/opencode/src/cli/cmd/run.ts @@ -125,7 +125,7 @@ async function toolError(part: ToolPart) { export const RunCommand = effectCmd({ command: "run [message..]", - describe: "run opencode with a message", + describe: "run DCode with a message", // --attach connects to a remote server (no local instance needed); the // default path runs an in-process server and needs the project instance. instance: (args) => !args.attach, @@ -189,7 +189,7 @@ export const RunCommand = effectCmd({ }) .option("attach", { type: "string", - describe: "attach to a running opencode server (e.g., http://localhost:4096)", + describe: "attach to a running DCode server (e.g., http://localhost:4096)", }) .option("password", { alias: ["p"], diff --git a/packages/opencode/src/cli/cmd/run/permission.shared.ts b/packages/opencode/src/cli/cmd/run/permission.shared.ts index 6ebdbd090c21..72f7a368a9d6 100644 --- a/packages/opencode/src/cli/cmd/run/permission.shared.ts +++ b/packages/opencode/src/cli/cmd/run/permission.shared.ts @@ -125,11 +125,11 @@ export function permissionInfo(request: PermissionRequest): PermissionInfo { export function permissionAlwaysLines(request: PermissionRequest): string[] { if (request.always.length === 1 && request.always[0] === "*") { - return [`This will allow ${request.permission} until OpenCode is restarted.`] + return [`This will allow ${request.permission} until DCode is restarted.`] } return [ - "This will allow the following patterns until OpenCode is restarted.", + "This will allow the following patterns until DCode is restarted.", ...request.always.map((item) => `- ${item}`), ] } diff --git a/packages/opencode/src/cli/cmd/run/splash.ts b/packages/opencode/src/cli/cmd/run/splash.ts index 141ff6fc5537..70f7ae22b46e 100644 --- a/packages/opencode/src/cli/cmd/run/splash.ts +++ b/packages/opencode/src/cli/cmd/run/splash.ts @@ -194,7 +194,7 @@ function build(input: SplashWriterInput, kind: "entry" | "exit", ctx: Scrollback }) } - push(lines, body_left, top, "OpenCode", right, undefined, TextAttributes.BOLD) + push(lines, body_left, top, "DCode", right, undefined, TextAttributes.BOLD) if (input.detail) { push( lines, diff --git a/packages/opencode/src/cli/cmd/serve.ts b/packages/opencode/src/cli/cmd/serve.ts index c0f62b3ca071..4488fc13f8c1 100644 --- a/packages/opencode/src/cli/cmd/serve.ts +++ b/packages/opencode/src/cli/cmd/serve.ts @@ -6,7 +6,7 @@ import { Flag } from "@opencode-ai/core/flag/flag" export const ServeCommand = effectCmd({ command: "serve", builder: (yargs) => withNetworkOptions(yargs), - describe: "starts a headless opencode server", + describe: "starts a headless DCode server", // Server loads instances per-request via x-opencode-directory header — no // need for an ambient project InstanceContext at startup. instance: false, diff --git a/packages/opencode/src/cli/cmd/tui.ts b/packages/opencode/src/cli/cmd/tui.ts index 95ffac7ea51d..a2ca62e075e7 100644 --- a/packages/opencode/src/cli/cmd/tui.ts +++ b/packages/opencode/src/cli/cmd/tui.ts @@ -71,12 +71,12 @@ export function resolveThreadDirectory(project?: string, envPWD = process.env.PW export const TuiThreadCommand = cmd({ command: "$0 [project]", - describe: "start opencode tui", + describe: "start DCode TUI", builder: (yargs) => withNetworkOptions(yargs) .positional("project", { type: "string", - describe: "path to start opencode in", + describe: "path to start DCode in", }) .option("model", { type: "string", diff --git a/packages/opencode/src/cli/cmd/web.ts b/packages/opencode/src/cli/cmd/web.ts index 69a981aada49..9907550f4c8b 100644 --- a/packages/opencode/src/cli/cmd/web.ts +++ b/packages/opencode/src/cli/cmd/web.ts @@ -31,7 +31,7 @@ function getNetworkIPs() { export const WebCommand = effectCmd({ command: "web", builder: (yargs) => withNetworkOptions(yargs), - describe: "start opencode server and open web interface", + describe: "start DCode server and open web interface", // Server loads instances per-request via x-opencode-directory header — no // ambient project InstanceContext needed at startup. instance: false, diff --git a/packages/opencode/src/cli/error.ts b/packages/opencode/src/cli/error.ts index 407547e4e5a3..2ae009f5ba37 100644 --- a/packages/opencode/src/cli/error.ts +++ b/packages/opencode/src/cli/error.ts @@ -47,7 +47,7 @@ export function FormatError(input: unknown): string | undefined { // MCPFailed: { name: string } if (NamedError.hasName(input, "MCPFailed")) { const data = isRecord(input) && isRecord(input.data) ? stringField(input.data, "name") : undefined - return `MCP server "${data}" failed. Note, opencode does not support MCP authentication yet.` + return `MCP server "${data}" failed.` } // AccountServiceError, AccountTransportError: TaggedErrorClass @@ -64,7 +64,7 @@ export function FormatError(input: unknown): string | undefined { return [ `Model not found: ${stringField(providerModelNotFound, "providerID")}/${stringField(providerModelNotFound, "modelID")}`, ...(suggestions.length ? ["Did you mean: " + suggestions.join(", ")] : []), - `Try: \`opencode models\` to list available models`, + `Try: \`dcode models\` to list available models`, `Or check your config (opencode.json) provider/model names`, ].join("\n") } @@ -102,7 +102,7 @@ export function FormatError(input: unknown): string | undefined { return [ `Failed to load remote config${remote ? ` from ${remote}` : ""}: the server returned a login page instead of JSON.`, `Authentication is missing or has expired (the endpoint is likely behind an SSO or identity-aware proxy).`, - ...(url ? [`Run \`opencode auth login ${url}\` to re-authenticate.`] : []), + ...(url ? [`Run \`dcode auth login ${url}\` to re-authenticate.`] : []), ].join("\n") } diff --git a/packages/opencode/src/mcp/index.ts b/packages/opencode/src/mcp/index.ts index 05f12fa2ee45..64e0f3fd7011 100644 --- a/packages/opencode/src/mcp/index.ts +++ b/packages/opencode/src/mcp/index.ts @@ -314,7 +314,7 @@ const layer = Layer.effect( return events .publish(TuiEvent.ToastShow, { title: "MCP Authentication Required", - message: `Server "${key}" requires authentication. Run: opencode mcp auth ${key}`, + message: `Server "${key}" requires authentication. Run: dcode mcp auth ${key}`, variant: "warning", duration: 8000, }) diff --git a/packages/opencode/src/plugin/digitalocean.ts b/packages/opencode/src/plugin/digitalocean.ts index af241781e61b..cffbedd50514 100644 --- a/packages/opencode/src/plugin/digitalocean.ts +++ b/packages/opencode/src/plugin/digitalocean.ts @@ -283,7 +283,7 @@ export async function DigitalOceanAuthPlugin(input: PluginInput): Promise return { url, instructions: - "Sign in to DigitalOcean in your browser. OpenCode will use your DigitalOcean API token directly for inference and load your Inference Routers. Re-run /connect to refresh routers later.", + "Sign in to DigitalOcean in your browser. DCode will use your DigitalOcean API token directly for inference and load your Inference Routers. Re-run /connect to refresh routers later.", method: "auto" as const, async callback() { try { diff --git a/packages/opencode/src/plugin/snowflake-cortex.ts b/packages/opencode/src/plugin/snowflake-cortex.ts index 09f107ed7b96..c002864f7f17 100644 --- a/packages/opencode/src/plugin/snowflake-cortex.ts +++ b/packages/opencode/src/plugin/snowflake-cortex.ts @@ -475,7 +475,7 @@ export async function SnowflakeCortexAuthPlugin(_input: PluginInput): Promise` to re-authenticate." + return "Unauthorized: request was blocked by a gateway or proxy. Your authentication token may be missing or expired — try running `dcode auth login ` to re-authenticate." } if (e.statusCode === 403) { return "Forbidden: request was blocked by a gateway or proxy. You may not have permission to access this resource — check your account and provider settings." diff --git a/packages/opencode/src/provider/provider.ts b/packages/opencode/src/provider/provider.ts index c0a222d649bb..3540adaa020a 100644 --- a/packages/opencode/src/provider/provider.ts +++ b/packages/opencode/src/provider/provider.ts @@ -794,7 +794,7 @@ function custom(dep: CustomDep): Record { if (!apiToken) { throw new Error( "CLOUDFLARE_API_TOKEN (or CF_AIG_TOKEN) is required for Cloudflare AI Gateway. " + - "Set it via environment variable or run `opencode auth cloudflare-ai-gateway`.", + "Set it via environment variable or run `dcode auth cloudflare-ai-gateway`.", ) } @@ -880,7 +880,7 @@ function custom(dep: CustomDep): Record { autoload: false, async getModel() { throw new Error( - `Snowflake Cortex: missing credentials (${missing}). Provide a bearer token (OAuth, JWT, or PAT) via env var, opencode auth, or provider options.`, + `Snowflake Cortex: missing credentials (${missing}). Provide a bearer token (OAuth, JWT, or PAT) via env var, dcode auth, or provider options.`, ) }, } diff --git a/packages/opencode/test/cli/acp/initialize-auth.test.ts b/packages/opencode/test/cli/acp/initialize-auth.test.ts index 709c27f3a319..a42efd707ec7 100644 --- a/packages/opencode/test/cli/acp/initialize-auth.test.ts +++ b/packages/opencode/test/cli/acp/initialize-auth.test.ts @@ -21,7 +21,7 @@ describe("opencode acp initialize/auth subprocess", () => { expect(initialized.agentCapabilities?.sessionCapabilities?.fork).toEqual({}) expect(initialized.agentCapabilities?.sessionCapabilities?.list).toEqual({}) expect(initialized.agentCapabilities?.sessionCapabilities?.resume).toEqual({}) - expect(initialized.agentInfo?.name).toBe("OpenCode") + expect(initialized.agentInfo?.name).toBe("DCode") }), 60_000, ) diff --git a/packages/opencode/test/cli/help/__snapshots__/help-snapshots.test.ts.snap b/packages/opencode/test/cli/help/__snapshots__/help-snapshots.test.ts.snap index e9d3ad233807..6962df27aefb 100644 --- a/packages/opencode/test/cli/help/__snapshots__/help-snapshots.test.ts.snap +++ b/packages/opencode/test/cli/help/__snapshots__/help-snapshots.test.ts.snap @@ -1,7 +1,7 @@ // Bun Snapshot v1, https://bun.sh/docs/test/snapshots -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode acp --help 1`] = ` -"opencode acp +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode acp --help 1`] = ` +"dcode acp start ACP (Agent Client Protocol) server @@ -21,17 +21,17 @@ Options: --cwd working directory [string] [default: ""]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode mcp --help 1`] = ` -"opencode mcp +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode mcp --help 1`] = ` +"dcode mcp manage MCP (Model Context Protocol) servers Commands: - opencode mcp add [name] add an MCP server - opencode mcp list list MCP servers and their status [aliases: ls] - opencode mcp auth [name] authenticate with an OAuth-enabled MCP server - opencode mcp logout [name] remove OAuth credentials for an MCP server - opencode mcp debug debug OAuth connection for an MCP server + dcode mcp add [name] add an MCP server + dcode mcp list list MCP servers and their status [aliases: ls] + dcode mcp auth [name] authenticate with an OAuth-enabled MCP server + dcode mcp logout [name] remove OAuth credentials for an MCP server + dcode mcp debug debug OAuth connection for an MCP server Options: -h, --help show help [boolean] @@ -41,10 +41,10 @@ Options: --pure run without external plugins [boolean]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode attach --help 1`] = ` -"opencode attach +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode attach --help 1`] = ` +"dcode attach -attach to a running opencode server +attach to a running DCode server Positionals: url http://localhost:4096 [string] [required] @@ -67,10 +67,10 @@ Options: --replay-limit cap visible mini replay to the newest N messages [number]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode run --help 1`] = ` -"opencode run [message..] +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode run --help 1`] = ` +"dcode run [message..] -run opencode with a message +run DCode with a message Positionals: message message to send [array] [default: []] @@ -92,7 +92,7 @@ Options: [string] [choices: "default", "json"] [default: "default"] -f, --file file(s) to attach to message [array] --title title for the session (uses truncated prompt if no value provided) [string] - --attach attach to a running opencode server (e.g., http://localhost:4096) [string] + --attach attach to a running DCode server (e.g., http://localhost:4096) [string] -p, --password basic auth password (defaults to OPENCODE_SERVER_PASSWORD) [string] -u, --username basic auth username (defaults to OPENCODE_SERVER_USERNAME or 'opencode') [string] @@ -107,25 +107,25 @@ Options: [boolean] [default: false]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode debug --help 1`] = ` -"opencode debug +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode debug --help 1`] = ` +"dcode debug debugging and troubleshooting tools Commands: - opencode debug config show resolved configuration - opencode debug lsp LSP debugging utilities - opencode debug rg ripgrep debugging utilities - opencode debug file file system debugging utilities - opencode debug scrap list all known projects - opencode debug skill list all available skills - opencode debug snapshot snapshot debugging utilities - opencode debug startup print startup timing - opencode debug agent show agent configuration details - opencode debug v2 debug v2 catalog and built-in plugins - opencode debug info show debug information - opencode debug paths show global paths (data, config, cache, state) - opencode debug wait wait indefinitely (for debugging) + dcode debug config show resolved configuration + dcode debug lsp LSP debugging utilities + dcode debug rg ripgrep debugging utilities + dcode debug file file system debugging utilities + dcode debug scrap list all known projects + dcode debug skill list all available skills + dcode debug snapshot snapshot debugging utilities + dcode debug startup print startup timing + dcode debug agent show agent configuration details + dcode debug v2 debug v2 catalog and built-in plugins + dcode debug info show debug information + dcode debug paths show global paths (data, config, cache, state) + dcode debug wait wait indefinitely (for debugging) Options: -h, --help show help [boolean] @@ -135,15 +135,15 @@ Options: --pure run without external plugins [boolean]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode providers --help 1`] = ` -"opencode providers +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode providers --help 1`] = ` +"dcode providers manage AI providers and credentials Commands: - opencode providers list list providers and credentials [aliases: ls] - opencode providers login [url] log in to a provider - opencode providers logout [provider] log out from a configured provider + dcode providers list list providers and credentials [aliases: ls] + dcode providers login [url] log in to a provider + dcode providers logout [provider] log out from a configured provider Options: -h, --help show help [boolean] @@ -153,14 +153,14 @@ Options: --pure run without external plugins [boolean]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode agent --help 1`] = ` -"opencode agent +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode agent --help 1`] = ` +"dcode agent manage agents Commands: - opencode agent create create a new agent - opencode agent list list all available agents + dcode agent create create a new agent + dcode agent list list all available agents Options: -h, --help show help [boolean] @@ -170,10 +170,10 @@ Options: --pure run without external plugins [boolean]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode upgrade --help 1`] = ` -"opencode upgrade [target] +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode upgrade --help 1`] = ` +"dcode upgrade [target] -upgrade opencode to the latest or a specific version +upgrade DCode to the latest or a specific version Positionals: target version to upgrade to, for ex '0.1.48' or 'v0.1.48' [string] @@ -184,14 +184,13 @@ Options: --print-logs print logs to stderr [boolean] --log-level log level [string] [choices: "DEBUG", "INFO", "WARN", "ERROR"] --pure run without external plugins [boolean] - -m, --method installation method to use - [string] [choices: "curl", "npm", "pnpm", "bun", "brew", "choco", "scoop"]" + -m, --method installation method to use [string] [choices: "curl"]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode uninstall --help 1`] = ` -"opencode uninstall +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode uninstall --help 1`] = ` +"dcode uninstall -uninstall opencode and remove all related files +uninstall DCode Options: -h, --help show help [boolean] @@ -199,16 +198,16 @@ Options: --print-logs print logs to stderr [boolean] --log-level log level [string] [choices: "DEBUG", "INFO", "WARN", "ERROR"] --pure run without external plugins [boolean] - -c, --keep-config keep configuration files [boolean] [default: false] - -d, --keep-data keep session data and snapshots [boolean] [default: false] + -c, --keep-config keep configuration files [boolean] [default: true] + -d, --keep-data keep session data and snapshots [boolean] [default: true] --dry-run show what would be removed without removing [boolean] [default: false] -f, --force skip confirmation prompts [boolean] [default: false]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode serve --help 1`] = ` -"opencode serve +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode serve --help 1`] = ` +"dcode serve -starts a headless opencode server +starts a headless DCode server Options: -h, --help show help [boolean] @@ -225,10 +224,10 @@ Options: --cors additional domains to allow for CORS [array] [default: []]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode web --help 1`] = ` -"opencode web +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode web --help 1`] = ` +"dcode web -start opencode server and open web interface +start DCode server and open web interface Options: -h, --help show help [boolean] @@ -245,8 +244,8 @@ Options: --cors additional domains to allow for CORS [array] [default: []]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode models --help 1`] = ` -"opencode models [provider] +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode models --help 1`] = ` +"dcode models [provider] list all available models @@ -263,8 +262,8 @@ Options: --refresh refresh the models cache from models.dev [boolean]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode stats --help 1`] = ` -"opencode stats +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode stats --help 1`] = ` +"dcode stats show token usage and cost statistics @@ -281,8 +280,8 @@ Options: --project filter by project (default: all projects, empty string: current project)[string]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode export --help 1`] = ` -"opencode export [sessionID] +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode export --help 1`] = ` +"dcode export [sessionID] export session data as JSON @@ -298,8 +297,8 @@ Options: --sanitize redact sensitive transcript and file data [boolean]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode import --help 1`] = ` -"opencode import +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode import --help 1`] = ` +"dcode import import session data from JSON file or URL @@ -314,14 +313,14 @@ Options: --pure run without external plugins [boolean]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode github --help 1`] = ` -"opencode github +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode github --help 1`] = ` +"dcode github manage GitHub agent Commands: - opencode github install install the GitHub agent - opencode github run run the GitHub agent + dcode github install install the GitHub agent + dcode github run run the GitHub agent Options: -h, --help show help [boolean] @@ -331,10 +330,10 @@ Options: --pure run without external plugins [boolean]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode pr --help 1`] = ` -"opencode pr +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode pr --help 1`] = ` +"dcode pr -fetch and checkout a GitHub PR branch, then run opencode +fetch and checkout a GitHub PR branch, then run DCode Positionals: number PR number to checkout [number] [required] @@ -347,14 +346,14 @@ Options: --pure run without external plugins [boolean]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode session --help 1`] = ` -"opencode session +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode session --help 1`] = ` +"dcode session manage sessions Commands: - opencode session list list sessions - opencode session delete delete a session + dcode session list list sessions + dcode session delete delete a session Options: -h, --help show help [boolean] @@ -364,8 +363,8 @@ Options: --pure run without external plugins [boolean]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode plugin --help 1`] = ` -"opencode plugin +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode plugin --help 1`] = ` +"dcode plugin install plugin and update config @@ -382,14 +381,14 @@ Options: -f, --force replace existing plugin version [boolean] [default: false]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode db --help 1`] = ` -"opencode db +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode db --help 1`] = ` +"dcode db database tools Commands: - opencode db [query] open an interactive sqlite3 shell or run a query [default] - opencode db path print the database path + dcode db [query] open an interactive sqlite3 shell or run a query [default] + dcode db path print the database path Positionals: query SQL query to execute [string] @@ -403,8 +402,8 @@ Options: --format Output format [string] [choices: "json", "tsv"] [default: "tsv"]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode mcp list --help 1`] = ` -"opencode mcp list +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode mcp list --help 1`] = ` +"dcode mcp list list MCP servers and their status @@ -416,8 +415,8 @@ Options: --pure run without external plugins [boolean]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode mcp add --help 1`] = ` -"opencode mcp add [name] +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode mcp add --help 1`] = ` +"dcode mcp add [name] add an MCP server @@ -435,13 +434,13 @@ Options: --header HTTP header for a remote MCP server (KEY=VALUE) [array]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode mcp auth --help 1`] = ` -"opencode mcp auth [name] +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode mcp auth --help 1`] = ` +"dcode mcp auth [name] authenticate with an OAuth-enabled MCP server Commands: - opencode mcp auth list list OAuth-capable MCP servers and their auth status [aliases: ls] + dcode mcp auth list list OAuth-capable MCP servers and their auth status [aliases: ls] Positionals: name name of the MCP server [string] @@ -454,8 +453,8 @@ Options: --pure run without external plugins [boolean]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode mcp logout --help 1`] = ` -"opencode mcp logout [name] +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode mcp logout --help 1`] = ` +"dcode mcp logout [name] remove OAuth credentials for an MCP server @@ -470,8 +469,8 @@ Options: --pure run without external plugins [boolean]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode providers list --help 1`] = ` -"opencode providers list +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode providers list --help 1`] = ` +"dcode providers list list providers and credentials @@ -483,13 +482,13 @@ Options: --pure run without external plugins [boolean]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode providers login --help 1`] = ` -"opencode providers login [url] +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode providers login --help 1`] = ` +"dcode providers login [url] log in to a provider Positionals: - url opencode auth provider [string] + url DCode auth provider [string] Options: -h, --help show help [boolean] @@ -501,8 +500,8 @@ Options: -m, --method login method label (skips method selection) [string]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode providers logout --help 1`] = ` -"opencode providers logout [provider] +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode providers logout --help 1`] = ` +"dcode providers logout [provider] log out from a configured provider @@ -517,8 +516,8 @@ Options: --pure run without external plugins [boolean]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode agent create --help 1`] = ` -"opencode agent create +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode agent create --help 1`] = ` +"dcode agent create create a new agent @@ -537,8 +536,8 @@ Options: -m, --model model to use in the format of provider/model [string]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode agent list --help 1`] = ` -"opencode agent list +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode agent list --help 1`] = ` +"dcode agent list list all available agents @@ -550,8 +549,8 @@ Options: --pure run without external plugins [boolean]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode session list --help 1`] = ` -"opencode session list +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode session list --help 1`] = ` +"dcode session list list sessions @@ -565,8 +564,8 @@ Options: --format output format [string] [choices: "table", "json"] [default: "table"]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode session delete --help 1`] = ` -"opencode session delete +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode session delete --help 1`] = ` +"dcode session delete delete a session @@ -581,8 +580,8 @@ Options: --pure run without external plugins [boolean]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode github install --help 1`] = ` -"opencode github install +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode github install --help 1`] = ` +"dcode github install install the GitHub agent @@ -594,8 +593,8 @@ Options: --pure run without external plugins [boolean]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode github run --help 1`] = ` -"opencode github run +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode github run --help 1`] = ` +"dcode github run run the GitHub agent @@ -609,8 +608,8 @@ Options: --token GitHub personal access token (github_pat_********) [string]" `; -exports[`opencode CLI help-text snapshots every documented command emits stable help text: opencode db path --help 1`] = ` -"opencode db path +exports[`dcode CLI help-text snapshots every documented command emits stable help text: dcode db path --help 1`] = ` +"dcode db path print the database path diff --git a/packages/opencode/test/cli/help/help-snapshots.test.ts b/packages/opencode/test/cli/help/help-snapshots.test.ts index 3a14d0d7ecc7..b982481e8aa0 100644 --- a/packages/opencode/test/cli/help/help-snapshots.test.ts +++ b/packages/opencode/test/cli/help/help-snapshots.test.ts @@ -90,7 +90,7 @@ const SUBCOMMANDS = [ // different wraps from a 200-col local terminal. const SNAPSHOT_ENV = { COLUMNS: "120" } -describe("opencode CLI help-text snapshots", () => { +describe("dcode CLI help-text snapshots", () => { // Single test, parallel spawns. Each command's help fires under // `concurrency: 8` — wall-clock stays under ~10s even for ~35 commands, // versus ~1 minute if we serialized. @@ -129,7 +129,7 @@ describe("opencode CLI help-text snapshots", () => { // yargs writes --help to stderr, not stdout. Snapshotting stderr // means our test catches the help body; stdout for these commands // is expected to be empty. - expect(normalize(result.stderr)).toMatchSnapshot(`opencode ${argv.join(" ")} --help`) + expect(normalize(result.stderr)).toMatchSnapshot(`dcode ${argv.join(" ")} --help`) } if (failures.length > 0) { throw new Error(`Help text failed for:\n ${failures.join("\n ")}`) diff --git a/packages/tui/src/app.tsx b/packages/tui/src/app.tsx index 57f372ef709a..d370a076ce73 100644 --- a/packages/tui/src/app.tsx +++ b/packages/tui/src/app.tsx @@ -454,24 +454,24 @@ function App(props: { onSnapshot?: () => Promise; pluginHost: TuiPlugi if (!terminalTitleEnabled() || Flag.OPENCODE_DISABLE_TERMINAL_TITLE) return if (route.data.type === "home") { - renderer.setTerminalTitle("OpenCode") + renderer.setTerminalTitle("DCode") return } if (route.data.type === "session") { const session = sync.session.get(route.data.sessionID) if (!session || isDefaultTitle(session.title)) { - renderer.setTerminalTitle("OpenCode") + renderer.setTerminalTitle("DCode") return } const title = session.title.length > 40 ? session.title.slice(0, 37) + "..." : session.title - renderer.setTerminalTitle(`OC | ${title}`) + renderer.setTerminalTitle(`DC | ${title}`) return } if (route.data.type === "plugin") { - renderer.setTerminalTitle(`OC | ${route.data.id}`) + renderer.setTerminalTitle(`DC | ${route.data.id}`) } }) @@ -1070,7 +1070,7 @@ function App(props: { onSnapshot?: () => Promise; pluginHost: TuiPlugi await DialogAlert.show( dialog, "Update Complete", - `Successfully updated to OpenCode v${result.data.version}. Please restart the application.`, + `Successfully updated to DCode v${result.data.version}. Please restart the application.`, ) void exit() diff --git a/packages/tui/src/attention.ts b/packages/tui/src/attention.ts index b309edcd9dd9..9a41dfa481c9 100644 --- a/packages/tui/src/attention.ts +++ b/packages/tui/src/attention.ts @@ -38,14 +38,14 @@ type TuiAttentionHost = TuiAttention & { dispose(): void } -const DEFAULT_TITLE = "opencode" +const DEFAULT_TITLE = "DCode" const DEFAULT_PACK_ID = "opencode.default" const KV_SOUND_PACK = "attention_sound_pack" const TITLE_LIMIT = 80 const MESSAGE_LIMIT = 240 const BUILTIN_PACK: RegisteredSoundPack = { id: DEFAULT_PACK_ID, - name: "OpenCode Default", + name: "DCode Default", builtin: true, sounds: { default: defaultSoundPath, diff --git a/packages/tui/src/component/dialog-status.tsx b/packages/tui/src/component/dialog-status.tsx index 6c8fabdbb3a3..fda69f9ed83b 100644 --- a/packages/tui/src/component/dialog-status.tsx +++ b/packages/tui/src/component/dialog-status.tsx @@ -80,7 +80,7 @@ export function DialogStatus() { {(val) => val().error} Disabled in configuration - Needs authentication (run: opencode mcp auth {key}) + Needs authentication (run: dcode mcp auth {key}) {(val) => (val() as { error: string }).error} diff --git a/packages/tui/src/component/error-component.tsx b/packages/tui/src/component/error-component.tsx index 1141da83822e..2f8d2c18c37b 100644 --- a/packages/tui/src/component/error-component.tsx +++ b/packages/tui/src/component/error-component.tsx @@ -108,7 +108,7 @@ export function ErrorComponent(props: { error: Error; reset: () => void; mode?: {/* Headline */} - opencode crashed + DCode crashed An unexpected error stopped the session. @@ -192,7 +192,7 @@ export function ErrorComponent(props: { error: Error; reset: () => void; mode?: ? "Report copied — paste it into a new GitHub issue." : "Copy the report and open a GitHub issue to help us fix this."} - opencode {InstallationVersion} + DCode {InstallationVersion} @@ -204,14 +204,14 @@ function buildIssueURL(message: string, stack: string) { // Field keys match the ids in .github/ISSUE_TEMPLATE/bug-report.yml so the issue // form opens pre-filled. Populating os/terminal/reproduce keeps the report past // the contributing-guidelines compliance check, which pushes for system info. - const url = new URL("https://github.com/anomalyco/opencode/issues/new?template=bug-report.yml") + const url = new URL("https://github.com/CreatorGhost/TheCode/issues/new?template=bug-report.yml") url.searchParams.set("title", `TUI crash: ${message}`) url.searchParams.set("opencode-version", InstallationVersion) url.searchParams.set("os", describeOS()) url.searchParams.set("terminal", describeTerminal()) url.searchParams.set( "reproduce", - "Reported automatically from the opencode crash screen. If you can, describe what you were doing when it crashed.", + "Reported automatically from the DCode crash screen. If you can, describe what you were doing when it crashed.", ) // Budget the stack against the fully URL-encoded length (not the raw length) so @@ -220,7 +220,7 @@ function buildIssueURL(message: string, stack: string) { // so measuring url.toString() is both correct and safe on any input. const MAX_URL_LENGTH = 6000 const marker = "\n... (truncated)" - const head = `The opencode TUI crashed with an unexpected error.\n\n**Error:** ${message}\n\n**Stack trace:**\n` + const head = `The DCode TUI crashed with an unexpected error.\n\n**Error:** ${message}\n\n**Stack trace:**\n` const setBody = (body: string) => url.searchParams.set("description", head + "```\n" + body + "\n```") setBody(stack) diff --git a/packages/tui/src/feature-plugins/home/tips-view.tsx b/packages/tui/src/feature-plugins/home/tips-view.tsx index d9ef81e40cca..9d58f3c8dd9f 100644 --- a/packages/tui/src/feature-plugins/home/tips-view.tsx +++ b/packages/tui/src/feature-plugins/home/tips-view.tsx @@ -233,20 +233,16 @@ const TIPS: Tip[] = [ "Tool definitions can invoke scripts written in Python, Go, etc", "Add {highlight}.ts{/highlight} files to {highlight}.opencode/plugins/{/highlight} for event hooks", "Use plugins to send OS notifications when sessions complete", - "Create a plugin to prevent OpenCode from reading sensitive files", - "Use {highlight}opencode run{/highlight} for non-interactive scripting", - "Use {highlight}opencode --continue{/highlight} to resume the last session", - "Use {highlight}opencode run -f file.ts{/highlight} to attach files via CLI", + "Create a plugin to prevent DCode from reading sensitive files", + "Use {highlight}dcode run{/highlight} for non-interactive scripting", + "Use {highlight}dcode --continue{/highlight} to resume the last session", + "Use {highlight}dcode run -f file.ts{/highlight} to attach files via CLI", "Use {highlight}--format json{/highlight} for machine-readable output in scripts", - "Run {highlight}opencode serve{/highlight} for headless API access to OpenCode", - "Use {highlight}opencode run --attach{/highlight} to connect to a running server", - "Run {highlight}opencode upgrade{/highlight} to update to the latest version", - "Run {highlight}opencode auth list{/highlight} to see all configured providers", - "Run {highlight}opencode agent create{/highlight} for guided agent creation", - "Use {highlight}/opencode{/highlight} in GitHub issues/PRs to trigger AI actions", - "Run {highlight}opencode github install{/highlight} to set up the GitHub workflow", - "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}dcode serve{/highlight} for headless API access to DCode", + "Use {highlight}dcode run --attach{/highlight} to connect to a running server", + "Run {highlight}dcode upgrade{/highlight} to update to the latest version", + "Run {highlight}dcode auth list{/highlight} to see all configured providers", + "Run {highlight}dcode agent create{/highlight} for guided agent creation", 'Use {highlight}"theme": "system"{/highlight} to match your terminal\'s colors', "Create JSON theme files in {highlight}.opencode/themes/{/highlight} directory", "Themes support dark/light variants for both modes", @@ -264,7 +260,7 @@ const TIPS: Tip[] = [ "Run {highlight}/unshare{/highlight} to remove a session from public access", "Permission {highlight}doom_loop{/highlight} prevents infinite tool call loops", "Permission {highlight}external_directory{/highlight} protects files outside project", - "Run {highlight}opencode debug config{/highlight} to troubleshoot configuration", + "Run {highlight}dcode debug config{/highlight} to troubleshoot configuration", "Use {highlight}--print-logs{/highlight} flag to see detailed logs in stderr", (shortcuts) => `Use ${commandText("/timeline", shortcuts.sessionTimeline())} to jump to specific messages`, (shortcuts) => press(shortcuts.messagesToggleConceal(), "to toggle code block visibility in messages"), @@ -274,7 +270,6 @@ const TIPS: Tip[] = [ shortcuts.commandList() ? `Toggle username display in chat via the command palette (${shortcutText(shortcuts.commandList())})` : "Toggle username display in chat via the command palette", - "Run {highlight}docker run -it --rm ghcr.io/anomalyco/opencode{/highlight} in a container", "Use {highlight}/connect{/highlight} with OpenCode Zen for curated, tested models", "Commit your project's {highlight}AGENTS.md{/highlight} file to Git for team sharing", "Use {highlight}/review{/highlight} to review uncommitted changes, branches, or PRs", diff --git a/packages/tui/src/feature-plugins/sidebar/footer.tsx b/packages/tui/src/feature-plugins/sidebar/footer.tsx index c59046a01722..cad71a2f752f 100644 --- a/packages/tui/src/feature-plugins/sidebar/footer.tsx +++ b/packages/tui/src/feature-plugins/sidebar/footer.tsx @@ -53,7 +53,7 @@ function View(props: { api: TuiPluginApi; sessionID: string }) { ✕ - OpenCode includes free models so you can start immediately. + DCode includes free models so you can start immediately. Connect from 75+ providers to use other models, including Claude, GPT, Gemini etc @@ -69,7 +69,7 @@ function View(props: { api: TuiPluginApi; sessionID: string }) { {path().name} - Open + D Code {" "} diff --git a/packages/tui/src/logo.ts b/packages/tui/src/logo.ts index a58a8cf995f7..aa47986598a2 100644 --- a/packages/tui/src/logo.ts +++ b/packages/tui/src/logo.ts @@ -1,6 +1,6 @@ export const logo = { - left: [" ", "█▀▀█ █▀▀█ █▀▀█ █▀▀▄", "█__█ █__█ █^^^ █__█", "▀▀▀▀ █▀▀▀ ▀▀▀▀ ▀~~▀"], - right: [" ▄ ", "█▀▀▀ █▀▀█ █▀▀█ █▀▀█", "█___ █__█ █__█ █^^^", "▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀"], + left: [" ", "█▀▀▄ ", "█__█ ", "▀▀▀ "], + right: [" ", "█▀▀▀ █▀▀█ █▀▀▄ █▀▀▀", "█___ █__█ █__█ █^^^", "▀▀▀▀ ▀▀▀▀ ▀~~▀ ▀▀▀▀"], } export const go = { diff --git a/packages/tui/src/routes/session/permission.tsx b/packages/tui/src/routes/session/permission.tsx index 766ed3c116ce..19ef2c04b736 100644 --- a/packages/tui/src/routes/session/permission.tsx +++ b/packages/tui/src/routes/session/permission.tsx @@ -141,11 +141,11 @@ export function PermissionPrompt(props: { request: PermissionRequest; directory? body={ - + - This will allow the following patterns until OpenCode is restarted + This will allow the following patterns until DCode is restarted {(pattern) => ( @@ -483,7 +483,7 @@ function RejectPrompt(props: { onConfirm: (message: string) => void; onCancel: ( Reject permission - Tell OpenCode what to do differently + Tell DCode what to do differently { await task expect(stdout).toContain("Demo session") - expect(stdout).toContain("opencode -s dummy") + expect(stdout).toContain("dcode -s dummy") } finally { process.stdout.write = originalWrite if (!setup.renderer.isDestroyed) setup.renderer.destroy() diff --git a/packages/tui/test/util/presentation.test.ts b/packages/tui/test/util/presentation.test.ts index d1aab4ea49b4..8578d2537537 100644 --- a/packages/tui/test/util/presentation.test.ts +++ b/packages/tui/test/util/presentation.test.ts @@ -4,5 +4,5 @@ import { sessionEpilogue } from "../../src/util/presentation" test("formats session continuation summary", () => { const epilogue = sessionEpilogue({ title: "A session", sessionID: "ses_123" }) expect(epilogue).toContain("A session") - expect(epilogue).toContain("opencode -s ses_123") + expect(epilogue).toContain("dcode -s ses_123") }) From 9102a8a69c86e25bf33e0778850c39d31241fdae Mon Sep 17 00:00:00 2001 From: CreatorGhost Date: Sat, 11 Jul 2026 15:12:00 +0530 Subject: [PATCH 5/8] docs: rewrite README for the DCode fork --- README.ar.md | 129 ------------------------------------------ README.bn.md | 129 ------------------------------------------ README.br.md | 129 ------------------------------------------ README.bs.md | 129 ------------------------------------------ README.da.md | 129 ------------------------------------------ README.de.md | 129 ------------------------------------------ README.es.md | 129 ------------------------------------------ README.fr.md | 129 ------------------------------------------ README.gr.md | 129 ------------------------------------------ README.it.md | 129 ------------------------------------------ README.ja.md | 129 ------------------------------------------ README.ko.md | 129 ------------------------------------------ README.md | 153 ++++++++++++++++---------------------------------- README.no.md | 129 ------------------------------------------ README.pl.md | 129 ------------------------------------------ README.ru.md | 129 ------------------------------------------ README.th.md | 129 ------------------------------------------ README.tr.md | 129 ------------------------------------------ README.uk.md | 130 ------------------------------------------ README.vi.md | 129 ------------------------------------------ README.zh.md | 128 ----------------------------------------- README.zht.md | 128 ----------------------------------------- SECURITY.md | 2 +- 23 files changed, 49 insertions(+), 2814 deletions(-) delete mode 100644 README.ar.md delete mode 100644 README.bn.md delete mode 100644 README.br.md delete mode 100644 README.bs.md delete mode 100644 README.da.md delete mode 100644 README.de.md delete mode 100644 README.es.md delete mode 100644 README.fr.md delete mode 100644 README.gr.md delete mode 100644 README.it.md delete mode 100644 README.ja.md delete mode 100644 README.ko.md delete mode 100644 README.no.md delete mode 100644 README.pl.md delete mode 100644 README.ru.md delete mode 100644 README.th.md delete mode 100644 README.tr.md delete mode 100644 README.uk.md delete mode 100644 README.vi.md delete mode 100644 README.zh.md delete mode 100644 README.zht.md diff --git a/README.ar.md b/README.ar.md deleted file mode 100644 index 43618930fe8f..000000000000 --- a/README.ar.md +++ /dev/null @@ -1,129 +0,0 @@ -

- - - - - شعار OpenCode - - -

-

وكيل برمجة بالذكاء الاصطناعي مفتوح المصدر.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### التثبيت - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# مديري الحزم -npm i -g opencode-ai@latest # او bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS و Linux (موصى به، دائما محدث) -brew install opencode # macOS و Linux (صيغة brew الرسمية، تحديث اقل) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # اي نظام -nix run nixpkgs#opencode # او github:anomalyco/opencode لاحدث فرع dev -``` - -> [!TIP] -> احذف الاصدارات الاقدم من 0.1.x قبل التثبيت. - -### تطبيق سطح المكتب (BETA) - -يتوفر OpenCode ايضا كتطبيق سطح مكتب. قم بالتنزيل مباشرة من [صفحة الاصدارات](https://github.com/anomalyco/opencode/releases) او من [opencode.ai/download](https://opencode.ai/download). - -| المنصة | التنزيل | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb` او `.rpm` او AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### مجلد التثبيت - -يحترم سكربت التثبيت ترتيب الاولوية التالي لمسار التثبيت: - -1. `$OPENCODE_INSTALL_DIR` - مجلد تثبيت مخصص -2. `$XDG_BIN_DIR` - مسار متوافق مع مواصفات XDG Base Directory -3. `$HOME/bin` - مجلد الثنائيات القياسي للمستخدم (ان وجد او امكن انشاؤه) -4. `$HOME/.opencode/bin` - المسار الافتراضي الاحتياطي - -```bash -# امثلة -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -يتضمن OpenCode وكيليْن (Agents) مدمجين يمكنك التبديل بينهما باستخدام زر `Tab`. - -- **build** - الافتراضي، وكيل بصلاحيات كاملة لاعمال التطوير -- **plan** - وكيل للقراءة فقط للتحليل واستكشاف الكود - - يرفض تعديل الملفات افتراضيا - - يطلب الاذن قبل تشغيل اوامر bash - - مثالي لاستكشاف قواعد كود غير مألوفة او لتخطيط التغييرات - -بالاضافة الى ذلك يوجد وكيل فرعي **general** للبحث المعقد والمهام متعددة الخطوات. -يستخدم داخليا ويمكن استدعاؤه بكتابة `@general` في الرسائل. - -تعرف على المزيد حول [agents](https://opencode.ai/docs/agents). - -### التوثيق - -لمزيد من المعلومات حول كيفية ضبط OpenCode، [**راجع التوثيق**](https://opencode.ai/docs). - -### المساهمة - -اذا كنت مهتما بالمساهمة في OpenCode، يرجى قراءة [contributing docs](./CONTRIBUTING.md) قبل ارسال pull request. - -### البناء فوق OpenCode - -اذا كنت تعمل على مشروع مرتبط بـ OpenCode ويستخدم "opencode" كجزء من اسمه (مثل "opencode-dashboard" او "opencode-mobile")، يرجى اضافة ملاحظة في README توضح انه ليس مبنيا بواسطة فريق OpenCode ولا يرتبط بنا بأي شكل. - ---- - -**انضم الى مجتمعنا** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.bn.md b/README.bn.md deleted file mode 100644 index ce00a416eee5..000000000000 --- a/README.bn.md +++ /dev/null @@ -1,129 +0,0 @@ -

- - - - - OpenCode logo - - -

-

ওপেন সোর্স এআই কোডিং এজেন্ট।

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### ইনস্টলেশন (Installation) - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Package managers -npm i -g opencode-ai@latest # or bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS and Linux (recommended, always up to date) -brew install opencode # macOS and Linux (official brew formula, updated less) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # Any OS -nix run nixpkgs#opencode # or github:anomalyco/opencode for latest dev branch -``` - -> [!TIP] -> ইনস্টল করার আগে ০.১.x এর চেয়ে পুরোনো ভার্সনগুলো মুছে ফেলুন। - -### ডেস্কটপ অ্যাপ (BETA) - -OpenCode ডেস্কটপ অ্যাপ্লিকেশন হিসেবেও উপলব্ধ। সরাসরি [রিলিজ পেজ](https://github.com/anomalyco/opencode/releases) অথবা [opencode.ai/download](https://opencode.ai/download) থেকে ডাউনলোড করুন। - -| প্ল্যাটফর্ম | ডাউনলোড | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, or `.AppImage` | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### ইনস্টলেশন ডিরেক্টরি (Installation Directory) - -ইনস্টল স্ক্রিপ্টটি ইনস্টলেশন পাতের জন্য নিম্নলিখিত অগ্রাধিকার ক্রম মেনে চলে: - -1. `$OPENCODE_INSTALL_DIR` - কাস্টম ইনস্টলেশন ডিরেক্টরি -2. `$XDG_BIN_DIR` - XDG বেস ডিরেক্টরি স্পেসিফিকেশন সমর্থিত পাথ -3. `$HOME/bin` - সাধারণ ব্যবহারকারী বাইনারি ডিরেক্টরি (যদি বিদ্যমান থাকে বা তৈরি করা যায়) -4. `$HOME/.opencode/bin` - ডিফল্ট ফলব্যাক - -```bash -# উদাহরণ -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### এজেন্টস (Agents) - -OpenCode এ দুটি বিল্ট-ইন এজেন্ট রয়েছে যা আপনি `Tab` কি(key) দিয়ে পরিবর্তন করতে পারবেন। - -- **build** - ডিফল্ট, ডেভেলপমেন্টের কাজের জন্য সম্পূর্ণ অ্যাক্সেসযুক্ত এজেন্ট -- **plan** - বিশ্লেষণ এবং কোড এক্সপ্লোরেশনের জন্য রিড-ওনলি এজেন্ট - - ডিফল্টভাবে ফাইল এডিট করতে দেয় না - - ব্যাশ কমান্ড চালানোর আগে অনুমতি চায় - - অপরিচিত কোডবেস এক্সপ্লোর করা বা পরিবর্তনের পরিকল্পনা করার জন্য আদর্শ - -এছাড়াও জটিল অনুসন্ধান এবং মাল্টিস্টেপ টাস্কের জন্য একটি **general** সাবএজেন্ট অন্তর্ভুক্ত রয়েছে। -এটি অভ্যন্তরীণভাবে ব্যবহৃত হয় এবং মেসেজে `@general` লিখে ব্যবহার করা যেতে পারে। - -এজেন্টদের সম্পর্কে আরও জানুন: [docs](https://opencode.ai/docs/agents)। - -### ডকুমেন্টেশন (Documentation) - -কিভাবে OpenCode কনফিগার করবেন সে সম্পর্কে আরও তথ্যের জন্য, [**আমাদের ডকস দেখুন**](https://opencode.ai/docs)। - -### অবদান (Contributing) - -আপনি যদি OpenCode এ অবদান রাখতে চান, অনুগ্রহ করে একটি পুল রিকোয়েস্ট সাবমিট করার আগে আমাদের [কন্ট্রিবিউটিং ডকস](./CONTRIBUTING.md) পড়ে নিন। - -### OpenCode এর উপর বিল্ডিং (Building on OpenCode) - -আপনি যদি এমন প্রজেক্টে কাজ করেন যা OpenCode এর সাথে সম্পর্কিত এবং প্রজেক্টের নামের অংশ হিসেবে "opencode" ব্যবহার করেন, উদাহরণস্বরূপ "opencode-dashboard" বা "opencode-mobile", তবে দয়া করে আপনার README তে একটি নোট যোগ করে স্পষ্ট করুন যে এই প্রজেক্টটি OpenCode দল দ্বারা তৈরি হয়নি এবং আমাদের সাথে এর কোনো সরাসরি সম্পর্ক নেই। - ---- - -**আমাদের কমিউনিটিতে যুক্ত হোন** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.br.md b/README.br.md deleted file mode 100644 index 976738cfaed2..000000000000 --- a/README.br.md +++ /dev/null @@ -1,129 +0,0 @@ -

- - - - - Logo do OpenCode - - -

-

O agente de programação com IA de código aberto.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Instalação - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Gerenciadores de pacotes -npm i -g opencode-ai@latest # ou bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS e Linux (recomendado, sempre atualizado) -brew install opencode # macOS e Linux (fórmula oficial do brew, atualiza menos) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # qualquer sistema -nix run nixpkgs#opencode # ou github:anomalyco/opencode para a branch dev mais recente -``` - -> [!TIP] -> Remova versões anteriores a 0.1.x antes de instalar. - -### App desktop (BETA) - -O OpenCode também está disponível como aplicativo desktop. Baixe diretamente pela [página de releases](https://github.com/anomalyco/opencode/releases) ou em [opencode.ai/download](https://opencode.ai/download). - -| Plataforma | Download | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm` ou AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Diretório de instalação - -O script de instalação respeita a seguinte ordem de prioridade para o caminho de instalação: - -1. `$OPENCODE_INSTALL_DIR` - Diretório de instalação personalizado -2. `$XDG_BIN_DIR` - Caminho compatível com a especificação XDG Base Directory -3. `$HOME/bin` - Diretório binário padrão do usuário (se existir ou puder ser criado) -4. `$HOME/.opencode/bin` - Fallback padrão - -```bash -# Exemplos -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -O OpenCode inclui dois agents integrados, que você pode alternar com a tecla `Tab`. - -- **build** - Padrão, agent com acesso total para trabalho de desenvolvimento -- **plan** - Agent somente leitura para análise e exploração de código - - Nega edições de arquivos por padrão - - Pede permissão antes de executar comandos bash - - Ideal para explorar codebases desconhecidas ou planejar mudanças - -Também há um subagent **general** para buscas complexas e tarefas em várias etapas. -Ele é usado internamente e pode ser invocado com `@general` nas mensagens. - -Saiba mais sobre [agents](https://opencode.ai/docs/agents). - -### Documentação - -Para mais informações sobre como configurar o OpenCode, [**veja nossa documentação**](https://opencode.ai/docs). - -### Contribuir - -Se você tem interesse em contribuir com o OpenCode, leia os [contributing docs](./CONTRIBUTING.md) antes de enviar um pull request. - -### Construindo com OpenCode - -Se você estiver trabalhando em um projeto relacionado ao OpenCode e estiver usando "opencode" como parte do nome (por exemplo, "opencode-dashboard" ou "opencode-mobile"), adicione uma nota no README para deixar claro que não foi construído pela equipe do OpenCode e não é afiliado a nós de nenhuma forma. - ---- - -**Junte-se à nossa comunidade** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.bs.md b/README.bs.md deleted file mode 100644 index 0adf8ebfa0d4..000000000000 --- a/README.bs.md +++ /dev/null @@ -1,129 +0,0 @@ -

- - - - - OpenCode logo - - -

-

OpenCode je open source AI agent za programiranje.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Instalacija - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Package manageri -npm i -g opencode-ai@latest # ili bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS i Linux (preporučeno, uvijek ažurno) -brew install opencode # macOS i Linux (zvanična brew formula, rjeđe se ažurira) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # Bilo koji OS -nix run nixpkgs#opencode # ili github:anomalyco/opencode za najnoviji dev branch -``` - -> [!TIP] -> Ukloni verzije starije od 0.1.x prije instalacije. - -### Desktop aplikacija (BETA) - -OpenCode je dostupan i kao desktop aplikacija. Preuzmi je direktno sa [stranice izdanja](https://github.com/anomalyco/opencode/releases) ili sa [opencode.ai/download](https://opencode.ai/download). - -| Platforma | Preuzimanje | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, ili AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Instalacijski direktorij - -Instalacijska skripta koristi sljedeći redoslijed prioriteta za putanju instalacije: - -1. `$OPENCODE_INSTALL_DIR` - Prilagođeni instalacijski direktorij -2. `$XDG_BIN_DIR` - Putanja usklađena sa XDG Base Directory specifikacijom -3. `$HOME/bin` - Standardni korisnički bin direktorij (ako postoji ili se može kreirati) -4. `$HOME/.opencode/bin` - Podrazumijevana rezervna lokacija - -```bash -# Primjeri -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agenti - -OpenCode uključuje dva ugrađena agenta između kojih možeš prebacivati tasterom `Tab`. - -- **build** - Podrazumijevani agent sa punim pristupom za razvoj -- **plan** - Agent samo za čitanje za analizu i istraživanje koda - - Podrazumijevano zabranjuje izmjene datoteka - - Traži dozvolu prije pokretanja bash komandi - - Idealan za istraživanje nepoznatih codebase-ova ili planiranje izmjena - -Uključen je i **general** pod-agent za složene pretrage i višekoračne zadatke. -Koristi se interno i može se pozvati pomoću `@general` u porukama. - -Saznaj više o [agentima](https://opencode.ai/docs/agents). - -### Dokumentacija - -Za više informacija o konfiguraciji OpenCode-a, [**pogledaj dokumentaciju**](https://opencode.ai/docs). - -### Doprinosi - -Ako želiš doprinositi OpenCode-u, pročitaj [upute za doprinošenje](./CONTRIBUTING.md) prije slanja pull requesta. - -### Gradnja na OpenCode-u - -Ako radiš na projektu koji je povezan s OpenCode-om i koristi "opencode" kao dio naziva, npr. "opencode-dashboard" ili "opencode-mobile", dodaj napomenu u svoj README da projekat nije napravio OpenCode tim i da nije povezan s nama. - ---- - -**Pridruži se našoj zajednici** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.da.md b/README.da.md deleted file mode 100644 index e8932e0ae1c6..000000000000 --- a/README.da.md +++ /dev/null @@ -1,129 +0,0 @@ -

- - - - - OpenCode logo - - -

-

Den open source AI-kodeagent.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Installation - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Pakkehåndteringer -npm i -g opencode-ai@latest # eller bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS og Linux (anbefalet, altid up to date) -brew install opencode # macOS og Linux (officiel brew formula, opdateres sjældnere) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # alle OS -nix run nixpkgs#opencode # eller github:anomalyco/opencode for nyeste dev-branch -``` - -> [!TIP] -> Fjern versioner ældre end 0.1.x før installation. - -### Desktop-app (BETA) - -OpenCode findes også som desktop-app. Download direkte fra [releases-siden](https://github.com/anomalyco/opencode/releases) eller [opencode.ai/download](https://opencode.ai/download). - -| Platform | Download | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, eller AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Installationsmappe - -Installationsscriptet bruger følgende prioriteringsrækkefølge for installationsstien: - -1. `$OPENCODE_INSTALL_DIR` - Tilpasset installationsmappe -2. `$XDG_BIN_DIR` - Sti der følger XDG Base Directory Specification -3. `$HOME/bin` - Standard bruger-bin-mappe (hvis den findes eller kan oprettes) -4. `$HOME/.opencode/bin` - Standard fallback - -```bash -# Eksempler -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -OpenCode har to indbyggede agents, som du kan skifte mellem med `Tab`-tasten. - -- **build** - Standard, agent med fuld adgang til udviklingsarbejde -- **plan** - Skrivebeskyttet agent til analyse og kodeudforskning - - Afviser filredigering som standard - - Spørger om tilladelse før bash-kommandoer - - Ideel til at udforske ukendte kodebaser eller planlægge ændringer - -Derudover findes der en **general**-subagent til komplekse søgninger og flertrinsopgaver. -Den bruges internt og kan kaldes via `@general` i beskeder. - -Læs mere om [agents](https://opencode.ai/docs/agents). - -### Dokumentation - -For mere info om konfiguration af OpenCode, [**se vores docs**](https://opencode.ai/docs). - -### Bidrag - -Hvis du vil bidrage til OpenCode, så læs vores [contributing docs](./CONTRIBUTING.md) før du sender en pull request. - -### Bygget på OpenCode - -Hvis du arbejder på et projekt der er relateret til OpenCode og bruger "opencode" som en del af navnet; f.eks. "opencode-dashboard" eller "opencode-mobile", så tilføj en note i din README, der tydeliggør at projektet ikke er bygget af OpenCode-teamet og ikke er tilknyttet os på nogen måde. - ---- - -**Bliv en del af vores community** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.de.md b/README.de.md deleted file mode 100644 index 958386ccf367..000000000000 --- a/README.de.md +++ /dev/null @@ -1,129 +0,0 @@ -

- - - - - OpenCode logo - - -

-

Der Open-Source KI-Coding-Agent.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Installation - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Paketmanager -npm i -g opencode-ai@latest # oder bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS und Linux (empfohlen, immer aktuell) -brew install opencode # macOS und Linux (offizielle Brew-Formula, seltener aktualisiert) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # jedes Betriebssystem -nix run nixpkgs#opencode # oder github:anomalyco/opencode für den neuesten dev-Branch -``` - -> [!TIP] -> Entferne Versionen älter als 0.1.x vor der Installation. - -### Desktop-App (BETA) - -OpenCode ist auch als Desktop-Anwendung verfügbar. Lade sie direkt von der [Releases-Seite](https://github.com/anomalyco/opencode/releases) oder [opencode.ai/download](https://opencode.ai/download) herunter. - -| Plattform | Download | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm` oder AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Installationsverzeichnis - -Das Installationsskript beachtet die folgende Prioritätsreihenfolge für den Installationspfad: - -1. `$OPENCODE_INSTALL_DIR` - Benutzerdefiniertes Installationsverzeichnis -2. `$XDG_BIN_DIR` - XDG Base Directory Specification-konformer Pfad -3. `$HOME/bin` - Standard-Binärverzeichnis des Users (falls vorhanden oder erstellbar) -4. `$HOME/.opencode/bin` - Standard-Fallback - -```bash -# Beispiele -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -OpenCode enthält zwei eingebaute Agents, zwischen denen du mit der `Tab`-Taste wechseln kannst. - -- **build** - Standard-Agent mit vollem Zugriff für Entwicklungsarbeit -- **plan** - Nur-Lese-Agent für Analyse und Code-Exploration - - Verweigert Datei-Edits standardmäßig - - Fragt vor dem Ausführen von bash-Befehlen nach - - Ideal zum Erkunden unbekannter Codebases oder zum Planen von Änderungen - -Außerdem ist ein **general**-Subagent für komplexe Suchen und mehrstufige Aufgaben enthalten. -Dieser wird intern genutzt und kann in Nachrichten mit `@general` aufgerufen werden. - -Mehr dazu unter [Agents](https://opencode.ai/docs/agents). - -### Dokumentation - -Mehr Infos zur Konfiguration von OpenCode findest du in unseren [**Docs**](https://opencode.ai/docs). - -### Beitragen - -Wenn du zu OpenCode beitragen möchtest, lies bitte unsere [Contributing Docs](./CONTRIBUTING.md), bevor du einen Pull Request einreichst. - -### Auf OpenCode aufbauen - -Wenn du an einem Projekt arbeitest, das mit OpenCode zusammenhängt und "opencode" als Teil seines Namens verwendet (z.B. "opencode-dashboard" oder "opencode-mobile"), füge bitte einen Hinweis in deine README ein, dass es nicht vom OpenCode-Team gebaut wird und nicht in irgendeiner Weise mit uns verbunden ist. - ---- - -**Tritt unserer Community bei** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.es.md b/README.es.md deleted file mode 100644 index 39540bc5a5bb..000000000000 --- a/README.es.md +++ /dev/null @@ -1,129 +0,0 @@ -

- - - - - OpenCode logo - - -

-

El agente de programación con IA de código abierto.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Instalación - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Gestores de paquetes -npm i -g opencode-ai@latest # o bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS y Linux (recomendado, siempre al día) -brew install opencode # macOS y Linux (fórmula oficial de brew, se actualiza menos) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # cualquier sistema -nix run nixpkgs#opencode # o github:anomalyco/opencode para la rama dev más reciente -``` - -> [!TIP] -> Elimina versiones anteriores a 0.1.x antes de instalar. - -### App de escritorio (BETA) - -OpenCode también está disponible como aplicación de escritorio. Descárgala directamente desde la [página de releases](https://github.com/anomalyco/opencode/releases) o desde [opencode.ai/download](https://opencode.ai/download). - -| Plataforma | Descarga | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, o AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Directorio de instalación - -El script de instalación respeta el siguiente orden de prioridad para la ruta de instalación: - -1. `$OPENCODE_INSTALL_DIR` - Directorio de instalación personalizado -2. `$XDG_BIN_DIR` - Ruta compatible con la especificación XDG Base Directory -3. `$HOME/bin` - Directorio binario estándar del usuario (si existe o se puede crear) -4. `$HOME/.opencode/bin` - Alternativa por defecto - -```bash -# Ejemplos -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agentes - -OpenCode incluye dos agentes integrados que puedes alternar con la tecla `Tab`. - -- **build** - Por defecto, agente con acceso completo para tareas de desarrollo -- **plan** - Agente de solo lectura para análisis y exploración de código - - Deniega ediciones de archivos por defecto - - Pide permiso antes de ejecutar comandos bash - - Ideal para explorar codebases desconocidas o planificar cambios - -Además, incluye un subagente **general** para búsquedas complejas y tareas de varios pasos. -Se usa internamente y se puede invocar con `@general` en los mensajes. - -Más información sobre [agentes](https://opencode.ai/docs/agents). - -### Documentación - -Para más información sobre cómo configurar OpenCode, [**ve a nuestra documentación**](https://opencode.ai/docs). - -### Contribuir - -Si te interesa contribuir a OpenCode, lee nuestras [docs de contribución](./CONTRIBUTING.md) antes de enviar un pull request. - -### Proyectos basados en OpenCode - -Si estás trabajando en un proyecto basado en OpenCode y usas "opencode" como parte del nombre, por ejemplo, "opencode-dashboard" u "opencode-mobile", agrega una nota en tu README para aclarar que no está hecho por el equipo de OpenCode y que no está afiliado con nosotros de ninguna manera. - ---- - -**Únete a nuestra comunidad** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.fr.md b/README.fr.md deleted file mode 100644 index d19c89d3f823..000000000000 --- a/README.fr.md +++ /dev/null @@ -1,129 +0,0 @@ -

- - - - - Logo OpenCode - - -

-

L'agent de codage IA open source.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Installation - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Gestionnaires de paquets -npm i -g opencode-ai@latest # ou bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS et Linux (recommandé, toujours à jour) -brew install opencode # macOS et Linux (formule officielle brew, mise à jour moins fréquente) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # n'importe quel OS -nix run nixpkgs#opencode # ou github:anomalyco/opencode pour la branche dev la plus récente -``` - -> [!TIP] -> Supprimez les versions antérieures à 0.1.x avant d'installer. - -### Application de bureau (BETA) - -OpenCode est aussi disponible en application de bureau. Téléchargez-la directement depuis la [page des releases](https://github.com/anomalyco/opencode/releases) ou [opencode.ai/download](https://opencode.ai/download). - -| Plateforme | Téléchargement | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, ou AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Répertoire d'installation - -Le script d'installation respecte l'ordre de priorité suivant pour le chemin d'installation : - -1. `$OPENCODE_INSTALL_DIR` - Répertoire d'installation personnalisé -2. `$XDG_BIN_DIR` - Chemin conforme à la spécification XDG Base Directory -3. `$HOME/bin` - Répertoire binaire utilisateur standard (s'il existe ou peut être créé) -4. `$HOME/.opencode/bin` - Repli par défaut - -```bash -# Exemples -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -OpenCode inclut deux agents intégrés que vous pouvez basculer avec la touche `Tab`. - -- **build** - Par défaut, agent avec accès complet pour le travail de développement -- **plan** - Agent en lecture seule pour l'analyse et l'exploration du code - - Refuse les modifications de fichiers par défaut - - Demande l'autorisation avant d'exécuter des commandes bash - - Idéal pour explorer une base de code inconnue ou planifier des changements - -Un sous-agent **general** est aussi inclus pour les recherches complexes et les tâches en plusieurs étapes. -Il est utilisé en interne et peut être invoqué via `@general` dans les messages. - -En savoir plus sur les [agents](https://opencode.ai/docs/agents). - -### Documentation - -Pour plus d'informations sur la configuration d'OpenCode, [**consultez notre documentation**](https://opencode.ai/docs). - -### Contribuer - -Si vous souhaitez contribuer à OpenCode, lisez nos [docs de contribution](./CONTRIBUTING.md) avant de soumettre une pull request. - -### Construire avec OpenCode - -Si vous travaillez sur un projet lié à OpenCode et que vous utilisez "opencode" dans le nom du projet (par exemple, "opencode-dashboard" ou "opencode-mobile"), ajoutez une note dans votre README pour préciser qu'il n'est pas construit par l'équipe OpenCode et qu'il n'est pas affilié à nous. - ---- - -**Rejoignez notre communauté** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.gr.md b/README.gr.md deleted file mode 100644 index a8412b35bdac..000000000000 --- a/README.gr.md +++ /dev/null @@ -1,129 +0,0 @@ -

- - - - - OpenCode logo - - -

-

Ο πράκτορας τεχνητής νοημοσύνης ανοικτού κώδικα για προγραμματισμό.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Εγκατάσταση - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Διαχειριστές πακέτων -npm i -g opencode-ai@latest # ή bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS και Linux (προτείνεται, πάντα ενημερωμένο) -brew install opencode # macOS και Linux (επίσημος τύπος brew, λιγότερο συχνές ενημερώσεις) -sudo pacman -S opencode # Arch Linux (Σταθερό) -paru -S opencode-bin # Arch Linux (Τελευταία έκδοση από AUR) -mise use -g opencode # Οποιοδήποτε λειτουργικό σύστημα -nix run nixpkgs#opencode # ή github:anomalyco/opencode με βάση την πιο πρόσφατη αλλαγή από το dev branch -``` - -> [!TIP] -> Αφαίρεσε παλαιότερες εκδόσεις από τη 0.1.x πριν από την εγκατάσταση. - -### Εφαρμογή Desktop (BETA) - -Το OpenCode είναι επίσης διαθέσιμο ως εφαρμογή. Κατέβασε το απευθείας από τη [σελίδα εκδόσεων](https://github.com/anomalyco/opencode/releases) ή το [opencode.ai/download](https://opencode.ai/download). - -| Πλατφόρμα | Λήψη | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, ή AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Κατάλογος Εγκατάστασης - -Το script εγκατάστασης τηρεί την ακόλουθη σειρά προτεραιότητας για τη διαδρομή εγκατάστασης: - -1. `$OPENCODE_INSTALL_DIR` - Προσαρμοσμένος κατάλογος εγκατάστασης -2. `$XDG_BIN_DIR` - Διαδρομή συμβατή με τις προδιαγραφές XDG Base Directory -3. `$HOME/bin` - Τυπικός κατάλογος εκτελέσιμων αρχείων χρήστη (εάν υπάρχει ή μπορεί να δημιουργηθεί) -4. `$HOME/.opencode/bin` - Προεπιλεγμένη εφεδρική διαδρομή - -```bash -# Παραδείγματα -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Πράκτορες - -Το OpenCode περιλαμβάνει δύο ενσωματωμένους πράκτορες μεταξύ των οποίων μπορείτε να εναλλάσσεστε με το πλήκτρο `Tab`. - -- **build** - Προεπιλεγμένος πράκτορας με πλήρη πρόσβαση για εργασία πάνω σε κώδικα -- **plan** - Πράκτορας μόνο ανάγνωσης για ανάλυση και εξερεύνηση κώδικα - - Αρνείται την επεξεργασία αρχείων από προεπιλογή - - Ζητά άδεια πριν εκτελέσει εντολές bash - - Ιδανικός για εξερεύνηση άγνωστων αρχείων πηγαίου κώδικα ή σχεδιασμό αλλαγών - -Περιλαμβάνεται επίσης ένας **general** υποπράκτορας για σύνθετες αναζητήσεις και πολυβηματικές διεργασίες. -Χρησιμοποιείται εσωτερικά και μπορεί να κληθεί χρησιμοποιώντας `@general` στα μηνύματα. - -Μάθετε περισσότερα για τους [πράκτορες](https://opencode.ai/docs/agents). - -### Οδηγός Χρήσης - -Για περισσότερες πληροφορίες σχετικά με τη ρύθμιση του OpenCode, [**πλοηγήσου στον οδηγό χρήσης μας**](https://opencode.ai/docs). - -### Συνεισφορά - -Εάν ενδιαφέρεσαι να συνεισφέρεις στο OpenCode, διαβάστε τα [οδηγό χρήσης συνεισφοράς](./CONTRIBUTING.md) πριν υποβάλεις ένα pull request. - -### Δημιουργία πάνω στο OpenCode - -Εάν εργάζεσαι σε ένα έργο σχετικό με το OpenCode και χρησιμοποιείτε το "opencode" ως μέρος του ονόματός του, για παράδειγμα "opencode-dashboard" ή "opencode-mobile", πρόσθεσε μια σημείωση στο README σας για να διευκρινίσεις ότι δεν είναι κατασκευασμένο από την ομάδα του OpenCode και δεν έχει καμία σχέση με εμάς. - ---- - -**Γίνε μέλος της κοινότητάς μας** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.it.md b/README.it.md deleted file mode 100644 index 2ed4aeb5ec0a..000000000000 --- a/README.it.md +++ /dev/null @@ -1,129 +0,0 @@ -

- - - - - Logo OpenCode - - -

-

L’agente di coding AI open source.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Installazione - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Package manager -npm i -g opencode-ai@latest # oppure bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS e Linux (consigliato, sempre aggiornato) -brew install opencode # macOS e Linux (formula brew ufficiale, aggiornata meno spesso) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # Qualsiasi OS -nix run nixpkgs#opencode # oppure github:anomalyco/opencode per l’ultima branch di sviluppo -``` - -> [!TIP] -> Rimuovi le versioni precedenti alla 0.1.x prima di installare. - -### App Desktop (BETA) - -OpenCode è disponibile anche come applicazione desktop. Puoi scaricarla direttamente dalla [pagina delle release](https://github.com/anomalyco/opencode/releases) oppure da [opencode.ai/download](https://opencode.ai/download). - -| Piattaforma | Download | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, oppure AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Directory di installazione - -Lo script di installazione rispetta il seguente ordine di priorità per il percorso di installazione: - -1. `$OPENCODE_INSTALL_DIR` – Directory di installazione personalizzata -2. `$XDG_BIN_DIR` – Percorso conforme alla XDG Base Directory Specification -3. `$HOME/bin` – Directory binaria standard dell’utente (se esiste o può essere creata) -4. `$HOME/.opencode/bin` – Fallback predefinito - -```bash -# Esempi -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agenti - -OpenCode include due agenti integrati tra cui puoi passare usando il tasto `Tab`. - -- **build** – Predefinito, agente con accesso completo per il lavoro di sviluppo -- **plan** – Agente in sola lettura per analisi ed esplorazione del codice - - Nega le modifiche ai file per impostazione predefinita - - Chiede il permesso prima di eseguire comandi bash - - Ideale per esplorare codebase sconosciute o pianificare modifiche - -È inoltre incluso un sotto-agente **general** per ricerche complesse e attività multi-step. -Viene utilizzato internamente e può essere invocato usando `@general` nei messaggi. - -Scopri di più sugli [agenti](https://opencode.ai/docs/agents). - -### Documentazione - -Per maggiori informazioni su come configurare OpenCode, [**consulta la nostra documentazione**](https://opencode.ai/docs). - -### Contribuire - -Se sei interessato a contribuire a OpenCode, leggi la nostra [guida alla contribuzione](./CONTRIBUTING.md) prima di inviare una pull request. - -### Costruire su OpenCode - -Se stai lavorando a un progetto correlato a OpenCode e che utilizza “opencode” come parte del nome (ad esempio “opencode-dashboard” o “opencode-mobile”), aggiungi una nota nel tuo README per chiarire che non è sviluppato dal team OpenCode e che non è affiliato in alcun modo con noi. - ---- - -**Unisciti alla nostra community** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.ja.md b/README.ja.md deleted file mode 100644 index 75a017fd91cb..000000000000 --- a/README.ja.md +++ /dev/null @@ -1,129 +0,0 @@ -

- - - - - OpenCode logo - - -

-

オープンソースのAIコーディングエージェント。

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### インストール - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# パッケージマネージャー -npm i -g opencode-ai@latest # bun/pnpm/yarn でもOK -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS と Linux(推奨。常に最新) -brew install opencode # macOS と Linux(公式 brew formula。更新頻度は低め) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # どのOSでも -nix run nixpkgs#opencode # または github:anomalyco/opencode で最新 dev ブランチ -``` - -> [!TIP] -> インストール前に 0.1.x より古いバージョンを削除してください。 - -### デスクトップアプリ (BETA) - -OpenCode はデスクトップアプリとしても利用できます。[releases page](https://github.com/anomalyco/opencode/releases) から直接ダウンロードするか、[opencode.ai/download](https://opencode.ai/download) を利用してください。 - -| プラットフォーム | ダウンロード | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`、`.rpm`、または AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### インストールディレクトリ - -インストールスクリプトは、インストール先パスを次の優先順位で決定します。 - -1. `$OPENCODE_INSTALL_DIR` - カスタムのインストールディレクトリ -2. `$XDG_BIN_DIR` - XDG Base Directory Specification に準拠したパス -3. `$HOME/bin` - 標準のユーザー用バイナリディレクトリ(存在する場合、または作成できる場合) -4. `$HOME/.opencode/bin` - デフォルトのフォールバック - -```bash -# 例 -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -OpenCode には組み込みの Agent が2つあり、`Tab` キーで切り替えられます。 - -- **build** - デフォルト。開発向けのフルアクセス Agent -- **plan** - 分析とコード探索向けの読み取り専用 Agent - - デフォルトでファイル編集を拒否 - - bash コマンド実行前に確認 - - 未知のコードベース探索や変更計画に最適 - -また、複雑な検索やマルチステップのタスク向けに **general** サブ Agent も含まれています。 -内部的に使用されており、メッセージで `@general` と入力して呼び出せます。 - -[agents](https://opencode.ai/docs/agents) の詳細はこちら。 - -### ドキュメント - -OpenCode の設定については [**ドキュメント**](https://opencode.ai/docs) を参照してください。 - -### コントリビュート - -OpenCode に貢献したい場合は、Pull Request を送る前に [contributing docs](./CONTRIBUTING.md) を読んでください。 - -### OpenCode の上に構築する - -OpenCode に関連するプロジェクトで、名前に "opencode"(例: "opencode-dashboard" や "opencode-mobile")を含める場合は、そのプロジェクトが OpenCode チームによって作られたものではなく、いかなる形でも関係がないことを README に明記してください。 - ---- - -**コミュニティに参加** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.ko.md b/README.ko.md deleted file mode 100644 index aa21a736433e..000000000000 --- a/README.ko.md +++ /dev/null @@ -1,129 +0,0 @@ -

- - - - - OpenCode logo - - -

-

오픈 소스 AI 코딩 에이전트.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### 설치 - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# 패키지 매니저 -npm i -g opencode-ai@latest # bun/pnpm/yarn 도 가능 -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS 및 Linux (권장, 항상 최신) -brew install opencode # macOS 및 Linux (공식 brew formula, 업데이트 빈도 낮음) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # 어떤 OS든 -nix run nixpkgs#opencode # 또는 github:anomalyco/opencode 로 최신 dev 브랜치 -``` - -> [!TIP] -> 설치 전에 0.1.x 보다 오래된 버전을 제거하세요. - -### 데스크톱 앱 (BETA) - -OpenCode 는 데스크톱 앱으로도 제공됩니다. [releases page](https://github.com/anomalyco/opencode/releases) 에서 직접 다운로드하거나 [opencode.ai/download](https://opencode.ai/download) 를 이용하세요. - -| 플랫폼 | 다운로드 | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, 또는 AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### 설치 디렉터리 - -설치 스크립트는 설치 경로를 다음 우선순위로 결정합니다. - -1. `$OPENCODE_INSTALL_DIR` - 사용자 지정 설치 디렉터리 -2. `$XDG_BIN_DIR` - XDG Base Directory Specification 준수 경로 -3. `$HOME/bin` - 표준 사용자 바이너리 디렉터리 (존재하거나 생성 가능할 경우) -4. `$HOME/.opencode/bin` - 기본 폴백 - -```bash -# 예시 -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -OpenCode 에는 내장 에이전트 2개가 있으며 `Tab` 키로 전환할 수 있습니다. - -- **build** - 기본값, 개발 작업을 위한 전체 권한 에이전트 -- **plan** - 분석 및 코드 탐색을 위한 읽기 전용 에이전트 - - 기본적으로 파일 편집을 거부 - - bash 명령 실행 전에 권한을 요청 - - 낯선 코드베이스를 탐색하거나 변경을 계획할 때 적합 - -또한 복잡한 검색과 여러 단계 작업을 위한 **general** 서브 에이전트가 포함되어 있습니다. -내부적으로 사용되며, 메시지에서 `@general` 로 호출할 수 있습니다. - -[agents](https://opencode.ai/docs/agents) 에 대해 더 알아보세요. - -### 문서 - -OpenCode 설정에 대한 자세한 내용은 [**문서**](https://opencode.ai/docs) 를 참고하세요. - -### 기여하기 - -OpenCode 에 기여하고 싶다면, Pull Request 를 제출하기 전에 [contributing docs](./CONTRIBUTING.md) 를 읽어주세요. - -### OpenCode 기반으로 만들기 - -OpenCode 와 관련된 프로젝트를 진행하면서 이름에 "opencode"(예: "opencode-dashboard" 또는 "opencode-mobile") 를 포함한다면, README 에 해당 프로젝트가 OpenCode 팀이 만든 것이 아니며 어떤 방식으로도 우리와 제휴되어 있지 않다는 점을 명시해 주세요. - ---- - -**커뮤니티에 참여하기** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.md b/README.md index b5a4c8ddd979..95774c47acb6 100644 --- a/README.md +++ b/README.md @@ -1,129 +1,72 @@ -

- - - - - OpenCode logo - - -

-

The open source AI coding agent.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Installation +# DCode -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Package managers -npm i -g opencode-ai@latest # or bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS and Linux (recommended, always up to date) -brew install opencode # macOS and Linux (official brew formula, updated less) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # Any OS -nix run nixpkgs#opencode # or github:anomalyco/opencode for latest dev branch -``` +DCode is an open source AI coding agent built as a compatibility-focused fork of +[OpenCode](https://github.com/anomalyco/opencode). -> [!TIP] -> Remove versions older than 0.1.x before installing. +The product name and executable are `DCode` and `dcode`. Existing OpenCode +configuration remains compatible, so DCode continues to use `opencode.json`, +`.opencode/`, `OPENCODE_*` environment variables, and the existing OpenCode +config, state, cache, and data directories. -### Desktop App (BETA) +## Installation -OpenCode is also available as a desktop application. Download directly from the [releases page](https://github.com/anomalyco/opencode/releases) or [opencode.ai/download](https://opencode.ai/download). - -| Platform | Download | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, or `.AppImage` | +### Build From Source ```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop +git clone https://github.com/CreatorGhost/TheCode +cd TheCode +bun install +bun run --cwd packages/opencode build --single +./install --binary packages/opencode/dist/dcode-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/x86_64/x64/; s/aarch64/arm64/')/bin/dcode ``` -#### Installation Directory +The build output is written to `packages/opencode/dist/dcode--/bin/dcode`. -The install script respects the following priority order for the installation path: +### GitHub Releases -1. `$OPENCODE_INSTALL_DIR` - Custom installation directory -2. `$XDG_BIN_DIR` - XDG Base Directory Specification compliant path -3. `$HOME/bin` - Standard user binary directory (if it exists or can be created) -4. `$HOME/.opencode/bin` - Default fallback +Once a release is available, install the latest build with: ```bash -# Examples -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash +curl -fsSL https://raw.githubusercontent.com/CreatorGhost/TheCode/dev/install | bash ``` -### Agents - -OpenCode includes two built-in agents you can switch between with the `Tab` key. +The installer writes the executable to `~/.dcode/bin` by default. It supports +`DCODE_INSTALL_DIR`, the legacy `OPENCODE_INSTALL_DIR`, and `XDG_BIN_DIR` in that +order. DCode releases are published at +[CreatorGhost/TheCode](https://github.com/CreatorGhost/TheCode/releases). -- **build** - Default, full-access agent for development work -- **plan** - Read-only agent for analysis and code exploration - - Denies file edits by default - - Asks permission before running bash commands - - Ideal for exploring unfamiliar codebases or planning changes +DCode is not currently distributed through npm, Homebrew, Chocolatey, Scoop, +Arch, Nix, or desktop app stores. Packages named `opencode` or `opencode-ai` in +those channels install upstream OpenCode, not DCode. -Also included is a **general** subagent for complex searches and multistep tasks. -This is used internally and can be invoked using `@general` in messages. +## Usage -Learn more about [agents](https://opencode.ai/docs/agents). - -### Documentation +```bash +cd +dcode +``` -For more info on how to configure OpenCode, [**head over to our docs**](https://opencode.ai/docs). +DCode includes the same built-in agents and configuration model as its OpenCode +base. Until fork-specific documentation is published, the +[upstream OpenCode documentation](https://opencode.ai/docs) remains applicable +to compatible configuration and provider features. -### Contributing +Automatic updates are disabled unless `autoupdate` is explicitly enabled in +your existing OpenCode-compatible configuration. Manual updates use +`dcode upgrade` and only install releases from `CreatorGhost/TheCode`. -If you're interested in contributing to OpenCode, please read our [contributing docs](./CONTRIBUTING.md) before submitting a pull request. +## Development -### Building on OpenCode +See [CONTRIBUTING.md](./CONTRIBUTING.md) for repository setup and contribution +guidance. Run package tests and type checks from their package directories, as +described in [AGENTS.md](./AGENTS.md). -If you are working on a project that's related to OpenCode and is using "opencode" as part of its name, for example "opencode-dashboard" or "opencode-mobile", please add a note to your README to clarify that it is not built by the OpenCode team and is not affiliated with us in any way. +## Attribution ---- +DCode is based on OpenCode and preserves compatibility identifiers where +renaming them would break users, plugins, configurations, databases, or hosted +services. OpenCode Zen, OpenCode Go, `opencode.ai`, and related hosted services +remain upstream OpenCode products. -**Join our community** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) +This fork is maintained independently and is not affiliated with the OpenCode +team. diff --git a/README.no.md b/README.no.md deleted file mode 100644 index 246e1dbb32d4..000000000000 --- a/README.no.md +++ /dev/null @@ -1,129 +0,0 @@ -

- - - - - OpenCode logo - - -

-

AI-kodeagent med åpen kildekode.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Installasjon - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Pakkehåndterere -npm i -g opencode-ai@latest # eller bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS og Linux (anbefalt, alltid oppdatert) -brew install opencode # macOS og Linux (offisiell brew-formel, oppdateres sjeldnere) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # alle OS -nix run nixpkgs#opencode # eller github:anomalyco/opencode for nyeste dev-branch -``` - -> [!TIP] -> Fjern versjoner eldre enn 0.1.x før du installerer. - -### Desktop-app (BETA) - -OpenCode er også tilgjengelig som en desktop-app. Last ned direkte fra [releases-siden](https://github.com/anomalyco/opencode/releases) eller [opencode.ai/download](https://opencode.ai/download). - -| Plattform | Nedlasting | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm` eller AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Installasjonsmappe - -Installasjonsskriptet bruker følgende prioritet for installasjonsstien: - -1. `$OPENCODE_INSTALL_DIR` - Egendefinert installasjonsmappe -2. `$XDG_BIN_DIR` - Sti som følger XDG Base Directory Specification -3. `$HOME/bin` - Standard brukerbinar-mappe (hvis den finnes eller kan opprettes) -4. `$HOME/.opencode/bin` - Standard fallback - -```bash -# Eksempler -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -OpenCode har to innebygde agents du kan bytte mellom med `Tab`-tasten. - -- **build** - Standard, agent med full tilgang for utviklingsarbeid -- **plan** - Skrivebeskyttet agent for analyse og kodeutforsking - - Nekter filendringer som standard - - Spør om tillatelse før bash-kommandoer - - Ideell for å utforske ukjente kodebaser eller planlegge endringer - -Det finnes også en **general**-subagent for komplekse søk og flertrinnsoppgaver. -Den brukes internt og kan kalles via `@general` i meldinger. - -Les mer om [agents](https://opencode.ai/docs/agents). - -### Dokumentasjon - -For mer info om hvordan du konfigurerer OpenCode, [**se dokumentasjonen**](https://opencode.ai/docs). - -### Bidra - -Hvis du vil bidra til OpenCode, les [contributing docs](./CONTRIBUTING.md) før du sender en pull request. - -### Bygge på OpenCode - -Hvis du jobber med et prosjekt som er relatert til OpenCode og bruker "opencode" som en del av navnet; for eksempel "opencode-dashboard" eller "opencode-mobile", legg inn en merknad i README som presiserer at det ikke er bygget av OpenCode-teamet og ikke er tilknyttet oss på noen måte. - ---- - -**Bli med i fellesskapet** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.pl.md b/README.pl.md deleted file mode 100644 index 6b86de4ca3e0..000000000000 --- a/README.pl.md +++ /dev/null @@ -1,129 +0,0 @@ -

- - - - - OpenCode logo - - -

-

Otwartoźródłowy agent kodujący AI.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Instalacja - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Menedżery pakietów -npm i -g opencode-ai@latest # albo bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS i Linux (polecane, zawsze aktualne) -brew install opencode # macOS i Linux (oficjalna formuła brew, rzadziej aktualizowana) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # dowolny system -nix run nixpkgs#opencode # lub github:anomalyco/opencode dla najnowszej gałęzi dev -``` - -> [!TIP] -> Przed instalacją usuń wersje starsze niż 0.1.x. - -### Aplikacja desktopowa (BETA) - -OpenCode jest także dostępny jako aplikacja desktopowa. Pobierz ją bezpośrednio ze strony [releases](https://github.com/anomalyco/opencode/releases) lub z [opencode.ai/download](https://opencode.ai/download). - -| Platforma | Pobieranie | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm` lub AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Katalog instalacji - -Skrypt instalacyjny stosuje następujący priorytet wyboru ścieżki instalacji: - -1. `$OPENCODE_INSTALL_DIR` - Własny katalog instalacji -2. `$XDG_BIN_DIR` - Ścieżka zgodna ze specyfikacją XDG Base Directory -3. `$HOME/bin` - Standardowy katalog binarny użytkownika (jeśli istnieje lub można go utworzyć) -4. `$HOME/.opencode/bin` - Domyślny fallback - -```bash -# Przykłady -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -OpenCode zawiera dwóch wbudowanych agentów, między którymi możesz przełączać się klawiszem `Tab`. - -- **build** - Domyślny agent z pełnym dostępem do pracy developerskiej -- **plan** - Agent tylko do odczytu do analizy i eksploracji kodu - - Domyślnie odmawia edycji plików - - Pyta o zgodę przed uruchomieniem komend bash - - Idealny do poznawania nieznanych baz kodu lub planowania zmian - -Dodatkowo jest subagent **general** do złożonych wyszukiwań i wieloetapowych zadań. -Jest używany wewnętrznie i można go wywołać w wiadomościach przez `@general`. - -Dowiedz się więcej o [agents](https://opencode.ai/docs/agents). - -### Dokumentacja - -Więcej informacji o konfiguracji OpenCode znajdziesz w [**dokumentacji**](https://opencode.ai/docs). - -### Współtworzenie - -Jeśli chcesz współtworzyć OpenCode, przeczytaj [contributing docs](./CONTRIBUTING.md) przed wysłaniem pull requesta. - -### Budowanie na OpenCode - -Jeśli pracujesz nad projektem związanym z OpenCode i używasz "opencode" jako części nazwy (na przykład "opencode-dashboard" lub "opencode-mobile"), dodaj proszę notatkę do swojego README, aby wyjaśnić, że projekt nie jest tworzony przez zespół OpenCode i nie jest z nami w żaden sposób powiązany. - ---- - -**Dołącz do naszej społeczności** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.ru.md b/README.ru.md deleted file mode 100644 index c679ce6b4720..000000000000 --- a/README.ru.md +++ /dev/null @@ -1,129 +0,0 @@ -

- - - - - OpenCode logo - - -

-

Открытый AI-агент для программирования.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Установка - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Менеджеры пакетов -npm i -g opencode-ai@latest # или bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS и Linux (рекомендуем, всегда актуально) -brew install opencode # macOS и Linux (официальная формула brew, обновляется реже) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # любая ОС -nix run nixpkgs#opencode # или github:anomalyco/opencode для самой свежей ветки dev -``` - -> [!TIP] -> Перед установкой удалите версии старше 0.1.x. - -### Десктопное приложение (BETA) - -OpenCode также доступен как десктопное приложение. Скачайте его со [страницы релизов](https://github.com/anomalyco/opencode/releases) или с [opencode.ai/download](https://opencode.ai/download). - -| Платформа | Загрузка | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm` или AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Каталог установки - -Скрипт установки выбирает путь установки в следующем порядке приоритета: - -1. `$OPENCODE_INSTALL_DIR` - Пользовательский каталог установки -2. `$XDG_BIN_DIR` - Путь, совместимый со спецификацией XDG Base Directory -3. `$HOME/bin` - Стандартный каталог пользовательских бинарников (если существует или можно создать) -4. `$HOME/.opencode/bin` - Fallback по умолчанию - -```bash -# Примеры -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -В OpenCode есть два встроенных агента, между которыми можно переключаться клавишей `Tab`. - -- **build** - По умолчанию, агент с полным доступом для разработки -- **plan** - Агент только для чтения для анализа и изучения кода - - По умолчанию запрещает редактирование файлов - - Запрашивает разрешение перед выполнением bash-команд - - Идеален для изучения незнакомых кодовых баз или планирования изменений - -Также включен сабагент **general** для сложных поисков и многошаговых задач. -Он используется внутренне и может быть вызван в сообщениях через `@general`. - -Подробнее об [agents](https://opencode.ai/docs/agents). - -### Документация - -Больше информации о том, как настроить OpenCode: [**наши docs**](https://opencode.ai/docs). - -### Вклад - -Если вы хотите внести вклад в OpenCode, прочитайте [contributing docs](./CONTRIBUTING.md) перед тем, как отправлять pull request. - -### Разработка на базе OpenCode - -Если вы делаете проект, связанный с OpenCode, и используете "opencode" как часть имени (например, "opencode-dashboard" или "opencode-mobile"), добавьте примечание в README, чтобы уточнить, что проект не создан командой OpenCode и не аффилирован с нами. - ---- - -**Присоединяйтесь к нашему сообществу** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.th.md b/README.th.md deleted file mode 100644 index a70144d99ff6..000000000000 --- a/README.th.md +++ /dev/null @@ -1,129 +0,0 @@ -

- - - - - OpenCode logo - - -

-

เอเจนต์การเขียนโค้ดด้วย AI แบบโอเพนซอร์ส

-

- Discord - npm - สถานะการสร้าง -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### การติดตั้ง - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# ตัวจัดการแพ็กเกจ -npm i -g opencode-ai@latest # หรือ bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS และ Linux (แนะนำ อัปเดตเสมอ) -brew install opencode # macOS และ Linux (brew formula อย่างเป็นทางการ อัปเดตน้อยกว่า) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # ระบบปฏิบัติการใดก็ได้ -nix run nixpkgs#opencode # หรือ github:anomalyco/opencode สำหรับสาขาพัฒนาล่าสุด -``` - -> [!TIP] -> ลบเวอร์ชันที่เก่ากว่า 0.1.x ก่อนติดตั้ง - -### แอปพลิเคชันเดสก์ท็อป (เบต้า) - -OpenCode มีให้ใช้งานเป็นแอปพลิเคชันเดสก์ท็อป ดาวน์โหลดโดยตรงจาก [หน้ารุ่น](https://github.com/anomalyco/opencode/releases) หรือ [opencode.ai/download](https://opencode.ai/download) - -| แพลตฟอร์ม | ดาวน์โหลด | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, หรือ AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### ไดเรกทอรีการติดตั้ง - -สคริปต์การติดตั้งจะใช้ลำดับความสำคัญตามเส้นทางการติดตั้ง: - -1. `$OPENCODE_INSTALL_DIR` - ไดเรกทอรีการติดตั้งที่กำหนดเอง -2. `$XDG_BIN_DIR` - เส้นทางที่สอดคล้องกับ XDG Base Directory Specification -3. `$HOME/bin` - ไดเรกทอรีไบนารีผู้ใช้มาตรฐาน (หากมีอยู่หรือสามารถสร้างได้) -4. `$HOME/.opencode/bin` - ค่าสำรองเริ่มต้น - -```bash -# ตัวอย่าง -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### เอเจนต์ - -OpenCode รวมเอเจนต์ในตัวสองตัวที่คุณสามารถสลับได้ด้วยปุ่ม `Tab` - -- **build** - เอเจนต์เริ่มต้น มีสิทธิ์เข้าถึงแบบเต็มสำหรับงานพัฒนา -- **plan** - เอเจนต์อ่านอย่างเดียวสำหรับการวิเคราะห์และการสำรวจโค้ด - - ปฏิเสธการแก้ไขไฟล์โดยค่าเริ่มต้น - - ขอสิทธิ์ก่อนเรียกใช้คำสั่ง bash - - เหมาะสำหรับสำรวจโค้ดเบสที่ไม่คุ้นเคยหรือวางแผนการเปลี่ยนแปลง - -นอกจากนี้ยังมีเอเจนต์ย่อย **general** สำหรับการค้นหาที่ซับซ้อนและงานหลายขั้นตอน -ใช้ภายในและสามารถเรียกใช้ได้โดยใช้ `@general` ในข้อความ - -เรียนรู้เพิ่มเติมเกี่ยวกับ [เอเจนต์](https://opencode.ai/docs/agents) - -### เอกสารประกอบ - -สำหรับข้อมูลเพิ่มเติมเกี่ยวกับวิธีกำหนดค่า OpenCode [**ไปที่เอกสารของเรา**](https://opencode.ai/docs) - -### การมีส่วนร่วม - -หากคุณสนใจที่จะมีส่วนร่วมใน OpenCode โปรดอ่าน [เอกสารการมีส่วนร่วม](./CONTRIBUTING.md) ก่อนส่ง Pull Request - -### การสร้างบน OpenCode - -หากคุณทำงานในโปรเจกต์ที่เกี่ยวข้องกับ OpenCode และใช้ "opencode" เป็นส่วนหนึ่งของชื่อ เช่น "opencode-dashboard" หรือ "opencode-mobile" โปรดเพิ่มหมายเหตุใน README ของคุณเพื่อชี้แจงว่าไม่ได้สร้างโดยทีม OpenCode และไม่ได้เกี่ยวข้องกับเราในทางใด - ---- - -**ร่วมชุมชนของเรา** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.tr.md b/README.tr.md deleted file mode 100644 index aaab8f0cf2ec..000000000000 --- a/README.tr.md +++ /dev/null @@ -1,129 +0,0 @@ -

- - - - - OpenCode logo - - -

-

Açık kaynaklı yapay zeka kodlama asistanı.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Kurulum - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Paket yöneticileri -npm i -g opencode-ai@latest # veya bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS ve Linux (önerilir, her zaman güncel) -brew install opencode # macOS ve Linux (resmi brew formülü, daha az güncellenir) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # Tüm işletim sistemleri -nix run nixpkgs#opencode # veya en güncel geliştirme dalı için github:anomalyco/opencode -``` - -> [!TIP] -> Kurulumdan önce 0.1.x'ten eski sürümleri kaldırın. - -### Masaüstü Uygulaması (BETA) - -OpenCode ayrıca masaüstü uygulaması olarak da mevcuttur. Doğrudan [sürüm sayfasından](https://github.com/anomalyco/opencode/releases) veya [opencode.ai/download](https://opencode.ai/download) adresinden indirebilirsiniz. - -| Platform | İndirme | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm` veya AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Kurulum Dizini (Installation Directory) - -Kurulum betiği (install script), kurulum yolu (installation path) için aşağıdaki öncelik sırasını takip eder: - -1. `$OPENCODE_INSTALL_DIR` - Özel kurulum dizini -2. `$XDG_BIN_DIR` - XDG Base Directory Specification uyumlu yol -3. `$HOME/bin` - Standart kullanıcı binary dizini (varsa veya oluşturulabiliyorsa) -4. `$HOME/.opencode/bin` - Varsayılan yedek konum - -```bash -# Örnekler -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Ajanlar - -OpenCode, `Tab` tuşuyla aralarında geçiş yapabileceğiniz iki yerleşik (built-in) ajan içerir. - -- **build** - Varsayılan, geliştirme çalışmaları için tam erişimli ajan -- **plan** - Analiz ve kod keşfi için salt okunur ajan - - Varsayılan olarak dosya düzenlemelerini reddeder - - Bash komutlarını çalıştırmadan önce izin ister - - Tanımadığınız kod tabanlarını keşfetmek veya değişiklikleri planlamak için ideal - -Ayrıca, karmaşık aramalar ve çok adımlı görevler için bir **genel** alt ajan bulunmaktadır. -Bu dahili olarak kullanılır ve mesajlarda `@general` ile çağrılabilir. - -[Ajanlar](https://opencode.ai/docs/agents) hakkında daha fazla bilgi edinin. - -### Dokümantasyon - -OpenCode'u nasıl yapılandıracağınız hakkında daha fazla bilgi için [**dokümantasyonumuza göz atın**](https://opencode.ai/docs). - -### Katkıda Bulunma - -OpenCode'a katkıda bulunmak istiyorsanız, lütfen bir pull request göndermeden önce [katkıda bulunma dokümanlarımızı](./CONTRIBUTING.md) okuyun. - -### OpenCode Üzerine Geliştirme - -OpenCode ile ilgili bir proje üzerinde çalışıyorsanız ve projenizin adının bir parçası olarak "opencode" kullanıyorsanız (örneğin, "opencode-dashboard" veya "opencode-mobile"), lütfen README dosyanıza projenin OpenCode ekibi tarafından geliştirilmediğini ve bizimle hiçbir şekilde bağlantılı olmadığını belirten bir not ekleyin. - ---- - -**Topluluğumuza katılın** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.uk.md b/README.uk.md deleted file mode 100644 index 7cd50afbb43e..000000000000 --- a/README.uk.md +++ /dev/null @@ -1,130 +0,0 @@ -

- - - - - OpenCode logo - - -

-

AI-агент для програмування з відкритим кодом.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Встановлення - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Менеджери пакетів -npm i -g opencode-ai@latest # або bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS і Linux (рекомендовано, завжди актуально) -brew install opencode # macOS і Linux (офіційна формула Homebrew, оновлюється рідше) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # Будь-яка ОС -nix run nixpkgs#opencode # або github:anomalyco/opencode для найновішої dev-гілки -``` - -> [!TIP] -> Перед встановленням видаліть версії старші за 0.1.x. - -### Десктопний застосунок (BETA) - -OpenCode також доступний як десктопний застосунок. Завантажуйте напряму зі [сторінки релізів](https://github.com/anomalyco/opencode/releases) або [opencode.ai/download](https://opencode.ai/download). - -| Платформа | Завантаження | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm` або AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Каталог встановлення - -Скрипт встановлення дотримується такого порядку пріоритету для шляху встановлення: - -1. `$OPENCODE_INSTALL_DIR` - Користувацький каталог встановлення -2. `$XDG_BIN_DIR` - Шлях, сумісний зі специфікацією XDG Base Directory -3. `$HOME/bin` - Стандартний каталог користувацьких бінарників (якщо існує або його можна створити) -4. `$HOME/.opencode/bin` - Резервний варіант за замовчуванням - -```bash -# Приклади -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Агенти - -OpenCode містить два вбудовані агенти, між якими можна перемикатися клавішею `Tab`. - -- **build** - Агент за замовчуванням із повним доступом для завдань розробки -- **plan** - Агент лише для читання для аналізу та дослідження коду - - За замовчуванням забороняє редагування файлів - - Запитує дозвіл перед запуском bash-команд - - Ідеально підходить для дослідження незнайомих кодових баз або планування змін - -Також доступний допоміжний агент **general** для складного пошуку та багатокрокових завдань. -Він використовується всередині системи й може бути викликаний у повідомленнях через `@general`. - -Дізнайтеся більше про [agents](https://opencode.ai/docs/agents). - -### Документація - -Щоб дізнатися більше про налаштування OpenCode, [**перейдіть до нашої документації**](https://opencode.ai/docs). - -### Внесок - -Якщо ви хочете зробити внесок в OpenCode, будь ласка, прочитайте нашу [документацію для контриб'юторів](./CONTRIBUTING.md) перед надсиланням pull request. - -### Проєкти на базі OpenCode - -Якщо ви працюєте над проєктом, пов'язаним з OpenCode, і використовуєте "opencode" у назві, наприклад "opencode-dashboard" або "opencode-mobile", додайте примітку до свого README. -Уточніть, що цей проєкт не створений командою OpenCode і жодним чином не афілійований із нами. - ---- - -**Приєднуйтеся до нашої спільноти** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.vi.md b/README.vi.md deleted file mode 100644 index 7d1a4f3ca813..000000000000 --- a/README.vi.md +++ /dev/null @@ -1,129 +0,0 @@ -

- - - - - OpenCode logo - - -

-

Trợ lý lập trình AI mã nguồn mở.

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### Cài đặt - -```bash -# YOLO -curl -fsSL https://opencode.ai/install | bash - -# Các trình quản lý gói (Package managers) -npm i -g opencode-ai@latest # hoặc bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS và Linux (khuyên dùng, luôn cập nhật) -brew install opencode # macOS và Linux (công thức brew chính thức, ít cập nhật hơn) -sudo pacman -S opencode # Arch Linux (Bản ổn định) -paru -S opencode-bin # Arch Linux (Bản mới nhất từ AUR) -mise use -g opencode # Mọi hệ điều hành -nix run nixpkgs#opencode # hoặc github:anomalyco/opencode cho nhánh dev mới nhất -``` - -> [!TIP] -> Hãy xóa các phiên bản cũ hơn 0.1.x trước khi cài đặt. - -### Ứng dụng Desktop (BETA) - -OpenCode cũng có sẵn dưới dạng ứng dụng desktop. Tải trực tiếp từ [trang releases](https://github.com/anomalyco/opencode/releases) hoặc [opencode.ai/download](https://opencode.ai/download). - -| Nền tảng | Tải xuống | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, hoặc AppImage | - -```bash -# macOS (Homebrew) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### Thư mục cài đặt - -Tập lệnh cài đặt tuân theo thứ tự ưu tiên sau cho đường dẫn cài đặt: - -1. `$OPENCODE_INSTALL_DIR` - Thư mục cài đặt tùy chỉnh -2. `$XDG_BIN_DIR` - Đường dẫn tuân thủ XDG Base Directory Specification -3. `$HOME/bin` - Thư mục nhị phân tiêu chuẩn của người dùng (nếu tồn tại hoặc có thể tạo) -4. `$HOME/.opencode/bin` - Mặc định dự phòng - -```bash -# Ví dụ -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents (Đại diện) - -OpenCode bao gồm hai agent được tích hợp sẵn mà bạn có thể chuyển đổi bằng phím `Tab`. - -- **build** - Agent mặc định, có toàn quyền truy cập cho công việc lập trình -- **plan** - Agent chỉ đọc dùng để phân tích và khám phá mã nguồn - - Mặc định từ chối việc chỉnh sửa tệp - - Hỏi quyền trước khi chạy các lệnh bash - - Lý tưởng để khám phá các codebase lạ hoặc lên kế hoạch thay đổi - -Ngoài ra còn có một subagent **general** dùng cho các tìm kiếm phức tạp và tác vụ nhiều bước. -Agent này được sử dụng nội bộ và có thể gọi bằng cách dùng `@general` trong tin nhắn. - -Tìm hiểu thêm về [agents](https://opencode.ai/docs/agents). - -### Tài liệu - -Để biết thêm thông tin về cách cấu hình OpenCode, [**hãy truy cập tài liệu của chúng tôi**](https://opencode.ai/docs). - -### Đóng góp - -Nếu bạn muốn đóng góp cho OpenCode, vui lòng đọc [tài liệu hướng dẫn đóng góp](./CONTRIBUTING.md) trước khi gửi pull request. - -### Xây dựng trên nền tảng OpenCode - -Nếu bạn đang làm việc trên một dự án liên quan đến OpenCode và sử dụng "opencode" như một phần của tên dự án, ví dụ "opencode-dashboard" hoặc "opencode-mobile", vui lòng thêm một ghi chú vào README của bạn để làm rõ rằng dự án đó không được xây dựng bởi đội ngũ OpenCode và không liên kết với chúng tôi dưới bất kỳ hình thức nào. - ---- - -**Tham gia cộng đồng của chúng tôi** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode) diff --git a/README.zh.md b/README.zh.md deleted file mode 100644 index 352e13ccaa1d..000000000000 --- a/README.zh.md +++ /dev/null @@ -1,128 +0,0 @@ -

- - - - - OpenCode logo - - -

-

开源的 AI Coding Agent。

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### 安装 - -```bash -# 直接安装 (YOLO) -curl -fsSL https://opencode.ai/install | bash - -# 软件包管理器 -npm i -g opencode-ai@latest # 也可使用 bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS 和 Linux(推荐,始终保持最新) -brew install opencode # macOS 和 Linux(官方 brew formula,更新频率较低) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # 任意系统 -nix run nixpkgs#opencode # 或用 github:anomalyco/opencode 获取最新 dev 分支 -``` - -> [!TIP] -> 安装前请先移除 0.1.x 之前的旧版本。 - -### 桌面应用程序 (BETA) - -OpenCode 也提供桌面版应用。可直接从 [发布页 (releases page)](https://github.com/anomalyco/opencode/releases) 或 [opencode.ai/download](https://opencode.ai/download) 下载。 - -| 平台 | 下载文件 | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`、`.rpm` 或 AppImage | - -```bash -# macOS (Homebrew Cask) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### 安装目录 - -安装脚本按照以下优先级决定安装路径: - -1. `$OPENCODE_INSTALL_DIR` - 自定义安装目录 -2. `$XDG_BIN_DIR` - 符合 XDG 基础目录规范的路径 -3. `$HOME/bin` - 如果存在或可创建的用户二进制目录 -4. `$HOME/.opencode/bin` - 默认备用路径 - -```bash -# 示例 -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -OpenCode 内置两种 Agent,可用 `Tab` 键快速切换: - -- **build** - 默认模式,具备完整权限,适合开发工作 -- **plan** - 只读模式,适合代码分析与探索 - - 默认拒绝修改文件 - - 运行 bash 命令前会询问 - - 便于探索未知代码库或规划改动 - -另外还包含一个 **general** 子 Agent,用于复杂搜索和多步任务,内部使用,也可在消息中输入 `@general` 调用。 - -了解更多 [Agents](https://opencode.ai/docs/agents) 相关信息。 - -### 文档 - -更多配置说明请查看我们的 [**官方文档**](https://opencode.ai/docs)。 - -### 参与贡献 - -如有兴趣贡献代码,请在提交 PR 前阅读 [贡献指南 (Contributing Docs)](./CONTRIBUTING.md)。 - -### 基于 OpenCode 进行开发 - -如果你在项目名中使用了 “opencode”(如 “opencode-dashboard” 或 “opencode-mobile”),请在 README 里注明该项目不是 OpenCode 团队官方开发,且不存在隶属关系。 - ---- - -**加入我们的社区** [飞书](https://applink.feishu.cn/client/chat/chatter/add_by_link?link_token=52ao9352-5623-4fa0-b7dd-3407c392c1af&qr_code=true) | [X.com](https://x.com/opencode) diff --git a/README.zht.md b/README.zht.md deleted file mode 100644 index f09358b1330b..000000000000 --- a/README.zht.md +++ /dev/null @@ -1,128 +0,0 @@ -

- - - - - OpenCode logo - - -

-

開源的 AI Coding Agent。

-

- Discord - npm - Build status -

- -

- English | - 简体中文 | - 繁體中文 | - 한국어 | - Deutsch | - Español | - Français | - Italiano | - Dansk | - 日本語 | - Polski | - Русский | - Bosanski | - العربية | - Norsk | - Português (Brasil) | - ไทย | - Türkçe | - Українська | - বাংলা | - Ελληνικά | - Tiếng Việt -

- -[![OpenCode Terminal UI](packages/web/src/assets/lander/screenshot.png)](https://opencode.ai) - ---- - -### 安裝 - -```bash -# 直接安裝 (YOLO) -curl -fsSL https://opencode.ai/install | bash - -# 套件管理員 -npm i -g opencode-ai@latest # 也可使用 bun/pnpm/yarn -scoop install opencode # Windows -choco install opencode # Windows -brew install anomalyco/tap/opencode # macOS 與 Linux(推薦,始終保持最新) -brew install opencode # macOS 與 Linux(官方 brew formula,更新頻率較低) -sudo pacman -S opencode # Arch Linux (Stable) -paru -S opencode-bin # Arch Linux (Latest from AUR) -mise use -g opencode # 任何作業系統 -nix run nixpkgs#opencode # 或使用 github:anomalyco/opencode 以取得最新開發分支 -``` - -> [!TIP] -> 安裝前請先移除 0.1.x 以前的舊版本。 - -### 桌面應用程式 (BETA) - -OpenCode 也提供桌面版應用程式。您可以直接從 [發佈頁面 (releases page)](https://github.com/anomalyco/opencode/releases) 或 [opencode.ai/download](https://opencode.ai/download) 下載。 - -| 平台 | 下載連結 | -| --------------------- | ---------------------------------- | -| macOS (Apple Silicon) | `opencode-desktop-mac-arm64.dmg` | -| macOS (Intel) | `opencode-desktop-mac-x64.dmg` | -| Windows | `opencode-desktop-windows-x64.exe` | -| Linux | `.deb`, `.rpm`, 或 AppImage | - -```bash -# macOS (Homebrew Cask) -brew install --cask opencode-desktop -# Windows (Scoop) -scoop bucket add extras; scoop install extras/opencode-desktop -``` - -#### 安裝目錄 - -安裝腳本會依據以下優先順序決定安裝路徑: - -1. `$OPENCODE_INSTALL_DIR` - 自定義安裝目錄 -2. `$XDG_BIN_DIR` - 符合 XDG 基礎目錄規範的路徑 -3. `$HOME/bin` - 標準使用者執行檔目錄 (若存在或可建立) -4. `$HOME/.opencode/bin` - 預設備用路徑 - -```bash -# 範例 -OPENCODE_INSTALL_DIR=/usr/local/bin curl -fsSL https://opencode.ai/install | bash -XDG_BIN_DIR=$HOME/.local/bin curl -fsSL https://opencode.ai/install | bash -``` - -### Agents - -OpenCode 內建了兩種 Agent,您可以使用 `Tab` 鍵快速切換。 - -- **build** - 預設模式,具備完整權限的 Agent,適用於開發工作。 -- **plan** - 唯讀模式,適用於程式碼分析與探索。 - - 預設禁止修改檔案。 - - 執行 bash 指令前會詢問權限。 - - 非常適合用來探索陌生的程式碼庫或規劃變更。 - -此外,OpenCode 還包含一個 **general** 子 Agent,用於處理複雜搜尋與多步驟任務。此 Agent 供系統內部使用,亦可透過在訊息中輸入 `@general` 來呼叫。 - -了解更多關於 [Agents](https://opencode.ai/docs/agents) 的資訊。 - -### 線上文件 - -關於如何設定 OpenCode 的詳細資訊,請參閱我們的 [**官方文件**](https://opencode.ai/docs)。 - -### 參與貢獻 - -如果您有興趣參與 OpenCode 的開發,請在提交 Pull Request 前先閱讀我們的 [貢獻指南 (Contributing Docs)](./CONTRIBUTING.md)。 - -### 基於 OpenCode 進行開發 - -如果您正在開發與 OpenCode 相關的專案,並在名稱中使用了 "opencode"(例如 "opencode-dashboard" 或 "opencode-mobile"),請在您的 README 中加入聲明,說明該專案並非由 OpenCode 團隊開發,且與我們沒有任何隸屬關係。 - ---- - -**加入我們的社群** [飞书](https://applink.feishu.cn/client/chat/chatter/add_by_link?link_token=52ao9352-5623-4fa0-b7dd-3407c392c1af&qr_code=true) | [X.com](https://x.com/opencode) diff --git a/SECURITY.md b/SECURITY.md index e7e59f4a27ac..4ffe14a539ef 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -38,7 +38,7 @@ Server mode is opt-in only. When enabled, set `OPENCODE_SERVER_PASSWORD` to requ We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions. -To report a security issue, please use the GitHub Security Advisory ["Report a Vulnerability"](https://github.com/anomalyco/opencode/security/advisories/new) tab. +To report a security issue, please use the GitHub Security Advisory ["Report a Vulnerability"](https://github.com/CreatorGhost/TheCode/security/advisories/new) tab. The team will send a response indicating the next steps in handling your report. After the initial reply to your report, the security team will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance. From 356479e14115eedb3dd5b9aa6d37444a60c5b308 Mon Sep 17 00:00:00 2001 From: CreatorGhost Date: Sat, 11 Jul 2026 15:54:21 +0530 Subject: [PATCH 6/8] fix(cli): address CodeRabbit review findings - pin generated GitHub workflow action to the release tag (mutable @dev ref with id-token: write was a supply-chain risk); dev builds still track dev - complete dcode rename: exit-splash continuation command, serve listening log (SDK launchers now accept both prefixes), BUN_BE_BUN check for MCP servers invoking dcode - neutral wording for shared-session message in dcode pr - update permission.shared test expectations to DCode - set persist-credentials: false on release workflow checkout --- .github/workflows/release.yml | 1 + packages/opencode/src/cli/cmd/github.handler.ts | 7 ++++++- packages/opencode/src/cli/cmd/pr.ts | 2 +- packages/opencode/src/cli/cmd/run/splash.ts | 2 +- packages/opencode/src/cli/cmd/serve.ts | 2 +- packages/opencode/src/mcp/index.ts | 2 +- packages/opencode/test/cli/run/permission.shared.test.ts | 4 ++-- packages/opencode/test/lib/cli-process.ts | 2 +- packages/sdk/js/src/server.ts | 4 +++- packages/sdk/js/src/v2/server.ts | 4 +++- 10 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 38dcd18f30b8..a83fec66ac61 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,6 +20,7 @@ jobs: - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 with: fetch-depth: 0 + persist-credentials: false - uses: ./.github/actions/setup-bun diff --git a/packages/opencode/src/cli/cmd/github.handler.ts b/packages/opencode/src/cli/cmd/github.handler.ts index 1533b0e723d9..c03f75c869ae 100644 --- a/packages/opencode/src/cli/cmd/github.handler.ts +++ b/packages/opencode/src/cli/cmd/github.handler.ts @@ -33,6 +33,7 @@ import { setTimeout as sleep } from "node:timers/promises" import { Process } from "@/util/process" import { parseGitHubRemote } from "@/util/repository" import { Effect } from "effect" +import { InstallationChannel, InstallationVersion } from "@opencode-ai/core/installation/version" import { extractResponseText, formatPromptTooLargeError } from "./github.shared" type GitHubAuthor = { @@ -327,6 +328,10 @@ export const githubInstall = Effect.fn("Cli.github.install")(function* () { } async function addWorkflowFiles() { + // Pin the generated workflow to this release's immutable tag; the job + // grants id-token: write, so a mutable ref could run unreviewed code. + // Dev/preview builds have no release tag, so they track dev. + const actionRef = InstallationChannel === "latest" ? `v${InstallationVersion}` : "dev" const envStr = provider === "amazon-bedrock" ? "" @@ -362,7 +367,7 @@ jobs: persist-credentials: false - name: Run DCode - uses: CreatorGhost/TheCode/github@dev${envStr} + uses: CreatorGhost/TheCode/github@${actionRef}${envStr} with: model: ${provider}/${model}`, ) diff --git a/packages/opencode/src/cli/cmd/pr.ts b/packages/opencode/src/cli/cmd/pr.ts index d0b8c0b4a8d1..bf66383ac234 100644 --- a/packages/opencode/src/cli/cmd/pr.ts +++ b/packages/opencode/src/cli/cmd/pr.ts @@ -76,7 +76,7 @@ export const PrCommand = effectCmd({ const sessionMatch = prInfo.body.match(/https:\/\/opncd\.ai\/s\/([a-zA-Z0-9_-]+)/) if (sessionMatch) { const sessionUrl = sessionMatch[0] - UI.println(`Found OpenCode-hosted session: ${sessionUrl}`) + UI.println(`Found shared session: ${sessionUrl}`) UI.println(`Importing session...`) const importResult = yield* Effect.promise(() => diff --git a/packages/opencode/src/cli/cmd/run/splash.ts b/packages/opencode/src/cli/cmd/run/splash.ts index 70f7ae22b46e..27109821a75d 100644 --- a/packages/opencode/src/cli/cmd/run/splash.ts +++ b/packages/opencode/src/cli/cmd/run/splash.ts @@ -234,7 +234,7 @@ function build(input: SplashWriterInput, kind: "entry" | "exit", ctx: Scrollback lines, body_left + label.length, top + 1, - `opencode --mini -s ${meta.session_id}`, + `dcode --mini -s ${meta.session_id}`, right, undefined, TextAttributes.BOLD, diff --git a/packages/opencode/src/cli/cmd/serve.ts b/packages/opencode/src/cli/cmd/serve.ts index 4488fc13f8c1..aa0966fcc6db 100644 --- a/packages/opencode/src/cli/cmd/serve.ts +++ b/packages/opencode/src/cli/cmd/serve.ts @@ -17,7 +17,7 @@ export const ServeCommand = effectCmd({ } const opts = yield* resolveNetworkOptions(args) const server = yield* Effect.promise(() => Server.listen(opts)) - console.log(`opencode server listening on http://${server.hostname}:${server.port}`) + console.log(`dcode server listening on http://${server.hostname}:${server.port}`) yield* Effect.never }), diff --git a/packages/opencode/src/mcp/index.ts b/packages/opencode/src/mcp/index.ts index 64e0f3fd7011..0965e0643a7c 100644 --- a/packages/opencode/src/mcp/index.ts +++ b/packages/opencode/src/mcp/index.ts @@ -351,7 +351,7 @@ const layer = Layer.effect( cwd, env: { ...process.env, - ...(cmd === "opencode" ? { BUN_BE_BUN: "1" } : {}), + ...(cmd === "dcode" || cmd === "opencode" ? { BUN_BE_BUN: "1" } : {}), ...mcp.environment, }, }) diff --git a/packages/opencode/test/cli/run/permission.shared.test.ts b/packages/opencode/test/cli/run/permission.shared.test.ts index 03be4220f210..0ef364e88363 100644 --- a/packages/opencode/test/cli/run/permission.shared.test.ts +++ b/packages/opencode/test/cli/run/permission.shared.test.ts @@ -132,11 +132,11 @@ describe("run permission shared", () => { test("formats always-allow copy for wildcard and explicit patterns", () => { expect(permissionAlwaysLines(req({ permission: "bash", always: ["*"] }))).toEqual([ - "This will allow bash until OpenCode is restarted.", + "This will allow bash until DCode is restarted.", ]) expect(permissionAlwaysLines(req({ always: ["src/**/*.ts", "src/**/*.tsx"] }))).toEqual([ - "This will allow the following patterns until OpenCode is restarted.", + "This will allow the following patterns until DCode is restarted.", "- src/**/*.ts", "- src/**/*.tsx", ]) diff --git a/packages/opencode/test/lib/cli-process.ts b/packages/opencode/test/lib/cli-process.ts index 12e8d9c866a5..128d60ba1434 100644 --- a/packages/opencode/test/lib/cli-process.ts +++ b/packages/opencode/test/lib/cli-process.ts @@ -345,7 +345,7 @@ export function withCliFixture( // Watch stdout line-by-line for the listening sentinel. Format // (see src/cli/cmd/serve.ts): - // "opencode server listening on http://:" + // "dcode server listening on http://:" const readyRe = /listening on (http:\/\/([^\s:]+):(\d+))/ const readyDeferred = yield* Deferred.make<{ url: string; hostname: string; port: number }>() yield* Effect.forkScoped( diff --git a/packages/sdk/js/src/server.ts b/packages/sdk/js/src/server.ts index 2d1ab29fc928..41ac53618e89 100644 --- a/packages/sdk/js/src/server.ts +++ b/packages/sdk/js/src/server.ts @@ -53,7 +53,9 @@ export async function createOpencodeServer(options?: ServerOptions) { output += chunk.toString() const lines = output.split("\n") for (const line of lines) { - if (line.startsWith("opencode server listening")) { + // "dcode server listening" for DCode servers; the opencode prefix is + // kept so this launcher still recognizes upstream/legacy servers. + if (line.startsWith("dcode server listening") || line.startsWith("opencode server listening")) { const match = line.match(/on\s+(https?:\/\/[^\s]+)/) if (!match) { clear() diff --git a/packages/sdk/js/src/v2/server.ts b/packages/sdk/js/src/v2/server.ts index 48f1a253da8d..f37de4e60e8b 100644 --- a/packages/sdk/js/src/v2/server.ts +++ b/packages/sdk/js/src/v2/server.ts @@ -53,7 +53,9 @@ export async function createOpencodeServer(options?: ServerOptions) { output += chunk.toString() const lines = output.split("\n") for (const line of lines) { - if (line.startsWith("opencode server listening")) { + // "dcode server listening" for DCode servers; the opencode prefix is + // kept so this launcher still recognizes upstream/legacy servers. + if (line.startsWith("dcode server listening") || line.startsWith("opencode server listening")) { const match = line.match(/on\s+(https?:\/\/[^\s]+)/) if (!match) { clear() From 23211930877ce27e6524f0c23a44ed0be865c680 Mon Sep 17 00:00:00 2001 From: CreatorGhost Date: Sat, 11 Jul 2026 16:55:55 +0530 Subject: [PATCH 7/8] fix(ci): move fork workflows off upstream Blacksmith runners and app credentials --- .github/workflows/generate.yml | 11 +++-------- .github/workflows/nix-eval.yml | 2 +- .github/workflows/storybook.yml | 2 +- .github/workflows/test.yml | 8 ++++---- .github/workflows/typecheck.yml | 2 +- 5 files changed, 10 insertions(+), 15 deletions(-) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 324cfec02001..149d70e0e37d 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -7,7 +7,7 @@ on: jobs: generate: - runs-on: blacksmith-4vcpu-ubuntu-2404 + runs-on: ubuntu-24.04 permissions: contents: write pull-requests: write @@ -18,13 +18,6 @@ jobs: - name: Setup Bun uses: ./.github/actions/setup-bun - - name: Setup git committer - id: committer - uses: ./.github/actions/setup-git-committer - with: - opencode-app-id: ${{ vars.OPENCODE_APP_ID }} - opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }} - - name: Generate run: ./script/generate.ts @@ -34,6 +27,8 @@ jobs: echo "No changes to commit" exit 0 fi + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git add -A git commit -m "chore: generate" --allow-empty git push origin HEAD:${{ github.ref_name }} --no-verify diff --git a/.github/workflows/nix-eval.yml b/.github/workflows/nix-eval.yml index 75332695a1ad..7ac0a4b22ff0 100644 --- a/.github/workflows/nix-eval.yml +++ b/.github/workflows/nix-eval.yml @@ -16,7 +16,7 @@ permissions: jobs: nix-eval: - runs-on: blacksmith-4vcpu-ubuntu-2404 + runs-on: ubuntu-24.04 timeout-minutes: 15 steps: - name: Checkout repository diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index be2e099d0ed9..d61e872301df 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -28,7 +28,7 @@ concurrency: jobs: build: name: storybook build - runs-on: blacksmith-4vcpu-ubuntu-2404 + runs-on: ubuntu-24.04 steps: - name: Checkout repository uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c69de1d93b0d..d26693bfab5d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,9 +28,9 @@ jobs: matrix: settings: - name: linux - host: blacksmith-4vcpu-ubuntu-2404 + host: ubuntu-24.04 - name: windows - host: blacksmith-4vcpu-windows-2025 + host: windows-2025 runs-on: ${{ matrix.settings.host }} defaults: run: @@ -86,9 +86,9 @@ jobs: matrix: settings: - name: linux - host: blacksmith-4vcpu-ubuntu-2404 + host: ubuntu-24.04 - name: windows - host: blacksmith-4vcpu-windows-2025 + host: windows-2025 runs-on: ${{ matrix.settings.host }} env: PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/.playwright-browsers diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index fc9a52797c1d..fc39b3adea51 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -9,7 +9,7 @@ on: jobs: typecheck: - runs-on: blacksmith-4vcpu-ubuntu-2404 + runs-on: ubuntu-24.04 steps: - name: Checkout repository uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 From 379075b69a714ae995c4dfadf37144b9435e1fda Mon Sep 17 00:00:00 2001 From: CreatorGhost Date: Sat, 11 Jul 2026 17:36:27 +0530 Subject: [PATCH 8/8] test(cli): update remaining DCode branding expectations --- packages/opencode/test/cli/cmd/tui/attention.test.ts | 6 +++--- packages/opencode/test/cli/error.test.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/opencode/test/cli/cmd/tui/attention.test.ts b/packages/opencode/test/cli/cmd/tui/attention.test.ts index c8644385abc4..57ed01735f9e 100644 --- a/packages/opencode/test/cli/cmd/tui/attention.test.ts +++ b/packages/opencode/test/cli/cmd/tui/attention.test.ts @@ -161,7 +161,7 @@ describe("createTuiAttention", () => { notification: true, sound: false, }) - expect(renderer.notifications).toEqual([{ title: "opencode", message: "focused" }]) + expect(renderer.notifications).toEqual([{ title: "DCode", message: "focused" }]) }) test("notification can deliver while focused when requested", async () => { @@ -176,7 +176,7 @@ describe("createTuiAttention", () => { sound: true, }) expect(audio.playCalls).toBe(1) - expect(renderer.notifications).toEqual([{ title: "opencode", message: "hello" }]) + expect(renderer.notifications).toEqual([{ title: "DCode", message: "hello" }]) }) test("notifies while blurred", async () => { @@ -238,7 +238,7 @@ describe("createTuiAttention", () => { notification: true, sound: true, }) - expect(renderer.notifications).toEqual([{ title: "opencode", message: "hello again" }]) + expect(renderer.notifications).toEqual([{ title: "DCode", message: "hello again" }]) }) test("can disable notification per call while still playing sound", async () => { diff --git a/packages/opencode/test/cli/error.test.ts b/packages/opencode/test/cli/error.test.ts index b29ca2b3bae1..d73101e8dc1f 100644 --- a/packages/opencode/test/cli/error.test.ts +++ b/packages/opencode/test/cli/error.test.ts @@ -73,7 +73,7 @@ describe("cli.error", () => { const expected = [ "Model not found: anthropic/claude-sonet-4", "Did you mean: claude-sonnet-4", - "Try: `opencode models` to list available models", + "Try: `dcode models` to list available models", "Or check your config (opencode.json) provider/model names", ].join("\n")