AI agents
Lima is useful for running AI agents inside a VM, so as to prevent agents from directly reading, writing, or executing the host files.
For running AI agents, it is highly recommended to only mount your project directory (current directory) into the VM:
limactl start --mount-only .:w
Drop :w
for read-only mode.
limactl start --set ".mounts=[{\"location\":\"$(pwd)\", \"writable\":true}]"
Set writable
to false
for read-only mode.
lima sudo apt install -y pipx
lima pipx install aider-install
lima sh -c 'echo "export PATH=$PATH:$HOME/.local/bin" >>~/.bash_profile'
lima aider-install
lima aider
Follow the guide shown in the first session for authentication.
Alternatively, you can set environmental variables via:
lima vi "/home/${USER}.linux/.bash_profile"
See also https://github.com/Aider-AI/aider.
lima sudo snap install node --classic
lima sudo npm install -g @anthropic-ai/claude-code
lima codex
Follow the guide shown in the first session for authentication.
Alternatively, you can set export ANTHROPIC_API_KEY...
via:
lima vi "/home/${USER}.linux/.bash_profile"
lima sudo snap install node --classic
lima sudo npm install -g @openai/codex
lima codex
Follow the guide shown in the first session for authentication.
Alternatively, you can set export OPENAI_API_KEY...
via:
lima vi "/home/${USER}.linux/.bash_profile"
See also https://github.com/openai/codex.
lima sudo snap install node --classic
lima sudo npm install -g @google/gemini-cli
lima gemini
Follow the guide shown in the first session for authentication.
Alternatively, you can set export GEMINI_API_KEY...
via:
lima vi "/home/${USER}.linux/.bash_profile"
lima sudo snap install node --classic
lima sudo npm install -g @github/copilot
lima copilot
Type /login
in the first session for authentication.
Alternatively, you can set export GH_TOKEN=...
via:
lima vi "/home/${USER}.linux/.bash_profile"
See also https://github.com/github/copilot-cli.