rtk-ai/rtk

Set path to opencode installation

Open

#692 opened on 2026年3月18日

GitHub で見る
 (1 comment) (2 reactions) (0 assignees)Rust (2,914 forks)batch import
area:clienhancementhelp wantedpriority:low

Repository metrics

Stars
 (48,085 stars)
PR merge metrics
 (平均マージ 11d 1h) (30d で 45 merged PRs)

説明

I use opencode with bubblewrap like this:

❯ npm install --prefix ~/opencode/ -g opencode-ai@latest
❯ cat ~/bin/opencode.sh
#!/usr/bin/env bash
set -euo pipefail

mkdir -p $HOME/opencode/home

echo "nameserver 9.9.9.9" > $HOME/opencode/resolv.conf
echo "PWD: $(pwd)"

# XXX vnode on my box
bwrap --ro-bind /usr /usr \
      --dir /tmp \
      --dir /var \
      --symlink ../tmp var/tmp \
      --proc /proc \
      --dev /dev \
      --symlink usr/lib /lib \
      --symlink usr/lib64 /lib64 \
      --symlink usr/bin /bin \
      --symlink usr/sbin /sbin \
      --unshare-all \
      --share-net \
      --die-with-parent \
      --new-session \
      --dir /run/user/$(id -u) \
      --setenv XDG_RUNTIME_DIR "/run/user/`id -u`" \
      --setenv PS1 "bwrap$ " \
      --ro-bind /opt/vnode/bin /opt/vnode/bin \
      --ro-bind $HOME/opencode/resolv.conf /etc/resolv.conf \
      --ro-bind /etc/hosts /etc/hosts \
      --ro-bind /etc/nsswitch.conf /etc/nsswitch.conf \
      --ro-bind /etc/passwd /etc/passwd \
      --ro-bind /etc/group /etc/group \
      --ro-bind /etc/localtime /etc/localtime \
      --ro-bind /etc/ssl /etc/ssl \
      --ro-bind-try /etc/ca-certificates /etc/ca-certificates \
      --bind $HOME/opencode/home $HOME \
      --ro-bind $HOME/opencode $HOME/opencode \
      --ro-bind $HOME/.local $HOME/host/.local \
      --setenv HOME $HOME \
      --setenv PATH $HOME/opencode/bin:$HOME/host/.local/bin:/opt/vnode/bin:$PATH \
      --bind $(pwd) /work \
      --chdir /work \
      opencode $@

now i just found rtk but how can i specify where rtk init -g --opencode installs the plugin?

コントリビューターガイド