Operate a remote Antigravity IDE from Telegram using Chrome DevTools Protocol (CDP), without private API interception.
- Send prompts from Telegram to Antigravity.
- Inspect state with
/status,/screen, and/conversation. - Switch models from
/models. - Run safely with workspace restriction (
AUTHORIZED_WORKSPACE_ROOT). - Handle approval prompts with manual mode or
AUTO_ALLOW=true.
index.js— Telegram bot entrypoint.src/cdp.js— CDP automation engine.setup.sh— systemd + environment bootstrap.scripts/auth-link.js— emits a browser login URL.scripts/smoke-test.js— checks CDP/model access.scripts/export-antigravity-profile.sh— export signed-in profile from laptop.scripts/import-antigravity-profile.sh— import profile archive on server.scripts/migrate-antigravity-profile.sh— one-step laptop→server profile migration.
- Install dependencies and prepare
.env:
npm install
cp .env.example .env- Set at least:
BOT_TOKEN=...
AUTHORIZED_CHAT_ID=...- Run setup:
npm run setup- Start services:
systemctl --user start <service-prefix>-xvfb <service-prefix>-ide <service-prefix>-bot- Verify:
npm run smokeThis is the fastest path for new users who are already signed in locally.
Run this from your laptop in this repo:
npm run profile:migrate -- <server-user>@<server-host> --service-prefix <service-prefix>Example:
npm run profile:migrate -- raid@10.36.16.97 --service-prefix agsc-yashThis single command exports local profile, uploads it, imports on server, and restarts <service-prefix>-ide + <service-prefix>-bot.
Useful options:
npm run profile:migrate -- <server> --source ~/.config/Antigravity --remote-data-dir ~/.antigravity-server-data --service-prefix agsc-myinstancenpm run profile:migrate -- <server> --no-restartCreate a profile archive:
bash scripts/export-antigravity-profile.sh ~/antigravity-profile.tar.gzIf auto-detection fails, provide source explicitly:
bash scripts/export-antigravity-profile.sh ~/antigravity-profile.tar.gz --source "<local-antigravity-profile-dir>"Copy the archive to server:
scp ~/antigravity-profile.tar.gz <server-user>@<server-host>:/tmp/Import to your server user-data directory:
bash scripts/import-antigravity-profile.sh /tmp/antigravity-profile.tar.gz ~/.antigravity-server-dataSet in .env:
AG_USER_DATA_DIR=/home/<server-user>/.antigravity-server-dataThen restart the IDE service when you are ready:
systemctl --user restart <service-prefix>-ide- Required:
BOT_TOKEN,AUTHORIZED_CHAT_ID - Common:
AUTHORIZED_WORKSPACE_ROOT,SERVICE_PREFIX,CDP_PORT,DISPLAY_NUM - Runtime data:
AG_USER_DATA_DIR,AG_EXTERNAL_OPEN_CAPTURE_FILE - Optional default approval:
AUTO_ALLOW=true
/help/status/stop/new/screen/conversation/models/open <relative-or-absolute-path-within-workspace-root>/auto on/auto off/restart/shutdown
- Only
AUTHORIZED_CHAT_IDcan control the bot. - File operations are constrained to
AUTHORIZED_WORKSPACE_ROOT. - Do not commit
.env, profile archives, screenshots, or logs. - Repository files are host/user/token agnostic by default.
Start:
systemctl --user start <service-prefix>-xvfb <service-prefix>-ide <service-prefix>-botStop:
systemctl --user stop <service-prefix>-bot <service-prefix>-ide <service-prefix>-xvfbTail bot logs:
journalctl --user -u <service-prefix>-bot -fPrint login URL:
npm run auth:url