- Python 81.7%
- Dockerfile 12.2%
- Shell 6.1%
| build.sh | ||
| Containerfile | ||
| LICENSE | ||
| main.py | ||
| readme.md | ||
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)"