Scripts to create and provision KVM virtual machines as AI-assisted developer environments.
A provisioned VM includes:
- Claude CLI (
claude) — Anthropic's Claude Code CLI - GitHub Copilot CLI (
gh copilot) — AI pair programmer in the terminal - GitHub CLI (
gh) — repo and PR management - Android Studio — mobile development IDE
- Qt Creator — Qt/C++ development IDE
- Common dev tools — git, vim, tmux, Node.js, Python, cmake, build-essential
GUI apps are accessed via SSH X11 forwarding (ssh -X).
- KVM/libvirt installed — see kvm-utils
- SSH key pair in
~/.ssh/ virsh,virt-install,xorriso,cloud-initavailable
./manage-aidvm.sh createThe script guides you through all configuration interactively and saves it to ~/.config/aid/<vm-name>.conf for reuse.
| Prompt | Default |
|---|---|
| VM name | aidvm2, aidvm3, … (auto-incremented) |
| Base OS image | ubuntu24 |
| vCPUs | 4 |
| RAM | 32G |
| Disk size | 200G |
| Admin username | $USER |
| KVM host | local (or remote hostname) |
| Libvirt network | default (or create new) |
| VM IP address | derived from VM number (e.g. aidvm2 → x.x.x.2) |
| GitHub PAT | — (see below) |
| Claude API key | — (see console.anthropic.com) |
Re-running the script for an existing VM name loads the saved config — press Enter at each prompt to keep the current value.
The script prints this guide before asking for the token:
- Go to https://github.com/settings/tokens?type=beta (fine-grained PAT)
- Click Generate new token
- Set Token name — e.g.
aidvm2 - Set Expiration as desired
- Under Repository access → choose Only select repositories and add only the repos this VM needs access to
- Under Repository permissions grant:
- Contents: Read and write (clone, push, pull)
- Pull requests: Read and write (if needed)
- Metadata: Read-only (required)
- Under Account permissions grant:
- GitHub Copilot: Read-only (for Copilot CLI)
- Click Generate token — copy it now, it won't be shown again
Each VM gets its own config file:
~/.config/aid/aidvm2.conf
~/.config/aid/aidvm3.conf
~/.config/aid/my-custom-name.conf
You can create as many VMs as your host resources allow. The script suggests the next available aidvmN name but accepts any custom name.
# Shell access
ssh user@<ip>
# GUI apps via X11 forwarding
ssh -X user@<ip> android-studio
ssh -X user@<ip> qtcreator| File | Purpose |
|---|---|
manage-aidvm.sh |
Orchestrator — collects config, creates and provisions the VM |
provision-aidvm.sh |
Provisioning script — runs on the VM via SSH |
Uses kvm-utils as a git submodule at kvm/.
Clone with submodules:
git clone --recurse-submodules https://github.com/csjpeter/aid.gitOr if already cloned:
git submodule update --init