Setup Linux

A one-time setup of your Linux machine so the kit can build, run, and ship Android apps. You do this once per computer. Follow the steps in order — each ends with a quick check so you know it worked before moving on.

On a Mac? Use Setup macOS. On Windows? Use Setup Windows.

The fast path: install the tools below, then — after you've cloned the kit — run /kit-env-check inside it. That command verifies everything in one shot and prints the exact fix for anything missing.

Commands below use apt (Debian / Ubuntu / Mint / Pop!_OS) and ~/.bashrc. On Fedora use sudo dnf, on Arch sudo pacman -S; if your shell is zsh, edit ~/.zshrc instead. Restart your terminal (or source the file) after any environment-variable change.

What you're installing:

  1. Build toolsapt packages the build needs (curl, unzip, etc.)
  2. JDK 17 — the Java the build runs on
  3. Android Studio — only for the SDK + emulator (you won't code in it)
  4. ANDROID_HOME — tells the tools where the SDK lives
  5. Node.js — runs the CLI agents (Claude Code, OpenCode, Codex); install it if you use one
  6. An AI agent — Claude Code, Cursor, Antigravity, OpenCode, or Codex (runs the /kit-* commands)
  7. android CLI + Android Skills — Android know-how for the agent
  8. GitHub CLI (gh) — backs your app up to GitHub (used by /kit-save-to-github)
  9. scrcpy (optional) — screen mirroring

💡 You do not write code in Android Studio. The kit is built entirely from the terminal via your AI agent. Android Studio is here only to download the Android SDK.


1. Build tools

Update the package list and install the basics:

sudo apt update
sudo apt install -y curl unzip zip git

Verify: curl --version.

2. JDK 17

sudo apt install -y openjdk-17-jdk

Then point JAVA_HOME at it in your shell (~/.bashrc):

echo 'export JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64"' >> ~/.bashrc
echo 'export PATH="$JAVA_HOME/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Verify: java -version → should show 17.x. (If the path above doesn't exist, find it with sudo update-alternatives --config java and use the directory it reports.)

3. Android Studio

Download from developer.android.com/studio, extract the .tar.gz, and launch it:

tar -xzf android-studio-*.tar.gz -C ~/
~/android-studio/bin/studio.sh

On first launch, open SDK Manager (the menu next to Clone RepositorySDK Manager) and enable:

  • Android 15 (API 35) — the platform
  • Android SDK Command-line Tools (latest) — under the SDK Tools tab

Click Apply to download.

(No-GUI / server?) You can skip Android Studio and install the SDK with the command-line tools: download Command-line tools from the same page, unzip into $HOME/Android/Sdk/cmdline-tools/latest, then sdkmanager "platform-tools" "platforms;android-35" "build-tools;35.0.0".

4. ANDROID_HOME

Add to ~/.bashrc:

echo 'export ANDROID_HOME="$HOME/Android/Sdk"' >> ~/.bashrc
echo 'export PATH="$ANDROID_HOME/platform-tools:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/emulator:$PATH"' >> ~/.bashrc
source ~/.bashrc

Verify: adb --version.

Emulator (optional): hardware acceleration needs KVM — sudo apt install -y qemu-kvm && sudo adduser $USER kvm, then log out and back in. Or just use a real device over USB (adb devices).

5. Node.js

The apt nodejs package is often too old. Install v18+ — the simplest is nvm:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.bashrc
nvm install --lts

Verify: node --version (v18+).

6. An AI agent

Pick any one (all five run the /kit-* commands):

  • Claude Codenpm install -g @anthropic-ai/claude-code, then claude to log in
  • OpenCodenpm install -g opencode-ai, then opencode
  • Codexnpm install -g @openai/codex, then codex
  • Cursor — download the app from cursor.com
  • Google Antigravity — download from antigravity.google

The CLI agents (Claude Code, OpenCode, Codex) need Node.js from the previous step; Cursor and Antigravity are standalone apps. See Requirements for what each is.

Verify (CLI agents): claude --version or opencode --version.

7. android CLI + Android Skills

Download the android CLI from developer.android.com/tools/agents, make it executable and put it on your PATH (e.g. ~/.local/bin), then:

android update
android skills add --all

Verify: android --version and android skills list.

8. GitHub CLI (gh)

gh is how the kit backs your app up to your own private GitHub repo/kit-save-to-github uses it to create the repo and push, with no git commands for you to learn. The install depends on your distribution — use your package manager:

sudo apt install -y gh          # Debian / Ubuntu / Mint / Pop!_OS
sudo dnf install -y gh          # Fedora / RHEL
sudo zypper install -y gh       # openSUSE / SUSE
sudo pacman -S github-cli       # Arch
gh auth login

If your package manager can't find it, GitHub's repo isn't wired up yet — the exact command for every distro, plus .deb / .rpm / .tar.gz downloads, is on GitHub's official page, cli.github.com (the Install dropdown). At the login prompts pick GitHub.com → HTTPS → Login with a web browser. Verify: gh auth status.

Prefer a GUI? (optional) Official GitHub Desktop is macOS/Windows only — on Linux use gh, or the community build at github.com/shiftkey/desktop. The kit only needs gh, which /kit-save-to-github automates for you.

scrcpy (optional)

scrcpy mirrors your Android phone on your desktop — you see the screen in a window and control it with your mouse and keyboard. Great for testing and recording without picking up the device.

sudo apt install -y scrcpy

scrcpy mirroring an Android phone on the desktop


Verify everything — /kit-env-check

Once the tools are installed and you've created your project, open it in your AI agent and run:

/kit-env-check

It checks JDK 17, ANDROID_HOME, adb, the android CLI, the Android Skills, and the optional tools — and prints the exact install command for anything still missing. Green across the board means you're ready.


Troubleshooting

ProblemFix
java -version shows the wrong versionsudo update-alternatives --config java → pick 17, and re-check JAVA_HOME
adb: command not foundANDROID_HOME / Path not set, or terminal not restarted
android: command not foundThe android CLI isn't on your Path — re-add it (e.g. ~/.local/bin)
Build: SDK location not foundWrong sdk.dir in local.properties
Emulator won't start / /dev/kvm errorInstall qemu-kvm + add yourself to the kvm group, or use a real device
Nothing works after editing env varsRestart the terminal (or source ~/.bashrc)

Still stuck? Run /kit-env-check — it diagnoses and prints the fix.


Next: Creating a New Project — clone the kit and run it for the first time.