Compare commits

...
3 Commits
Author SHA1 Message Date
Dax Raad 0f26ad8787 fix(cli): keep opencode2 as a working alias 2026-09-11 20:55:03 -04:00
Dax Raad b08ad82518 fix(cli): clarify opencode2 rename guidance 2026-09-11 20:50:20 -04:00
Dax 5319f063d6 docs: use stable V2 packages (#48576) 2026-09-11 20:33:18 -04:00
13 changed files with 22 additions and 28 deletions
+3 -4
View File
@@ -366,15 +366,14 @@ install_legacy_shim() {
if [[ "$shim_os" == "windows" ]]; then
cat > "$INSTALL_DIR/opencode2.cmd" <<'EOF'
@echo off
echo opencode2 is now just opencode. run opencode
exit /b 1
"%~dp0opencode.exe" %*
exit /b %errorlevel%
EOF
return
fi
cat > "$INSTALL_DIR/opencode2" <<'EOF'
#!/bin/sh
echo 'opencode2 is now just opencode. run opencode'
exit 1
exec "$(dirname "$0")/opencode" "$@"
EOF
chmod 755 "$INSTALL_DIR/opencode2"
}
+1 -1
View File
@@ -12,5 +12,5 @@ COPY dist/cli-linux-arm64-musl/bin/opencode /usr/local/bin/opencode
ARG TARGETARCH
FROM build-${TARGETARCH}
RUN opencode --version
RUN ln -s opencode /usr/local/bin/opencode2 && opencode --version && opencode2 --version
ENTRYPOINT ["opencode"]
+1 -2
View File
@@ -1,4 +1,3 @@
#!/usr/bin/env node
console.log("opencode2 is now just opencode. run opencode")
process.exit(1)
require("./opencode.cjs")
+3 -1
View File
@@ -17,7 +17,9 @@ const outdir = path.join(root, `aur-${name}`)
const dryRun = process.argv.includes("--dry-run")
const pkgver = Script.version.replaceAll("-", ".")
const license = Bun.file(path.join(dir, "..", "..", "LICENSE"))
const shim = "#!/bin/sh\necho 'opencode2 is now just opencode. run opencode'\nexit 1\n"
const shim = `#!/bin/sh
exec "$(dirname "$0")/opencode" "$@"
`
await rm(outdir, { recursive: true, force: true })
await mkdir(path.dirname(outdir), { recursive: true })
+1 -5
View File
@@ -60,17 +60,13 @@ async function publishDistribution(input: {
"",
].join("\n"),
)
if (input.legacyCommand)
await Bun.file(`${input.root}/${input.name}/bin/${input.legacyCommand}.cjs`).write(
`#!/usr/bin/env node\n\nconsole.log(${JSON.stringify(`opencode2 is now just opencode. run ${input.command}`)})\nprocess.exit(1)\n`,
)
await Bun.file(`${input.root}/${input.name}/package.json`).write(
JSON.stringify(
{
name: input.name,
bin: {
[input.command]: `./bin/${input.command}.exe`,
...(input.legacyCommand ? { [input.legacyCommand]: `./bin/${input.legacyCommand}.cjs` } : {}),
...(input.legacyCommand ? { [input.legacyCommand]: `./bin/${input.command}.exe` } : {}),
},
...(input.command !== input.binary ? { opencodeSourceBinary: input.binary } : {}),
scripts: { postinstall: "node ./postinstall.mjs" },
@@ -6,7 +6,7 @@ title: "Effect"
and decodes responses into OpenCode schema values.
```sh
bun add @opencode/client@beta effect
bun add @opencode/client effect
```
## Create a client
@@ -10,7 +10,7 @@ network. Its native types and methods are generated from the same contract as th
## Install
```sh
bun add @opencode/client@beta
bun add @opencode/client
```
## Create a client
@@ -7,7 +7,7 @@ Effects or Streams, callbacks return Effects, and plugin lifetime is represented
plugin package.
```sh
bun add @opencode/plugin@beta effect
bun add @opencode/plugin effect
```
Export an Effect plugin from `.opencode/plugins/` to load it automatically.
@@ -6,7 +6,7 @@ Use `@opencode/sdk/workerd` inside a Cloudflare Durable Object. This profile use
persists durable events for eviction recovery, and replaces unavailable local filesystem and process services.
```sh
bun add @opencode/sdk@beta
bun add @opencode/sdk
```
Hold one host for the lifetime of the Durable Object instance instead of creating one for every request.
@@ -6,7 +6,7 @@ title: "Effect"
the owning Scope releases the router, Location services, fibers, and plugin registrations.
```sh
bun add @opencode/sdk@beta effect
bun add @opencode/sdk effect
```
## Create a host
@@ -12,7 +12,7 @@ For Cloudflare Durable Objects, see the [Cloudflare guide](/build/sdk/cloudflare
Install the SDK:
```sh
bun add @opencode/sdk@beta
bun add @opencode/sdk
```
## Create a host
@@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install --global @opencode/cli@beta
- run: npm install --global @opencode/cli
- run: opencode run --standalone --model anthropic/claude-sonnet-4-5 "Review this repository for correctness and summarize any issues."
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
+6 -8
View File
@@ -10,11 +10,10 @@ OpenCode installs and runs as `opencode`.
<div data-install-code>
<CodeBlock
code={`$ npm install -g @opencode/cli@beta
$ bun install -g --trust @opencode/cli@beta
$ pnpm add -g --allow-build=@opencode/cli @opencode/cli@beta
$ yarn global add @opencode/cli@beta
$ paru -S opencode-beta
code={`$ npm install -g @opencode/cli
$ bun install -g --trust @opencode/cli
$ pnpm add -g --allow-build=@opencode/cli @opencode/cli
$ yarn global add @opencode/cli
$ curl -fsSL https://opencode.ai/v2/install | bash`}
/>
</div>
@@ -22,10 +21,9 @@ $ curl -fsSL https://opencode.ai/v2/install | bash`}
The npm package uses a trusted postinstall script to select the native `opencode` binary for your platform. The Bun and pnpm
commands above explicitly allow that script to run.
On Arch Linux, install [`opencode-beta`](https://aur.archlinux.org/packages/opencode-beta) from the AUR with `paru`.
It provides the `opencode` command; manage updates through your AUR helper.
Docker images use versioned tags, for example `ghcr.io/anomalyco/opencode:2.0.0`.
Homebrew, Windows package managers, Docker, and standalone binaries are not supported.
Homebrew, AUR, Windows package managers, and standalone binaries are not supported.
---