Antigravity CLI helped me understand a complex codebase far faster than I expected


I’ll admit it, I’m a bit of an AI-sceptic. I see how AI-powered search can perform wonders with natural-language queries, but when it comes to editing my code, I still like to have control.

However, Antigravity could be the tool to convince me otherwise, and if you’re still on the fence about AI coding agents, it may do the same for you, too. This is a tale of false assumptions, one AI pitted against another, and a minor redemption arc.

What is Antigravity CLI?

AI on the command line, with a great-looking app

The Antigravity CLI is a replacement for Gemini CLI, which made the Gemini 3 model available on the command line. It’s an interactive program that lets you query an AI agent for all manner of coding tasks:

The Antigravity welcome screen showing a color scheme selector and an example prompt and response.

Antigravity CLI supports the Gemini 3.5 Flash and Gemini 3.1 Pro models, alongside others like Claude Sonnet, Claude Opus, and GPT-OSS 120B.

When you run it and grant it access to your current directory, it will analyze the files inside, gaining deep insight about the code. Antigravity can make code edits if you allow it, but it can also help you understand a codebase and even just explain how to use a command.

Installing and using agy

A bit of one-off configuration, then usage is straightforward

You can find installation instructions for your platform on Antigravity’s download page. For Linux and macOS users, it’s a simple case of running this command:

curl -fsSL https://antigravity.google/cli/install.sh | bash

Once you’ve installed it, make sure the binary location is in your PATH, then run agy and you should see an initial welcome screen.

Sign in with your Google credentials, and complete the authentication process to continue. You’ll typically see a confirmation screen for new projects, asking you if you trust the contents of whichever directory you launched agy from.

Be aware that Antigravity can change your code and run commands on your machine. Go slowly and pay attention to the on-screen warnings!

Exploring a codebase with agy

Run it from a repo and get all the answers you need

I initially turned to Antigravity to resolve a tricky problem with eza, the modern alternative to ls. Trying to understand the tool’s –total-size option, I began with a simple DuckDuckGo query that relayed some answers using its AI summary feature:

The DuckDuckGo search assist explaining how to get the total size of a directory on Linux, using a find command piped to stat and awk.

Although AI-powered search can often be wrong, I’ve found it useful most of the time, and it’s certainly less controversial than generative AI, partly because old-school search was already doing much of the same thing anyway.

An eza command reporting a directory size of 7808B and a find command reporting a directory size of 7637B.

Something still wasn’t quite right, however: eza was reporting a size of 7,808B while the find command gave 7,637B. At this point, if I’d thought about the problem some more, I may have come to a realization of my own. But I wanted to give agy a run anyway, so I went ahead and fired it up:

The agy CLI app showing a prompt: "The -B, -l, and --total-size options show me the footprint of a directory. But when I calculates this with a find command, I get a different total. What could explain this?

Note that I’m running agy directly from the eza source directory here, so there’s no need to give any context like which tool I’m even talking about. Antigravity is clever enough to realize that I’m talking about the eza command and its –total-size option.

While the model thinks, it shows fascinating insights into the process:

Antigravity CLI showing its process while responding to a prompt, including details about directories and files it accesses, and commands it runs.

As it goes about the job of answering your question, you’ll see references to files, details about the commands it runs, and more. Above all else, being able to peek behind the curtain to see what the agent is actually doing was a revelation for me.

Initially, though, while agy offered amazing insight into some of the possible factors, I wasn’t all too sure they applied, so I went for a follow-up:

A prompt asking Antigravity to reconsider, giving details of a precise find command.

By this point, I really wanted to get to the heart of the issue: why find was reporting a different size than eza was. Giving the model additional information can, of course, improve its handling of the task, especially external information such as this.

Sure enough, after a few more seconds, agy came back with plenty of possible explanations.

An Antigravity response explaining that one reason for differences between a find command and eza's total-size option is that the latter includes non-regular files.

Using agy—or any other AI tool—can involve refinement and a back-and-forth process. You can always use it in parallel, while you explore the codebase in another terminal or a text editor.

Now, to really test Antigravity, I wanted to see if it could fix my find command to resolve the inconsistency:

A prompt asking Antigravity to fix a find command. Antigravity provides a new command along with an explanation.

In particular, I’m asking it to match eza. There’s not a lot of detail there, but in the context of the overall conversation, agy has no problem at all understanding what I’m getting at.

But there’s still a minor problem: macOS’s BSD version of stat behaves differently from the GNU version of stat. By this point, I’d gotten a bit lazy, so I just banked on Antigravity to do all the work for me:

Antigravity tweaking a command for compatibility with macOS.

After just a few minutes, Antigravity had delved into a codebase, explored the path of a specific command-line option, and helped me refine a command for my platform. That final command delivered, now matching the output from eza:

A find command printing a total size of 7808B.


Antigravity has convinced me: an AI assistant can be valuable

Even though I approached it with skepticism, Antigravity delivered. As an affirmed lover of the command line, agy is a powerful yet accessible tool that I’ll be keeping a close eye on in the future.



Source link

Leave a Reply

Subscribe to Our Newsletter

Get our latest articles delivered straight to your inbox. No spam, we promise.

Recent Reviews


macOS has a built-in screenshot tool that gets the basics right. You can take a screenshot, record your screen, and even annotate your captures. But the moment you want something more, like scrolling capture, advanced annotation tools, or a quick way to share your screenshots via a link, it starts to fall apart.

That’s where CleanShot X comes in. It’s a powerful screenshot and screen recording app for Mac that replaces the built-in screenshot tool. It feels as if the developers looked at the screenshot features in macOS and added everything that was missing.

Over the past few years, the app has added several new features I didn’t know I needed until it offered them. It has become one of my favorite Mac utilities, and in this article, I will show you its features that will convince you to buy the app instantly. 

Scrolling capture saves you from stitching screenshots together

One of the most frustrating limitations of macOS’s screenshot tool is that it can only capture what’s visible on your screen. If I need to capture a long webpage or a full chat history, I am stuck taking multiple screenshots and stitching them together. That wastes an unbelievable amount of time. 

CleanShot X solves this with its scrolling capture feature. I can trigger the scrolling capture, and CleanShot X automatically scrolls through the content and delivers a single image. I don’t even have to manually scroll the page if I don’t want to.

This feature alone saves me hours of time every month. If you have to deal with long screenshots, you should definitely try it out. 

Time delay capture lets you screenshot the impossible

Some screenshots are tricky to take because they require you to trigger something before capturing. For example, sometimes the on-screen feature you want to capture disappears as soon as you use a keyboard shortcut or click anywhere with your mouse. 

Sometimes, the on-screen elements appear for a short time, and by the time you hit the screenshot shortcut, they disappear. CleanShot X’s time delay capture gives me a few seconds to set things up before the screenshot is taken. I trigger the capture, put everything in place, and CleanShot X does the rest. 

It’s a small feature that solves a genuinely annoying problem.

Capture text from images with OCR

I love that CleanShot X has a built-in OCR function. It lets me capture text directly from any image or video on my screen. Although it happens rarely, I have come across websites that don’t let me copy content. With CleanShot X’s OCR function, that’s not an issue. 

I use this constantly when reviewing PDF documents with restricted permissions or watching a video on YouTube. It is far faster than typing things out manually, and it works surprisingly well. There are many apps that let you capture text with OCR, but since CleanShot X has this feature built in, I don’t need to install an extra app. 

Add beautiful backgrounds to your screenshots

If you share screenshots for work, tutorials, or social media, you know how plain a raw screenshot looks. CleanShot X lets me add beautiful backgrounds to my screenshots, turning a flat capture into something that looks polished and share-ready.

For backgrounds, I can choose from solid colors, gradients, or even my current desktop wallpaper. I can also adjust the padding and shadow, align the screenshot to the edges, and adjust the corner radius. It takes a few seconds and makes a huge difference in how professional your screenshots look.

Annotation tools that get the job done

While macOS’s screenshot tool lets you annotate your screenshots, the annotation tools inside CleanShot X are, in my opinion, the best available on the Mac. 

I can add arrows, text labels, shapes, highlights, and more. I can also change the weight and color of annotations. There are also multiple arrow styles I can choose from. I especially like the curved arrow style that lets me curve the arrows and make them pop. 

One of my favorite new additions is the “Highlighter” tool. It snaps to the text in a screenshot, which makes it really easy to highlight it before sharing. 

Then there’s the “Spotlight” tool that highlights your selection by darkening the rest of the screenshot. It’s perfect for drawing someone’s attention to a specific part of a screenshot. 

No matter what annotation tools you need, you can find them and more in CleanShot X. 

Hide sensitive information before you share

You can find hundreds of instances in the news where a prominent figure shared a screenshot and inadvertently revealed private information. Thankfully, CleanShot X has a dedicated tool to blur or black out sensitive information, so such accidents never happen.

I can choose to pixelate, blur, or completely black out the information. The best part is that I can also adjust the strength of these effects. It lets me blend in the hidden information so the blur doesn’t stand out from the rest of the screenshot. 

Video and GIF recording built right in

CleanShot X also lets you record your screen as a video or export directly as an optimized GIF. The GIF export is particularly useful for sharing quick demos or showing someone how to do something without creating a large video file. 

It can record the entire screen, a specific window, or a custom region. It can also show my mouse clicks and keyboard shortcuts. I can record my computer audio, my microphone, and webcam video. 

I love that it automatically adds the webcam video in the corner, so it doesn’t interfere with the rest of the recording. I can also change the video size and shape. All these features make it really easy to create video tutorials. 

Quick share with cloud links

Once you take a screenshot or finish a recording, you need to share it. Of course, you can easily share screenshots via messages or emails. But CleanShot X gives me a better way. 

Whenever I capture something, it opens a quick share overlay. I can use it to instantly upload my screenshots to CleanShot Cloud and grab a shareable link with a single click.

I no longer have to drag files into cloud storage, attach images to emails, or upload to third-party services. I capture it, click share, and paste the link. It is one of those workflow improvements that sounds minor until you use it every single day.

Capture beautiful screenshots with CleanShot X

CleanShot X has become one of my most dependable apps on Mac. In fact, all the screenshots you see in this article or any of my articles have been captured using CleanShot X. Yes, it’s a paid app, but it has paid its cost multiple times over with the time it has saved me. 

CleanShot X is available as a one-time purchase or through a SetApp subscription. If you want unlimited cloud storage, you have to pay for a monthly subscription. That will also get you advanced features like a custom domain and branding, password-protected link sharing, and more. 

For most users, the one-time purchase is more than enough, and it’s what I use. If you spend any time taking screenshots or recording your screen on a Mac, it is absolutely worth every penny.



Source link