I work on a few different projects each week.

Because of that, my setup is split. I use two distinct environments: a PowerShell 7 console for Windows tasks, and a dedicated Ubuntu VM for web applications.

Every time I open a terminal—especially after a weekend or when switching context between clients—I have to play detective. I sit there staring at the blank prompt, asking: What was I actually working on here?

My daily driver coding assistant is the Antigravity CLI running Gemini 3.5. It’s insanely fast—clocking in at about four times faster than Claude Opus right now. Because Gemini is so fast, I use it constantly.

And that speed gave me an idea: since my agent is involved in almost every folder I touch, its session history is the perfect paper trail of my actual work.

So, I built a script to reconstruct my context automatically.


The Solution: antigravity-recent

I wrote a shell script called antigravity-recent (orchestrated via chezmoi so it stays synced across my machines).

Instead of me trying to remember my steps, the script reads the Antigravity CLI chat logs under the hood. It filters out deleted directories and my root home folder, matches active git branch names, and formats the log timestamps into clean, relative times (like 23h ago or 2d ago).

Here is what it outputs when I log in or run ag-recent:

⚡ Recent Antigravity Projects
  1. ~/dev/scratch/wp                         (23h ago)
  2. ~/dev/scratch/threads-reader             (main) (23h ago)
  3. ~/dev/yaml/pyyaml                        (dos-in-merge-key) (1d ago)
  4. ~/dev/scratch/gsig_app                   (bookstore-app) (2d ago)
  5. ~/dev/packablock                         (main) (4d ago)

💡 Run ag-recent <num> to jump to a project folder.

Integrating it into the Shell

Making a script is fine, but if you have to remember to run it, it defeats the purpose. I integrated it directly into my .zshrc in two ways:

1. The SSH Greeting

I don’t need this list when I open a local subshell, but I absolutely need it when I log in remotely. The script checks for the $SSH_CONNECTION environment variable. If it’s present, the script auto-runs on login, instantly telling me what I was doing on that VM.

2. The Interactive Jumper (ag-recent)

Typing paths is tedious. I set up a shell function called ag-recent that does double duty:

  • Running ag-recent prints the project list manually.
  • Running ag-recent <1-5> switches my shell’s working directory directly to that path.

Under the hood, ag-recent 2 executes drive-indexer (or my helper script) with a --path 2 argument, grabs the path, and runs cd.


Why This Works

It’s simple, low-friction, and leverages the data I’m already generating by pair-programming with an AI.

Now, context switching takes zero cognitive load. I SSH in, see the list, type ag-recent 1, and I’m right back where I left off.

Pro Tip: Your terminal history is a data source. If you use CLI tools or AI agents, they leave structured logs. Don’t let that data rot—wrap a simple shell parser around it to automate your context recovery.

Discover more from Aaron Bronow

Subscribe now to keep reading and get access to the full archive.

Continue reading