# opencode & opencode-desktop ## opencode (CLI) The standalone `opencode` CLI is **not** packaged here. Use the well-maintained upstream flake instead: **[numtide/llm-agents.nix](https://github.com/numtide/llm-agents.nix)** ```nix { inputs.llm-agents.url = "github:numtide/llm-agents.nix"; } ``` ```bash nix run github:numtide/llm-agents.nix#opencode ``` ## opencode-desktop `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.