◉ANTIGRAVITY LABJP
Articles/Tips & Best Practices
✦ Tips & Best Practices/2026-06-14Intermediate

Turning 'the Antigravity CLI feels faster' into a number with hyperfine

The Go-based Antigravity CLI feels snappier to start. Here is how to turn that impression into a reproducible number with hyperfine: warm vs cold runs, cumulative cost in automation, and a CI gate that catches regressions.

antigravity-cli16hyperfinebenchmark3performance14automation96

✦ Premium Article

When Gemini CLI and the Code Assist extension wind down on June 18, I moved my whole scheduled stack off gemini and onto the Antigravity CLI. The first thing I noticed was vague: it felt quicker to hand control back to the terminal. I half-expected that, since the tool is now a single Go binary. But an impression is just an impression. As an indie developer automating updates across four sites (Dolice Labs), the CLI gets launched dozens of times a day. If startup shifts by 0.4 seconds, that is not noise at my volume. I wanted to convert the feeling into a number anyone can reproduce.

Why time antigravity --version doesn't really measure anything

The first instinct is usually this naive measurement:

time antigravity --version
# antigravity 2.0.3
# antigravity --version  0.18s user 0.04s system 88% cpu 0.249 total

That 0.249 s blends several unrelated things: the shell resolving PATH and spawning the process, the OS reading the binary off disk (slow on the very first run), and the trivial work of printing a version string. Worse, it is a single sample. Run it again and the OS file cache is warm, so it returns in 0.08 s. Which one is the "real" startup time?

The honest answer is that you need both, depending on intent. For scheduled jobs that hammer the same binary back to back, the warm median is closest to reality. For a tool you rarely launch, or the very first invocation after a deploy, the cold path is what bites. Naive time makes neither distinction and takes one sample, so it isn't a measurement at all.

Capturing the warm distribution with hyperfine

That is what hyperfine is for. It is a Rust benchmarking tool that handles warmup runs, repeated sampling, statistics, and outlier warnings for you.

# macOS
brew install hyperfine
# Debian/Ubuntu
sudo apt install hyperfine

Start with warm startup latency:

hyperfine --warmup 5 --runs 50 \
  'antigravity --version' \
  'gemini --version'

--warmup 5 runs the command five times before measuring to warm the cache, and --runs 50 takes fifty samples. On my machine (M2 / macOS 15) the result looked like this. These are environment-dependent reference numbers — read the ratio, not the absolute values.

Benchmark 1: antigravity --version
  Time (mean ± σ):      28.4 ms ±   2.1 ms
  Range (min … max):    25.9 ms …  34.7 ms    50 runs

Benchmark 2: gemini --version
  Time (mean ± σ):     186.3 ms ±   9.4 ms
  Range (min … max):   171.2 ms … 208.5 ms    50 runs

Summary
  'antigravity --version' ran 6.56 ± 0.61 times faster than 'gemini --version'

Now "feels faster" is roughly 6.5x. That is a believable gap. A Node-based CLI boots a Node runtime and loads its dependency modules on every launch; a single Go binary carries almost none of that overhead. Because we measured the trivial --version path, what we are seeing here is pure process-start cost.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦How to measure CLI startup latency in warm vs cold conditions and separate it from model response time
✦How to estimate the real cumulative cost of startup time when automation invokes the CLI dozens of times a day
✦How to turn a vague 'it feels faster' into a reproducible benchmark and a p95-threshold CI gate
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Antigravity Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

✦ Tips2026-08-21
The pipe in my wrapper was swallowing Antigravity CLI's exit code
CLI 1.1.14 turns language server failures into a non-zero exit, but a bash wrapper can still report green. I measured sixteen calling patterns on bash 5.1, traced the three causes, and covered where set -e goes quiet inside functions, why pipefail can start returning 141, and a symptom-first triage table.
✦ Tips2026-10-27
Dropping a Japanese Web Font Cut FCP from 4.1s to 1.7s; Half My Explanation Failed a Minimal Repro
Mobile FCP on PageSpeed fell from 4.1s to 1.7s once I stopped serving a Japanese web font. Self-hosting made it worse, and the render-blocking story did not reproduce.
✦ Tips2026-08-31
One Argument Now Switches Your Model in Antigravity CLI — and Rewrites Your Default Too
In CLI v1.1.22, /model takes an argument, switches instantly, and saves that model as your default in the same stroke. Here is the forget-to-switch-back trap that comes with it, and the start-of-session habit that fixed it for me.