{"id":168263,"date":"2026-06-02T00:45:08","date_gmt":"2026-06-01T21:45:08","guid":{"rendered":"https:\/\/computingforgeeks.com\/?p=168263"},"modified":"2026-06-15T19:01:05","modified_gmt":"2026-06-15T16:01:05","slug":"install-antigravity-cli-linux-macos-windows","status":"publish","type":"post","link":"https:\/\/computingforgeeks.com\/install-antigravity-cli-linux-macos-windows\/","title":{"rendered":"Install Antigravity CLI on Linux, macOS, and Windows"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Google is switching off the Gemini CLI on 18 June 2026 and moving everyone to its replacement, the Antigravity CLI. If you have been driving Gemini from your terminal, that is a hard deadline to migrate, and the new tool is a different binary with a different sign-in flow and a much heavier focus on running agents in the background.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This guide shows how to install Antigravity CLI on Linux, macOS, and Windows, sign it in with a free Google account, and run a real coding task so you can see what the agent actually does on its own. It also covers the one error that stops the binary cold on virtual machines, exactly where the tool caches its OAuth token, and how the move from the Gemini CLI works in practice. Every command was run on a clean Ubuntu 26.04 server and on macOS, not copied from the docs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Coming from the Gemini CLI? Keep our <a href=\"https:\/\/computingforgeeks.com\/gemini-cli-cheat-sheet\/\" target=\"_blank\" rel=\"noreferrer noopener\">Gemini CLI cheat sheet<\/a> and <a href=\"https:\/\/computingforgeeks.com\/install-configure-gemini-cli\/\" target=\"_blank\" rel=\"noreferrer noopener\">Gemini CLI install guide<\/a> open while you move across. The command names and sign-in flow differ, and a paid Gemini API key still keeps the old <code>gemini<\/code> binary alive if you would rather not switch yet.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Antigravity CLI vs Antigravity, the desktop app<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Antigravity brand covers two separate products, and mixing them up wastes an afternoon. Antigravity, sometimes labelled Antigravity 2.0, is a desktop IDE, a graphical application you install and open like an editor. The Antigravity CLI is a terminal tool whose binary is called <code>agy<\/code>, and that is what this article installs. They share an account and some configuration, but you install and run them independently.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The CLI exists because Google is retiring the Gemini CLI. After 18 June 2026 the Gemini CLI stops serving requests for free, Pro, and Ultra accounts. Teams on a paid Gemini Code Assist Standard or Enterprise licence keep the old tool with continued model updates, so this deadline mainly hits individual developers. If you are one of them, the fastest path is to <a href=\"https:\/\/computingforgeeks.com\/install-configure-gemini-cli\/\">set up the Gemini CLI<\/a> knowledge you already have and carry it over, because the workflow concepts map across closely.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You need very little to get started:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A 64-bit Linux, macOS, or Windows machine with outbound HTTPS access<\/li>\n\n\n\n<li>A Google account. A free account works during the preview with generous rate limits, so you do not need a paid Gemini plan<\/li>\n\n\n\n<li><code>curl<\/code> on Linux and macOS, or PowerShell on Windows<\/li>\n\n\n\n<li>A modern CPU that exposes AES hardware instructions (every recent physical CPU does, but virtual machines need one extra setting, covered below)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Install the Antigravity CLI on Ubuntu 26.04<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Forget anything you read about an <code>npm<\/code> package. The old <code>gemini-cli<\/code> npm package is deprecated, and the Antigravity CLI ships as a single native binary through an official installer script. On Linux and macOS the whole install is one line:<\/p>\n\n\n\n<pre class=\"wp-block-code code\"><code>curl -fsSL https:\/\/antigravity.google\/cli\/install.sh | bash<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The script detects your platform, pulls the matching build, verifies a checksum, and drops a binary called <code>agy<\/code> into <code>~\/.local\/bin<\/code>. On a minimal server that directory is often missing from your <code>PATH<\/code>, which is the first thing that trips people up. Add it for the current shell:<\/p>\n\n\n\n<pre class=\"wp-block-code code\"><code>export PATH=\"$HOME\/.local\/bin:$PATH\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now confirm the binary runs and prints a version string:<\/p>\n\n\n\n<pre class=\"wp-block-code code\"><code>agy --version<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The installer adds the same <code>PATH<\/code> line to your shell profile, so new terminals pick it up automatically. The full install plus version check looks like this on a fresh Ubuntu 26.04 box:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"920\" height=\"330\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/install-antigravity-cli-ubuntu-2604.png\" alt=\"Installing Antigravity CLI on Ubuntu 26.04 and checking the agy version\" class=\"wp-image-168258\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/install-antigravity-cli-ubuntu-2604.png 920w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/install-antigravity-cli-ubuntu-2604-300x108.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/install-antigravity-cli-ubuntu-2604-768x275.png 768w\" sizes=\"auto, (max-width: 920px) 100vw, 920px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">That single binary is around 180 MB because the whole agent runtime is compiled in. There is also a separate Python package, <code>google-antigravity<\/code>, but that is the SDK for building on top of the agent, not the CLI. Install the SDK only if you are writing code against it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Fix the &#8220;Illegal instruction&#8221; AES error<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If your very first <code>agy<\/code> command dies instantly with a fatal error and a core dump, you are almost certainly on a virtual machine. The binary is compiled with hardware AES enabled, and it refuses to start when the CPU it sees does not expose the AES instruction set:<\/p>\n\n\n\n<pre class=\"wp-block-code code\"><code>FATAL ERROR: This binary was compiled with aes enabled, but this feature is not available on this processor (go\/sigill-fail-fast).\nIllegal instruction (core dumped)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Physical machines with any recent Intel or AMD CPU never hit this. Virtual machines do, because the default emulated CPU model masks host features like AES. The fix is to expose the host CPU to the guest. On Proxmox or plain KVM, set the CPU type to <code>host<\/code> and cold-boot the VM so the new model attaches:<\/p>\n\n\n\n<pre class=\"wp-block-code code\"><code>qm set 151 --cpu host\nqm stop 151 &amp;&amp; qm start 151<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A plain reboot is not enough, because the CPU model only changes when the VM process restarts. After the cold boot, check that the AES flag is now visible inside the guest, then run the version command again. It should return cleanly:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"920\" height=\"420\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/antigravity-cli-aes-illegal-instruction-fix.png\" alt=\"Fixing the Antigravity CLI illegal instruction AES error with cpu host on Proxmox\" class=\"wp-image-168259\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/antigravity-cli-aes-illegal-instruction-fix.png 920w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/antigravity-cli-aes-illegal-instruction-fix-300x137.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/antigravity-cli-aes-illegal-instruction-fix-768x351.png 768w\" sizes=\"auto, (max-width: 920px) 100vw, 920px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">On other hypervisors the idea is identical even if the command differs. In VMware set the guest to pass through the host CPU, and in cloud VMs pick an instance type whose vCPUs expose AES, which nearly all of them do.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Sign in with your Google account<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">There is no <code>login<\/code> subcommand. Authentication fires the first time you run anything that needs the model. Trigger it with a throwaway prompt:<\/p>\n\n\n\n<pre class=\"wp-block-code code\"><code>agy -p \"say hi\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">On a desktop the tool opens your browser. Over SSH it prints an authorization URL and waits. Open that URL in a browser signed into the Google account you want to use, approve the consent screen, and the callback page hands you an authorization code. Paste that code back into the terminal and the CLI exchanges it for a token. A free account is enough during the preview, so this works without any paid subscription.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"920\" height=\"320\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/antigravity-cli-google-signin-ubuntu.png\" alt=\"Antigravity CLI first-run Google account sign-in on a free account\" class=\"wp-image-168260\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/antigravity-cli-google-signin-ubuntu.png 920w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/antigravity-cli-google-signin-ubuntu-300x104.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/antigravity-cli-google-signin-ubuntu-768x267.png 768w\" sizes=\"auto, (max-width: 920px) 100vw, 920px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This is a real change from the Gemini CLI, which read a <code>GEMINI_API_KEY<\/code> environment variable. Any scripts or CI jobs that exported that variable need rethinking, because the Antigravity CLI keeps credentials in the system keyring or a token file instead.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Where the token and config actually live<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Several early write-ups claim the credentials sit in <code>~\/.config\/agy\/credentials.json<\/code>. They do not. On Linux the OAuth token is a plain file at <code>~\/.gemini\/antigravity-cli\/antigravity-oauth-token<\/code>, and the rest of the configuration lives under <code>~\/.gemini<\/code> as well, including the MCP server config and your saved conversations. On macOS the token goes into the Keychain under an entry named &#8220;Antigravity Safe Storage&#8221; rather than a file.<\/p>\n\n\n\n<pre class=\"wp-block-code code\"><code>ls ~\/.gemini\/antigravity-cli\/\nls ~\/.gemini\/config\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">That token file is the piece you copy to reuse a session on a headless server or in CI, so it is worth knowing the real path:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"920\" height=\"300\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/antigravity-cli-token-config-location-linux.png\" alt=\"Antigravity CLI OAuth token and config files under the gemini directory on Linux\" class=\"wp-image-168262\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/antigravity-cli-token-config-location-linux.png 920w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/antigravity-cli-token-config-location-linux-300x98.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/antigravity-cli-token-config-location-linux-768x250.png 768w\" sizes=\"auto, (max-width: 920px) 100vw, 920px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">One practical warning for unattended servers. The interactive paste prompt closes after roughly thirty seconds, which is too short to relay a human sign-in through a chat or a ticket. Authenticate in a shell where you can paste the code yourself within seconds, or sign in once on a workstation and copy the token file across. The official guidance for CI is exactly that: cache the token and mount it on the runner.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install on macOS and Windows<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">macOS uses the same installer. On an Apple Silicon Mac the script detects the <code>darwin_arm64<\/code> build and drops <code>agy<\/code> into <code>~\/.local\/bin<\/code> just as it does on Linux:<\/p>\n\n\n\n<pre class=\"wp-block-code code\"><code>curl -fsSL https:\/\/antigravity.google\/cli\/install.sh | bash<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If your shell profile is managed by a tool like nix-darwin or Home Manager, the installer cannot edit the read-only profile and prints a non-fatal warning. The binary still works; just call it by its full path <code>~\/.local\/bin\/agy<\/code> or add the directory to your managed config yourself. Windows uses a PowerShell one-liner instead:<\/p>\n\n\n\n<pre class=\"wp-block-code code\"><code>irm https:\/\/antigravity.google\/cli\/install.ps1 | iex<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Windows installs the same native binary, so there is no Node.js or npm in the loop. The sign-in flow is identical to the desktop path on macOS, with the browser opening automatically.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Run your first agentic task<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The point of the Antigravity CLI is not chatting, it is letting an agent do multi-step work on its own. Print mode runs a single prompt non-interactively and lets the agent use tools to reach the goal. Two flags matter here. <code>--add-dir<\/code> points the agent at a real working directory, and <code>--dangerously-skip-permissions<\/code> auto-approves the shell and file actions so the run does not stop to ask. Only use that second flag in a throwaway directory or a disposable VM.<\/p>\n\n\n\n<pre class=\"wp-block-code code\"><code>mkdir -p ~\/portscanner\nagy --add-dir ~\/portscanner --dangerously-skip-permissions \\\n    -p \"Build a Python port scanner with pytest tests, then run them\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">From that single sentence the agent installed the <code>python3-venv<\/code> package, wrote a clean port-scanner module and an argparse CLI, added a pytest file with an open-port and a closed-port case, created a virtual environment, installed pytest and flake8 into it, checked the formatting, and ran the suite. The tests passed and the files landed in the directory we pointed it at:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"920\" height=\"520\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/antigravity-cli-agentic-task-pytest-passed.png\" alt=\"Antigravity CLI autonomously building a Python project and passing pytest tests\" class=\"wp-image-168261\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/antigravity-cli-agentic-task-pytest-passed.png 920w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/antigravity-cli-agentic-task-pytest-passed-300x170.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2026\/06\/antigravity-cli-agentic-task-pytest-passed-768x434.png 768w\" sizes=\"auto, (max-width: 920px) 100vw, 920px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Skip the <code>--add-dir<\/code> flag and you get a surprise. In print mode the agent defaults to a scratch workspace under <code>~\/.gemini\/antigravity-cli\/scratch\/<\/code> rather than your current directory, so your new files appear to vanish. Always name the directory you want the agent to work in, and the output stays where you expect.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The async, multi-agent orchestration is the headline difference from the Gemini CLI. Larger jobs run in the background while you keep using the terminal, which is the same model that terminal agents like <a href=\"https:\/\/computingforgeeks.com\/claude-code-cheat-sheet\/\">Claude Code<\/a> and the <a href=\"https:\/\/computingforgeeks.com\/codex-cli-cheat-sheet\/\">Codex CLI<\/a> popularised. If you are weighing up the field, our comparison of <a href=\"https:\/\/computingforgeeks.com\/opencode-vs-claude-code-vs-cursor\/\">open-source terminal coding agents<\/a> is a useful map.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Migrate from the Gemini CLI<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Treat the 18 June 2026 cutoff as real. After that date the Gemini CLI and the Gemini Code Assist IDE extensions stop answering for free, Pro, and Ultra accounts. The good news is that the concepts you built around the old tool carry over. Agent skills, hooks, subagents, and extensions all exist in the Antigravity CLI, although Google is explicit that there is no one-to-one parity at launch, so expect to re-test custom setups rather than lift them verbatim.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The migration steps are short. Install the Antigravity CLI as above, sign in once, then port your prompts and any project configuration. If you keep a command reference for the old tool, our <a href=\"https:\/\/computingforgeeks.com\/gemini-cli-cheat-sheet\/\">Gemini CLI cheat sheet<\/a> is a good side-by-side while you map the equivalents. Enterprise teams with a Code Assist licence can stay on the Gemini CLI for now, but everyone else should plan the switch before the deadline rather than on it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">These are the snags we actually hit while testing, with the fix for each.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">&#8220;Illegal instruction (core dumped)&#8221; on first run<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The CPU lacks AES instructions, which only happens on virtual machines with a masked CPU model. Set the guest CPU to pass through the host, as shown in the AES section above, and cold-boot the VM. Confirm with <code>grep -o aes \/proc\/cpuinfo<\/code> before retrying.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">&#8220;agy: command not found&#8221; right after install<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The binary is in <code>~\/.local\/bin<\/code>, which is not on the <code>PATH<\/code> of a fresh shell. Run <code>export PATH=\"$HOME\/.local\/bin:$PATH\"<\/code> for the session, open a new terminal so the profile change takes effect, or call the binary by its full path.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Sign-in keeps timing out over SSH<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The pasted-code window is short. Complete the browser step first, have the code on your clipboard, then run the auth command and paste immediately. For servers you manage regularly, sign in once on a workstation and copy <code>~\/.gemini\/antigravity-cli\/antigravity-oauth-token<\/code> to the same path on the server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The agent&#8217;s files are nowhere to be found<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Without <code>--add-dir<\/code>, print mode writes to the scratch workspace under <code>~\/.gemini\/antigravity-cli\/scratch\/<\/code>. Re-run with <code>--add-dir \/path\/to\/project<\/code> pointed at the directory you actually want, and reference that same path in the prompt.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With the binary installed, the AES gotcha out of the way, and a token cached, the Antigravity CLI behaves like a capable background agent rather than a chat box. Point it at a directory, give it a concrete task, and let it work while you move on to the next thing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google is switching off the Gemini CLI on 18 June 2026 and moving everyone to its replacement, the Antigravity CLI. If you have been driving Gemini from your terminal, that is a hard deadline to migrate, and the new tool is a different binary with a different sign-in flow and a much heavier focus on &#8230; <a title=\"Install Antigravity CLI on Linux, macOS, and Windows\" class=\"read-more\" href=\"https:\/\/computingforgeeks.com\/install-antigravity-cli-linux-macos-windows\/\" aria-label=\"Read more about Install Antigravity CLI on Linux, macOS, and Windows\">Read more<\/a><\/p>\n","protected":false},"author":7,"featured_media":168264,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39034,690,299],"tags":[17245,669],"cfg_series":[],"class_list":["post-168263","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-dev","category-how-to","tag-ai","tag-dev"],"_links":{"self":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/168263","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/comments?post=168263"}],"version-history":[{"count":2,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/168263\/revisions"}],"predecessor-version":[{"id":168266,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/168263\/revisions\/168266"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media\/168264"}],"wp:attachment":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media?parent=168263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/categories?post=168263"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/tags?post=168263"},{"taxonomy":"cfg_series","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/cfg_series?post=168263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}