Windows 10 / 11 100% Plug & Play Continuous Brain NTFS · Junction Links

Antigravity Portable

Run Antigravity and its complete memory, login sessions, developer tools, and workspaces from any external SSD or USB drive — on any Windows PC, with zero reinstallation and zero setup friction.

Continuous Memory

Chat history, transcripts, thinking logs, task plans, and artifacts all run directly from the external drive. Exactly where you stopped on one machine, you continue on the next.

No Host PC Dependencies

Host PC does not need Antigravity, Node.js, or Git pre-installed. Portable binaries are injected into PATH at runtime, isolated from the host system entirely.

Auto Mount & Auto Eject

Double-clicking the Auto Wrapper mounts memory and session via NTFS junction links, launches Antigravity, then auto-unmounts and restores the host profile the moment you close the window.

Architecture

Complete drive layout — one folder, everything inside.

Format your drive as NTFS and assign a fixed letter (X: recommended). Then create one root folder X:\AntigravityPortable\ with this structure:

X:\AntigravityPortable\
X:\AntigravityPortable\ │ ├── app\ ← Antigravity.exe + binaries ├── data\ │ ├── .gemini\ ← %USERPROFILE%\.gemini clone (Brain + Skills) │ │ └── antigravity\brain\ ← Chats, transcripts, step-by-step memory │ ├── appdata\ ← Electron session & login tokens │ └── backups\ ← Auto-snapshots (crash safety) ├── tools\ │ ├── git\cmd\ ← Portable MinGit (git.exe) │ ├── node\ ← Portable Node.js (node.exe, npm) │ ├── node_cache\ ← NPM cache isolated to drive │ └── vscode\ ← Optional: VS Code Portable ├── projects\ ← Your coding repositories │ ├── Antigravity_Auto.bat ← Auto mount, launch & auto eject ├── start_antigravity.bat ← Manual launcher (no watchdog) ├── eject_antigravity.bat ← Safe unmount script └── setup_portable_drive.bat ← 1-click drive cloner & setup

Capabilities

What the portable architecture handles automatically.

Memory

Full Brain Portability

The entire .gemini directory — brain, MCP configs, skills, scratch files — mounts as a live junction link to the host profile. Antigravity sees no difference from a native install.

Session

Login State Persistence

Electron session tokens, window state, and auth credentials stored in %APPDATA%\Antigravity are junction-linked from the drive. No re-authentication on every new machine.

Tools

PATH Injection

On launch, the script prepends portable git\cmd and node\ paths to %PATH%. Antigravity terminal commands work on any PC without host-side installations.

NPM Cache

Host Drive Protection

npm_config_cache is redirected to tools\node_cache\ on the external drive. Zero gigabytes deposited on the host PC's C: drive during any npm install.

Safety

Auto Snapshot Backup

Before every launch, a mirror of brain\ is written to data\backups\brain_snapshot\ via Robocopy. Power cuts and sudden drive pulls can't corrupt your primary memory.

Cleanup

Stale Lock Removal

Crash-generated antigravity_state.pbtxt.lock files are deleted automatically on every launch — preventing workspace lock issues that cause Antigravity to freeze on startup.

Star Script

Antigravity_Auto.bat — one double-click does everything.

The recommended entry point. Self-elevates for Administrator, mounts memory, launches Antigravity, monitors the process, and auto-unmounts with full host restore when you close the window.

Antigravity_Auto.bat — session lifecycle
:: 1. Auto self-elevation (UAC prompt if not admin) net session >nul 2>&1 || powershell Start-Process cmd -Verb RunAs :: 2. Inject portable tools into PATH set "PATH=%ROOT_DIR%tools\git\cmd;%ROOT_DIR%tools\node;%PATH%" set "npm_config_cache=%ROOT_DIR%tools\node_cache" :: 3. Safety snapshot of brain before mount robocopy brain\ backups\brain_snapshot\ /MIR /NFL /NDL >nul :: 4. Mount memory + session via NTFS junction mklink /J "%USERPROFILE%\.gemini" "%DATA_DIR%" mklink /J "%APPDATA%\Antigravity" "%APPDATA_SRC%" :: 5. Launch Antigravity start "" "%ROOT_DIR%app\Antigravity.exe" :: 6. Process watchdog loop — waits silently while you work :WAIT_LOOP tasklist | find "Antigravity.exe" >nul || goto CLEANUP timeout /t 3 >nul && goto WAIT_LOOP :: 7. Auto-unmount on close — zero extra clicks :CLEANUP rmdir "%USERPROFILE%\.gemini" move "%USERPROFILE%\.gemini.host_backup" "%USERPROFILE%\.gemini" rmdir "%APPDATA%\Antigravity" move "%APPDATA%\Antigravity.host_backup" "%APPDATA%\Antigravity"

Daily Use

The four-step daily workflow.

01 · Plug

Connect Drive

Plug external drive into any Windows PC. Drive letter auto-detected by the script.

02 · Launch

Double-Click Auto.bat

Accept UAC prompt. Memory mounts, tools inject, Antigravity opens — under 5 seconds.

03 · Checkpoint

Save State Before Leaving

Ask Antigravity to summarize work into task.md so the next session knows exactly where you stopped.

04 · Close

Auto-Eject on Window Close

Close the Antigravity window. Auto-Wrapper unmounts in 2 seconds. Unplug the drive.

Lifecycle

What updates automatically, what you control.

ComponentLocation on DriveUpdate Behavior
Memory & Brain data\.gemini\antigravity\brain\ 100% Auto Every message writes in real time. Never lost.
Login Session data\appdata\ 100% Auto No re-login on any new machine.
Skills & Rules data\.gemini\skills\ 100% Auto Custom rules and installed skills persist across machines.
Antigravity App app\ Update on your main PC, then copy the new Programs\Antigravity folder to app\.
Node / Git Tools tools\ Download new LTS zip every 6–12 months, extract to replace old version.

Pro Tips

Four things most people miss.

01 · Session Tokens

Link %APPDATA%\Antigravity

Antigravity stores Electron auth tokens and window state in AppData — not in .gemini. If you only copy .gemini, you'll be prompted to log in on every new PC. The Auto Wrapper links both.

02 · NPM Cache

Redirect Cache to Drive

Without npm_config_cache override, every npm install deposits gigabytes of package cache on the host C: drive. The launcher redirects it entirely to tools\node_cache\.

03 · Git Identity

Permanent Committer Config

Put your name and email in tools\git\.gitconfig. The script sets GIT_CONFIG_GLOBAL to point there — so every commit on every PC carries the same identity without running git config again.

04 · Long Paths

Enable longpaths = true

React and Next.js node_modules create nested paths over 260 characters. Add longpaths = true to your portable .gitconfig to prevent clone and build errors on Windows.

Troubleshooting

Three common problems, solved.