TL;DR#
A guide to setting up an Antigravity CLI development environment on your Android device using Termux.
Context#
Running an AI-assisted development environment locally on a device has become increasingly valuable. By leveraging Termux, a powerful terminal emulator and Linux environment app for Android, we can install the Antigravity CLI. This guide walks through setting up the foundation, installing necessary dependencies like glibc, and applying recommended configurations.
Install Antigravity CLI#
1. Prerequisites#
First, ensure you have the Termux application installed. It is highly recommended to install it from F-Droid rather than the Play Store, as the Play Store version is no longer maintained.
2. Initial Setup#
Once Termux is installed and opened, we need to set up the basic environment.
Grant storage permissions to allow Termux to access your device’s files:
termux-setup-storageChange the repository mirrors to ensure optimal download speeds:
termux-change-repoUpdate and upgrade your existing packages to their latest versions:
pkg update && pkg upgrade -y3. Installing Dependencies#
The Antigravity CLI requires a Linux-like environment. We need to install glibc and other essential tools like python and proot.
Add the repository for glibc and install the package:
pkg install glibc-repo -y
pkg install glibc -yInstall the remaining required packages:
pkg install python proot curl ca-certificates -y4. Installing Antigravity CLI#
With the prerequisites in place, you can now install the Antigravity CLI using the provided installation script:
curl -fsSL https://raw.githubusercontent.com/wallentx/antigravity-cli-termux/dev/install.sh | bashAfter installation, ensure the binary path is added to your bash environment so you can run agy directly:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcRecommended Enhancements#
1. Enable SSH Access#
For a more comfortable experience, setting up an SSH server allows you to connect to Termux remotely from any device or a dedicated terminal emulator.
Set a password for your Termux user:
passwdInstall the OpenSSH package and Termux Services:
pkg install openssh termux-services -yGenerate an SSH key for authentication:
ssh-keygen -t ed25519 -C "your_email@example.com"Enable the SSH daemon to run persistently:
sv-enable sshd2. Install a Nerd Font#
A proper developer terminal requires a powerline-compatible font. We can easily install one using the termux-nf script:
pkg install curl ncurses-utils -y
curl -fsSL https://raw.githubusercontent.com/arnavgr/termux-nf/main/install.sh | bash3. Install Zellij#
For terminal multiplexing, Zellij is an excellent modern alternative to tmux:
pkg install zellij -yTroubleshooting Notes#
If you encounter any issues during the installation, please refer to the references below or leave a comment.
