Skip to main content
  1. Posts/

Install Antigravity CLI on Termux: A Simple Guide

·427 words·3 mins
Nofal Briansah
Author
Nofal Briansah
Holaaa :)

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-storage

Change the repository mirrors to ensure optimal download speeds:

termux-change-repo

Update and upgrade your existing packages to their latest versions:

pkg update && pkg upgrade -y

3. 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 -y

Install the remaining required packages:

pkg install python proot curl ca-certificates -y

4. 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 | bash

After 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 ~/.bashrc

Recommended 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:

passwd

Install the OpenSSH package and Termux Services:

pkg install openssh termux-services -y

Generate an SSH key for authentication:

ssh-keygen -t ed25519 -C "your_email@example.com"

Enable the SSH daemon to run persistently:

sv-enable sshd

2. 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 | bash

3. Install Zellij
#

For terminal multiplexing, Zellij is an excellent modern alternative to tmux:

pkg install zellij -y

Troubleshooting Notes
#

If you encounter any issues during the installation, please refer to the references below or leave a comment.

References
#

Comments

Feel free to leave a message using Giscus (GitHub account) or use Cusdis (Guest tab) to comment anonymously.