2026-07-30 07:01:22 +02:00
|
|
|
# opencode & opencode-desktop
|
2026-01-13 21:09:02 +01:00
|
|
|
|
2026-07-30 07:01:22 +02:00
|
|
|
## opencode (CLI)
|
2026-01-13 21:09:02 +01:00
|
|
|
|
2026-07-30 07:01:22 +02:00
|
|
|
The standalone `opencode` CLI is **not** packaged here. Use the well-maintained
|
|
|
|
|
upstream flake instead:
|
2026-01-13 21:09:02 +01:00
|
|
|
|
2026-03-07 10:46:06 +01:00
|
|
|
**[numtide/llm-agents.nix](https://github.com/numtide/llm-agents.nix)**
|
2026-01-13 21:09:02 +01:00
|
|
|
|
|
|
|
|
```nix
|
|
|
|
|
{
|
2026-07-30 07:01:22 +02:00
|
|
|
inputs.llm-agents.url = "github:numtide/llm-agents.nix";
|
2026-01-13 21:09:02 +01:00
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-03-07 10:46:06 +01:00
|
|
|
nix run github:numtide/llm-agents.nix#opencode
|
2026-01-13 21:09:02 +01:00
|
|
|
```
|
|
|
|
|
|
2026-07-30 07:01:22 +02:00
|
|
|
## opencode-desktop
|
2026-01-13 21:09:02 +01:00
|
|
|
|
2026-07-30 07:01:22 +02:00
|
|
|
`opencode-desktop` is provided as a **pure pass-through** from the upstream
|
|
|
|
|
flake input [`anomalyco/opencode`](https://github.com/anomalyco/opencode)
|
|
|
|
|
(tracked on the `dev` branch). It is the official Electron desktop app built
|
|
|
|
|
upstream via `nix/desktop.nix`.
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
nix build git+https://code.m3ta.dev/m3tam3re/nixpkgs#opencode-desktop
|
|
|
|
|
nix run git+https://code.m3ta.dev/m3tam3re/nixpkgs#opencode-desktop
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### How it is wired
|
|
|
|
|
|
|
|
|
|
- **Flake input** (`flake.nix`):
|
|
|
|
|
|
|
|
|
|
```nix
|
|
|
|
|
opencode.url = "github:anomalyco/opencode/dev";
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
It intentionally does **not** follow this repo's `nixpkgs`: upstream pins a
|
|
|
|
|
`node_modules` fixed-output derivation hash in `nix/hashes.json` against its
|
|
|
|
|
own nixpkgs snapshot, so following would risk FOD hash mismatches.
|
|
|
|
|
|
|
|
|
|
- **Registry** (`pkgs/default.nix`):
|
|
|
|
|
|
|
|
|
|
```nix
|
|
|
|
|
opencode-desktop = inputs.opencode.packages.${system}.opencode-desktop;
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
No local derivation exists — the package is imported as-is.
|
|
|
|
|
|
|
|
|
|
### Wayland
|
|
|
|
|
|
|
|
|
|
The upstream wrapper already passes `--ozone-platform-hint=auto` (plus Wayland
|
|
|
|
|
window decorations and IME flags) when `NIXOS_OZONE_WL` is set, so no local
|
|
|
|
|
Wayland wrapper is required.
|