Personal development environment. One command to set up a new machine.
(command -v git >/dev/null 2>&1 || { s=""; [ "$(id -u)" -ne 0 ] && s="sudo"; (command -v apt-get >/dev/null 2>&1 && $s apt-get update && $s apt-get install -y git) || (command -v dnf >/dev/null 2>&1 && $s dnf install -y git) || (command -v yum >/dev/null 2>&1 && $s yum install -y git) || (command -v apk >/dev/null 2>&1 && $s apk add --no-cache git bash curl) || (command -v pacman >/dev/null 2>&1 && $s pacman -Sy --noconfirm git) || (command -v zypper >/dev/null 2>&1 && $s zypper --non-interactive install git) || { echo "install git manually" >&2; exit 1; }; }) && ([ -d "$HOME/box/.git" ] || git clone https://github.com/Baltsat/box.git "$HOME/box") && cd "$HOME/box" && git fetch origin && git reset --hard origin/main && rm -f ~/.box_setup_done && (./setup.sh || (unset NIX_REMOTE NIX_DAEMON_SOCKET_PATH; NIX_REMOTE=local ./setup.sh)) && exec "$SHELL" -lFresh machine:
git clone https://github.com/Baltsat/box.git ~/box && ~/box/setup.shUpdate existing box:
cd ~/box && git fetch origin && git reset --hard origin/main && rm -f ~/.box_setup_done && ./setup.sh- Installs Nix + Homebrew (macOS)
- Decrypts secrets (API keys, SSH keys, tokens)
- Configures macOS system settings (dock, keyboard, trackpad, etc.)
- Installs all packages and apps via Nix and Homebrew
- Sets up shell (zsh, starship prompt, aliases)
- Symlinks config files to proper locations
- Configures AI coding agents (Claude, Codex, Pi, Gemini, Copilot, Cursor, Windsurf)
- Sets up multi-agent delegation infrastructure (delegate MCP)
- Syncs
GLOBAL.mdas global AI instructions across all agents
~/box/
├── flake.nix # nix flake entry point
├── macos.nix # macOS system settings + homebrew casks/brews
├── linux.nix # linux home-manager config
├── shared.nix # packages for both platforms
├── setup.sh # one-command setup (entry point)
├── GLOBAL.md # global AI agent instructions
├── CLAUDE.md # repo-specific agent instructions
│
├── tools/
│ ├── aliases.sh # shell aliases and functions
│ ├── zshrc # zsh config (symlinked to ~/.zshrc)
│ ├── starship.toml # prompt config
│ ├── secrets.sh # encrypt/decrypt/edit secrets
│ ├── code-quality.sh # static analysis runner
│ ├── gitconfig # git config
│ ├── tmux.conf # tmux config
│ │
│ ├── claude.json # claude code settings + hooks
│ ├── claude/ # claude agents, skills, statusline
│ ├── codex.toml # codex settings
│ ├── codex-hooks.json # codex hook config
│ ├── pi/ # pi agent settings + extensions
│ ├── gemini/ # gemini settings
│ ├── copilot/ # github copilot config
│ ├── cursor/ # cursor editor settings
│ ├── windsurf/ # windsurf settings
│ ├── vscode/ # vscode settings
│ ├── zed/ # zed settings
│ │
│ ├── hooks/ # claude code hooks (formatting, security, quality)
│ ├── adversarial-review/ # cross-model code review system
│ ├── delegate-mcp/ # multi-agent delegation server
│ └── tokf/ # token filter tool
│
├── script/
│ ├── files.ts # symlinks configs to proper locations
│ ├── precommit.sh # pre-commit formatters
│ ├── hardening.sh # server hardening script
│ └── macos.ts # macOS-specific setup helpers
│
├── .env.sops # encrypted secrets (committed)
├── .env.template # secret key template (committed)
└── .env # decrypted secrets (gitignored)
setup.sh configures multiple AI coding agents with shared conventions:
- Claude Code — primary agent. hooks for auto-formatting, secret scanning, static analysis, workflow enforcement
- Codex — secondary agent. hooks for git safety and debug cleanup
- Pi — unified interface to copilot, gemini-cli, GLM-5 with auto-failover
- Delegate MCP — MCP server enabling agents to delegate work to each other across models
- Adversarial Review — cross-model code review (claude reviews codex's work and vice versa)
Agent configs live in tools/ and get symlinked by script/files.ts.
mssh wrapper for mosh with automatic SSH fallback:
mssh user@server
mssh my-ssh-aliasUses mosh when available, falls back to SSH on failure. Tracks unhealthy hosts to avoid repeated mosh failures. Override with MSSH_FORCE_MOSH=1.
~/box/tools/secrets.sh decrypt # decrypt to .env
~/box/tools/secrets.sh encrypt # encrypt .env to .env.sops
~/box/tools/secrets.sh edit # edit secrets in $EDITOR
~/box/tools/secrets.sh rekey # change encryption password- Packages:
shared.nix - macOS settings:
macos.nix - Homebrew apps:
homebrew.casksinmacos.nix - Aliases:
tools/aliases.sh - AI agent settings:
tools/claude.json,tools/codex.toml,tools/pi/settings.json
After changes: ./setup.sh