[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-112692":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":12,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":17,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":19,"hasPages":19,"topics":21,"createdAt":9,"pushedAt":22,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":14,"starSnapshotCount":14,"syncStatus":13,"lastSyncTime":26,"discoverSource":27},112692,"opencode-native-preview","simonklee\u002Fopencode-native-preview","simonklee","OpenCode Native CLI Preview builds",null,"TypeScript",109,5,2,0,1,16,4,45.43,false,"main",[],"2026-11-23 13:27:02","2026-11-23 10:04:25","# OpenCode native CLI preview builds\n\nThe OpenCode native CLI, `opencode-native`, is a Rust client for [OpenCode](https:\u002F\u002Fgithub.com\u002Fanomalyco\u002Fopencode),\nbuilt from its `oc-rust` branch. Each build is an unsigned\n[prerelease](https:\u002F\u002Fgithub.com\u002Fsimonklee\u002Fopencode-native-preview\u002Freleases) for Linux x64, Linux arm64, macOS arm64,\nand Windows x64, for testers. macOS x64 and Windows arm64 builds are new: a release has them when they passed their\nsmoke tests.\n\n## Startup and memory\n\n![opencode 2.2.7 and opencode-native side by side, attaching to a running server and answering one prompt](docs\u002Fdemo-7e86153a.gif)\n\n[Watch as video](docs\u002Fdemo-2a83f6c8.mp4) (MP4, 1080p).\n\nThe client alone, against a TypeScript server that is already running (median of 8 runs):\n\n| | `opencode` 2.2.7 | `opencode-native` 0.0.0-rs-2 |\n|---|---|---|\n| time to first frame | 118 ms | 5.8 ms |\n| client peak memory, 20 prompts | 319 MB | 44 MB |\n| client CPU time, 20 prompts | 3.92 s | 0.17 s |\n\n\u003Cpicture>\n  \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"docs\u002Fclient-dark-6333b461.svg\">\n  \u003Cimg alt=\"Client only, server already running. Startup: Native 5.8 ms, TypeScript 118 ms. Memory: Native 44 MB, TypeScript 319 MB. CPU: Native 0.17 s, TypeScript 3.92 s.\" src=\"docs\u002Fclient-a83396f7.svg\">\n\u003C\u002Fpicture>\n\nThe client starts its own server (`--standalone`):\n\n| | `opencode` 2.2.7 | `opencode-native` 0.0.0-rs-2 |\n|---|---|---|\n| time to first frame | 314 ms | 219 ms |\n| client + server peak memory | 604 MB | 410 MB |\n| client + server CPU time, 20 prompts | 6.93 s | 2.79 s |\n\n\u003Cpicture>\n  \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"docs\u002Fstandalone-dark-7e0503a0.svg\">\n  \u003Cimg alt=\"Client starts its own server. Startup: Native 219 ms, TypeScript 314 ms. Memory: Native 44 MB client, 410 MB with the server; TypeScript 306 MB client, 604 MB with the server.\" src=\"docs\u002Fstandalone-f00f005b.svg\">\n\u003C\u002Fpicture>\n\n`opencode-native` replaces only the client: the TypeScript server holds 374 of its 410 MB. The method, raw data, and\nmachine (AMD Ryzen 7 9800X3D, Linux) are in [docs\u002Fbenchmark.md](docs\u002Fbenchmark.md).\n\n## How it works\n\n`opencode-native` uses OpenTUI's Rust bindings, which drive the same native library as the TypeScript CLI's\n`@opentui\u002Fcore`. So the screens, keys, and themes match, and a parity harness compares the two clients. It talks to\nthe same TypeScript server: it finds or starts the background service, `--server \u003Curl>` attaches to one, and\n`--standalone` starts a private one. Sessions and `cli.json` are shared.\n\nWhat differs:\n\n- Server plugins run in the TypeScript server and work as before.\n- TypeScript TUI plugins do not run; `\u002Fplugins` lists them as skipped.\n- Native TUI plugins (`.so`, `.dylib`) load instead: see the\n  [quick start](https:\u002F\u002Fgithub.com\u002Fanomalyco\u002Fopencode\u002Fblob\u002Foc-rust\u002Fpackages\u002Fcli-rs\u002Fcrates\u002Fplugin-abi\u002FREADME.md).\n- `opencode-native upgrade` does not update a preview build; re-run the install script.\n- There is no `\u002Frestart`; use `opencode-native service restart`.\n- HTTPS trusts the system's root certificates; `NODE_EXTRA_CA_CERTS` is ignored.\n- 14 languages are syntax-highlighted; others show as plain text.\n\nThe full list is in\n[`parity\u002Fdeviations`](https:\u002F\u002Fgithub.com\u002Fanomalyco\u002Fopencode\u002Ftree\u002Foc-rust\u002Fpackages\u002Fcli-rs\u002Fparity\u002Fdeviations).\n\n## Install\n\n```sh\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fsimonklee\u002Fopencode-native-preview\u002Fmain\u002Finstall.sh | bash\n```\n\nThis checks the newest build against `SHA256SUMS` and installs it to `~\u002F.local\u002Fbin\u002Fopencode-native` (or\n`$OPENCODE_NATIVE_INSTALL_DIR`). Run it again to update. Linux builds need glibc 2.35 or newer. To verify an archive's\nbuild attestation: `gh attestation verify opencode-native-\u003Cversion>-\u003Ctarget>.tar.gz --repo simonklee\u002Fopencode-native-preview`.\n\nOn Debian and Ubuntu, download the `.deb` from the [latest release](https:\u002F\u002Fgithub.com\u002Fsimonklee\u002Fopencode-native-preview\u002Freleases)\nand run `sudo apt install .\u002Fopencode-native_*.deb`.\n\nEach archive holds OpenCode's `LICENSE`, `THIRD-PARTY-NOTICES.txt` (the licences of the Rust crates in the binary,\nthe tree-sitter grammars among them, and of the sources of its highlight queries) and `licenses\u002Fopentui\u002F` (OpenTUI's licence and those of what its native library\ncarries, as its release ships them: FFmpeg under the LGPL with its source in `FFMPEG-SOURCE.md`, zlib, Ghostty,\nlibwebp, Wuffs, stb, Little CMS and others).\nThe `.deb` installs them in `\u002Fusr\u002Fshare\u002Fdoc\u002Fopencode-native`. The install script installs only the binary.\n\n## Requirements\n\nInstall the TypeScript CLI, 2.2.7 or newer, on `PATH` (or set `OPENCODE_TS_BIN` to it): `npm i -g @opencode\u002Fcli`.\nTo keep the client's tabs apart from `opencode`'s, set `OPENCODE_TUI_CHANNEL=native-preview`.\n\n## macOS\n\nThe binary has only an ad-hoc signature. If you downloaded an archive with a browser, run\n`xattr -d com.apple.quarantine opencode-native`.\n\n## Windows\n\nDownload `opencode-native-\u003Cversion>-x86_64-pc-windows-msvc.zip` (or `aarch64-pc-windows-msvc` on Arm) from the\n[latest release](https:\u002F\u002Fgithub.com\u002Fsimonklee\u002Fopencode-native-preview\u002Freleases) and extract it; if it holds `opentui.dll`,\nkeep it next to `opencode-native.exe`. If Windows blocks the download, run `Unblock-File` on the zip before extracting. Install the\nTypeScript CLI with `npm i -g @opencode\u002Fcli`. Each build is tested on GitHub's Windows Server 2025 runner (Arm: Windows\n11 Arm), with the TUI on a pseudoconsole (ConPTY); no other terminal is tested.\n\n## Reporting bugs\n\nInclude the output of `opencode-native --version` and the end of `~\u002F.local\u002Fshare\u002Fopencode\u002Flog\u002Fopencode.log`.\n","OpenCode Native CLI 是一个基于 Rust 实现的 OpenCode 命令行客户端，用于替代原 TypeScript 版本的 `opencode` CLI，提供更优的启动性能、内存占用与 CPU 效率。其核心特点是复用 OpenTUI 的 Rust 绑定，确保与原版一致的终端界面、按键响应和主题表现，并完全兼容现有 TypeScript 后端服务；支持共享配置、会话及插件机制（仅运行原生 TUI 插件）。适用于对 CLI 响应速度和资源消耗敏感的开发者本地编码辅助场景，尤其适合频繁调用 OpenCode 进行代码理解、生成或调试的终端工作流。","2026-11-24 04:43:50","CREATED_QUERY"]