Manage agentic containers and worktrees
  • Python 81.7%
  • Dockerfile 12.2%
  • Shell 6.1%
Find a file
2026-01-01 11:35:26 -07:00
build.sh Add --no-cache build 2025-12-31 22:53:15 -07:00
Containerfile Init 2025-12-31 18:48:00 -07:00
LICENSE Init 2025-12-31 18:48:00 -07:00
main.py Remove stray debugging output 2026-01-01 11:35:26 -07:00
readme.md Add bash completion 2026-01-01 11:22:57 -07:00

Llama Sand! 🦙🏜️

A simple way to manage agents across worktrees and containers. Supports claude code, opencode, and qwencode. We currently support the podman container engine.

Llama Sand is built so that agents won't harm your system, making it easy to run in --yolo mode for instance. Compared to solutions like bubblewrap, you also don't need to worry about the agent accessing things (via read) that it should be, like password stores. However, this means commits must be done by you on the host.

Get Started

Requires podman and python installed.

bash build.sh
podman image ls | grep vibe

To update agentic tools (opencode/qwencode), run the build script again and disable the cache.

bash build.sh --no-cache

This will create a container with all the agentic tools installed. Add the project to your path, for example:

ln -s "$PWD/main.py" ~/.local/bin/llamasand

Now you're ready to get started. Navigate to a git project. Now create a new branch with its own worktree:

llamasand -b fix-readme
llamasand -b patch-linter

Both commands created worktrees and branches in your repo. They have also started up containers and mounted the worktrees into them. You can list all worktree-container pairs with the --list flag:

 $ llamasand -l
Branch                         | Container       | Worktree Path
--------------------------------------------------------------------------------
main                           | -               | /dev/shm/gitdir
fix-readme                     | Running         | /dev/shm/gitdir/fix-readme
patch-linter                   | Running         | /dev/shm/gitdir/patch-linter

Start up an agentic interface in another terminal using the --exec flag. All the configuration files for the agentic coding interfaces have already been mounted.

 $ llamasand -e fix-readme qwen --yolo

You can do this multiple times for the same container. Once you're done with a worktree, commit and merge it from your host. You can remove the branch-container-worktree triplet using the --delete flag.

 $ llamasand -d fix-readme
 $ llamasand -f -d fix-readme  # Discard unmerged changes

Configuration

The following configuration files are mounted read-only into the container:

  • Qwen Code
    • ~/.qwen
    • ./.qwen, at the project root, adjacent to .git
  • Claude Code
    • ~/.claude
    • ./.claude, at the project root, adjacent to .git
  • Opencode
    • ~/.config/opencode/opencode.json
    • ./opencode.json{,c}, at the project root, adjacent to .git

Llama Sand comes with bash completion. Add the following to your ~/.bashrc file:

eval "$(llamasand --completions bash)"