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.
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.
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.
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.
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
Format your drive as NTFS and assign a fixed letter (X: recommended). Then create one root folder X:\AntigravityPortable\ with this structure:
Capabilities
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.
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.
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_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.
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.
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
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.
:: 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
01 · Plug
Plug external drive into any Windows PC. Drive letter auto-detected by the script.
02 · Launch
Accept UAC prompt. Memory mounts, tools inject, Antigravity opens — under 5 seconds.
03 · Checkpoint
Ask Antigravity to summarize work into task.md so the next session knows exactly where you stopped.
04 · Close
Close the Antigravity window. Auto-Wrapper unmounts in 2 seconds. Unplug the drive.
Lifecycle
| Component | Location on Drive | Update 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
01 · Session Tokens
%APPDATA%\AntigravityAntigravity 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
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
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
longpaths = trueReact 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
ACCESS DENIED — Cannot create link
Cause: Standard user accounts cannot create NTFS directory junctions without elevation.
Fix: The Auto Wrapper includes built-in self-elevation. Simply click Yes on the UAC prompt that appears on launch.
NODE / GIT IS NOT RECOGNIZED
Cause: Portable binary path in tools\ is incorrect or files are missing.
Fix: Verify that tools\node\node.exe and tools\git\cmd\git.exe exist at those exact paths. Re-extract the portable zips if needed.
DRIVE LETTER CHANGED (X: became D: or G:)
Cause: Windows reassigned the drive letter on a different host PC.
Fix: The script uses %~dp0 for self-relative paths, so it auto-detects the current letter. For permanent fix: open diskmgmt.msc on the host and reassign the drive letter back to X:.