Skip to content

xendarboh/xendev

Repository files navigation

xen/dev:latest

GPLv3 License

Overpowered dotfiles in a box. A sandboxed, GPU-accelerated, terminal-first development environment.

Run it as a:

  • GPU-accelerated terminal with clipboard integration ← recommended
  • TTY-only terminal for headless servers
  • Full desktop environment in a window (x11docker)
  • Docker-in-Docker environment for nested containers (sysbox)

Developed on and for Linux. Other platforms untested.

Quickstart

git clone https://github.com/xendarboh/xendev.git ~/src/xendev
cd ~/src/xendev
cp .env-example .env                 # edit to enable optional tools
cp -a conf.local-example conf.local  # local overrides (see Customization)
make build
./xendev

Philosophy

  • Open Source!
  • Latest greatest terminal tools, LTS versions, vi-bindings
  • Unified theming via tinty with native Neovim colorscheme sync
  • Reproducible environment from Ubuntu base
  • Security via sandboxing with analog control over isolation vs. functionality

Host Dependencies

Dependency Required For Notes
docker or podman Core Container runtime
docker compose Building Build orchestration
make Building Recommended; or run Makefile commands manually
x11docker max, min, sys modes Not needed for tty mode
sysbox sys mode Recommended for Docker-in-Docker
rofi / dmenu / fzf Launcher Any one; detected in order
Nerd Font tty mode Container provides fonts for GUI modes
Docker Model Runner Local AI (optional) GPU-accelerated inference via nvidia-container-toolkit, etc

Run

Launcher

The ./xendev launcher provides an interactive menu (via rofi, dmenu, or fzf) for selecting modes, naming containers, and toggling volume mounts.

Mode Description X11 GPU Use Case
max Most host integration, direct GPU Yes Direct Daily development
min Minimal host integration, fallback GPU Yes Fallback Sandboxed agents, untrusted code
sys Docker-in-Docker via sysbox Yes Fallback Stronger isolation, run containers
tty TTY-only, no X11 No No Headless servers, SSH sessions

All modes are containerized and sandboxed; the difference is capability and host integration.

Selector: The launcher probes for an available selector. Override with XENDEV_SELECTOR or ./xendev -s fzf.

No Launcher

Run directly without the interactive menu, for example:

# GPU-accelerated terminal with clipboard
x11docker --gpu --clipboard --network --user=RETAIN -- --tmpfs=/tmp:exec -- xen/dev

# Full desktop in a window
x11docker --desktop --gpu --clipboard --network -- xen/dev

# TTY-only (no x11docker needed)
docker run -it --rm --network=host xen/dev

Docker-in-Docker (Sysbox)

The sys mode uses sysbox for secure, rootless Docker-in-Docker without --privileged.

Tradeoffs: No direct GPU (uses --gpu fallback), bridged networking (no --network=host).

Persistence: Inner Docker data stored at ~/.local/share/xendev/sysbox/var-lib-docker.

Tools

Powered By

  • x11docker: Secure GUI containers
  • Sysbox: Rootless system containers, enabling Docker-in-Docker
  • Xen: Elven Tech Wizard

Editor & Plugins

AI/Agentic Coding

Shell & Terminal

  • ack: Grep-like tool for searching code
  • bat: A cat(1) clone with syntax highlighting
  • btop: Resource monitor with GPU support
  • exa: Modern replacement for 'ls'
  • fd: Simple, fast alternative to 'find'
  • fish-shell: User-friendly command line shell
  • fzf: Command-line fuzzy finder
  • htop: Interactive process viewer
  • jq: Command-line JSON processor
  • ripgrep: Fast regex search respecting gitignore
  • silversearcher-ag: Code search faster than ack
  • ShellCheck: Shell script static analysis tool
  • spacer: Insert spacers in command output
  • starship: Minimal, fast, customizable prompt
  • stow: Symlink farm manager
  • tinty: Unified colorscheme manager for 70+ apps
  • tmux: Terminal multiplexer
  • tree: Directory tree viewer
  • zoxide: Smarter cd command

Git & Version Control

  • diff-so-fancy: Best-lookin' diffs
  • git: Latest stable version
    • gh: GitHub's official CLI
    • git-absorb: Automatic fixup commits
    • git-crypt: Transparent file encryption [fork]
    • git-filter-repo: Rewrite git history fast
      • gfr-bfg-ish: BFG Repo Cleaner reimplementation
      • gfr-clean-ignore: Remove gitignored files from history
      • gfr-insert-beginning: Insert a file at history start
      • gfr-lint-history: Lint all non-binary files across history
      • gfr-signed-off-by: Add Signed-off-by tags to commit range
    • git-lfs: Large file versioning
    • lazygit: Terminal UI for git

Languages & Runtimes

  • Bun: Fast JS runtime, bundler, test runner, package manager
  • Deno: Modern JavaScript/TypeScript runtime
  • Go: The Go programming language
  • LLVM: Clang toolchain (INSTALL_LLVM)
  • Nix: Purely functional package manager (INSTALL_NIX)
  • Node.js: JavaScript runtime
    • fnm: Fast Node.js version manager
    • npm-check-updates: Find newer package versions
    • npm-check: Check for outdated dependencies
    • pnpm: Fast, disk space efficient package manager
    • yarn: Dependency management
  • Python: Programming language
    • uv: Extremely fast Python package and project manager
  • Ruby: Dynamic programming language
    • rake: Ruby build automation tool
  • Rust: Reliable and efficient software

ZK & Blockchain

  • circom: zkSnark circuit compiler (INSTALL_CIRCOM)
  • Noir: DSL for zero knowledge proofs (INSTALL_NOIR)
  • Solidity: Smart contract language

DevOps (INSTALL_DEVOPS)

Utilities

X11 Desktop

Sysbox Runtime

Built-in Scripts

Scripts in bin/ are available inside the container:

  • x-ai: Query the local LLM (Docker Model Runner) directly from the terminal
  • x-git-commit: AI-generated conventional git commit messages
    • auto-selects local LLM (DMR) when available, falls back to opencode
    • opens editor (neovim) with N alternatives for final selection
    • invoke from lazygit with CTRL+a

Runtime Scripts

Optional tools installed on-demand via setup.d/:

  • Aztec: Privacy-first L2 (requires sys mode)
  • WhisperX: Speech recognition with timestamps

Build

Configure

Edit .env to set versions and enable optional tools (copy from .env-example).

Build Images

make build      # Full image with X11 support
make build-tty  # TTY-only image (smaller, no X11)
make help       # All available targets

Customization

Dotfiles

  • conf/ — Built-in configs, shipped with xendev source, baked into image
  • conf.local/ — Your customizations go here; gitignored, volume-mapped at runtime

Both directories are stow'd to the user's home directory at container start (ex: conf.local/.aws/~/.aws/).

cp -a conf.local-example conf.local

Notable files in conf.local/, for example:

File Purpose
xendev/bash.sh Custom env vars (GH_TOKEN, FLEEK_API_KEY, etc.)
xendev/directory_map.txt Path mappings for tmux/kitty CWD preservation
.wakatime.cfg Wakatime/Wakapi config
.aws/ AWS credentials

Git Config

Include xendev's git config conditionally:

# ~/.config/git/config
[includeIf "gitdir:/home/xendev"]
  path = ~/src/xendev/conf/gitconfig

Themes

Colorschemes are managed by tinty, providing unified theming across apps.

Set OPTIONS_THEME in .env for the image build-time default.

Neovim listens for theme changes and applies the corresponding native plugin (tokyonight, gruvbox) when available.

Change theme at runtime:

tinty cycle                          # cycle through preferred schemes
tinty apply base24-tokyo-night-dark  # or any scheme from `tinty list`

Tests

Verify terminal capabilities with scripts in test/:

./test/truecolor.sh  # Terminal color support
./test/glyphs.sh     # Nerd font rendering
./test/italics.sh    # Italic text
./test/gpg.sh        # GPG volume mapping

Local AI Models

Run local AI model(s) with Docker Model Runner and interact via Open WebUI, OpenCode, or bin/x-ai. Optional, independent of the main xendev build.

Quick Start

# Edit MODELS_* vars in .env (see .env-example) to configure the model
make models-up
# Access open-webui at http://localhost:12444

Model downloads on first start. See docker model list and use docker model for management.

For more models, check out the published Docker Hub AI models or Hugging Face Transformers (compatible with Docker Model Runner). Pull any model with docker model pull and set MODELS_PRIMARY to your chosen image.

Configuration

Variable Description
MODELS_PRIMARY Model (any docker model pull compatible)
MODELS_WEBUI_PORT Open WebUI port

Management

make models-up      # Start docker containers (detached)
make models-down    # Stop
make models-logs    # Follow logs
make models-status  # Show containers

About

Sandboxed, GPU-accelerated terminal development environment

Topics

Resources

License

Stars

Watchers

Forks

Contributors