Feature hasn't been suggested before.
Describe the enhancement you want to request
Copy/paste in opencode TUI on Linux requires manual installation of xclip, xsel, or wl-clipboard. New users hit a dead end — opencode says "Copied to clipboard" but nothing is actually copied. They have to google the issue, find the docs, and apt-install dependencies. This is a poor out-of-box experience.
Solution: Ship precompiled static binaries of xclip, xsel, and wl-clipboard inside opencode's npm package. On first launch, opencode detects the environment (X11/Wayland) and symlinks or spawns the appropriate binary automatically — zero user action needed.
Benefits:
- Zero-config UX — opencode just works from
npx opencode, no matter the distro. Huge for beginners and CI/headless environments.
- Cross-distro compatibility — no dependency on apt/yum/pacman. Works on Alpine, NixOS, immutable distros, containers, etc.
- Deterministic behavior — no version mismatches or missing libX11 on minimal systems. Static binaries eliminate "works on my machine".
- CI/Devcontainer friendly — no Dockerfile RUN apt-get install steps. Just
npx opencode and go.
- Windows/macOS parity — those platforms already work out of the box. This closes the gap for Linux users.
Implementation sketch:
- Add a postinstall/build step that downloads prebuilt static binaries from a trusted source (e.g., GitHub releases of xclip/xsel) for the target platform.
- Bundle them under
node_modules/opencode/bin/.
- In clipboard.ts, try the bundled binary first, then fall back to system PATH.
This is a common pattern — tools like puppeteer bundle Chromium, esbuild bundles its native binary, and vscode bundles its own clipboard helpers.
Feature hasn't been suggested before.
Describe the enhancement you want to request
Copy/paste in opencode TUI on Linux requires manual installation of xclip, xsel, or wl-clipboard. New users hit a dead end — opencode says "Copied to clipboard" but nothing is actually copied. They have to google the issue, find the docs, and apt-install dependencies. This is a poor out-of-box experience.
Solution: Ship precompiled static binaries of xclip, xsel, and wl-clipboard inside opencode's npm package. On first launch, opencode detects the environment (X11/Wayland) and symlinks or spawns the appropriate binary automatically — zero user action needed.
Benefits:
npx opencode, no matter the distro. Huge for beginners and CI/headless environments.npx opencodeand go.Implementation sketch:
node_modules/opencode/bin/.This is a common pattern — tools like
puppeteerbundle Chromium,esbuildbundles its native binary, andvscodebundles its own clipboard helpers.