Skip to content

randommm/opencode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Opencode with tools

Just Opencode in a container with some tools.

Usage:

podman run -it --rm \
  -v "$(pwd):/work$(pwd):Z" \
  -w "/work$(pwd)" \
  -v "$HOME/.local/share/opencode:/root/.local/share/opencode:Z" \
  -v "$HOME/.local/state/opencode:/root/.local/state/opencode:Z" \
  -v "$HOME/.config/opencode:/root/.config/opencode:Z" \
  -v "$HOME/.cache/opencode:/root/.cache/opencode:Z" \
  -v /tmp/.X11-unix:/tmp/.X11-unix:ro \
  -v $HOME/.Xauthority:/root/.Xauthority:ro \
  -e DISPLAY=$DISPLAY \
  -e OPENCODE_DISABLE_AUTOUPDATE=true \
  -e GIT_COMMITTER_NAME="Your Name" \
  -e GIT_COMMITTER_EMAIL="your@email.com" \
  -e EDITOR="gnome-text-editor" \
  -e ADW_DEBUG_COLOR_SCHEME="prefer-dark" \
  --security-opt=no-new-privileges \
  ghcr.io/randommm/opencode

You might need to create the dirs first:

mkdir -p \
  $HOME/.local/share/opencode \
  $HOME/.local/state/opencode \
  $HOME/.config/opencode \
  $HOME/.cache/opencode

You might also want to add more bind to you podman command, e.g.:

  -v $HOME/.cache/uv:/root/.cache/uv \
  -v $HOME/.local/share/uv:/root/.local/share/uv \
  -v $HOME/.cache/pip:/root/.cache/pip \
  -v $HOME/.cache/huggingface:/root/.cache/huggingface \

Clipboard support

These lines were added to enable clipboard support (and to use gnome-text-editor when calling /editor):

  -v /tmp/.X11-unix:/tmp/.X11-unix:ro \
  -v $HOME/.Xauthority:/root/.Xauthority:ro \
  -e DISPLAY=$DISPLAY \

If you don't use them, you will need an OSC52 compliant terminal for clipboard to work, e.g.: kitty, konsole, ghostty.

About

Just Opencode in a container with some tools.

Resources

License

Apache-2.0, CC0-1.0 licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
CC0-1.0
LICENSE-CC0

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors