Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Antigravity Auto Accept & Run Terminal 自动接受New to Visual Studio Code? Get it now.
Antigravity Auto Accept & Run Terminal 自动接受

Antigravity Auto Accept & Run Terminal 自动接受

gitbuster

|
17 installs
| (1) | Free
Auto accept Antigravity Agent file changes, terminal commands and permission dialogs with built-in dangerous command blacklist. Supports Antigravity v1.107.0. 自动接受文件改动、命令执行和权限弹窗,内置高危命令黑名单保护。支持 Antigravity v1.107.0。
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

rh # Antigravity Auto Accept

English | 中文

Settings Panel

Tired of clicking "Run", "Accept All", "Allow" hundreds of times a day? Let this plugin handle it for you — automatically accept file changes, execute terminal commands, and approve permission dialogs while you focus on what matters.

✅ Supports Antigravity v1.107.0 (latest version)

💤 Leave it running overnight — your Agent keeps coding while you sleep. The built-in 110+ rule blacklist ensures dangerous commands are automatically blocked, so you can trust it to work safely unattended.

⚠️ PLEASE READ THE USAGE GUIDE BELOW BEFORE USE!

⚠️ 使用前请务必阅读下方使用教程!

⚠️ MUST READ! 必看!


English

Automatically accept Antigravity Agent's file changes and terminal commands, with built-in dangerous command blacklist protection.

⚡ Features

  • ✅ Auto Accept Files — Automatically switch tab and Accept when Agent modifies files
  • ✅ Auto Run Terminal — Automatically click Run / Allow for Agent commands
  • ✅ Multi-target CDP — Connect to both sidebar Agent panel and Agent Manager
  • ✅ Safe OFF — Injected scripts fully cleaned up when disabled
  • 🛡️ Dangerous Command Blacklist — 110+ rules (substring + regex), supports Reject or Stop
  • ⚙️ Settings Panel — Fine-grained control for File Accept, Terminal Run, Blacklist behavior
  • 🌐 Bilingual UI — Settings panel supports English / 中文
  • 🔄 Race Condition Protection — Auto retry when command text hasn't rendered yet
  • 📜 Smart Auto Scroll — Automatically scrolls Agent Manager to the bottom while auto-terminal is enabled, ensuring new Run/Allow buttons are rendered. Controlled by the Auto Run Terminal toggle. Does not affect other pages (Settings, Launchpad)
  • 🎉 Welcome Guide — First-run notification guides you to the built-in User Guide
  • 📖 Built-in User Guide — Collapsible help section in Settings with usage notes, feature explanations, and links
  • 🔗 Antigravity v1.107.0 Compatible — Tested and optimized for the latest Antigravity version

🚀 Installation

1. Launch Antigravity with CDP

Manually add --remote-debugging-port=9222 to the shortcut target.

2. Install the Extension

Option A: Download from Release (recommended)

  1. Go to Releases → Download the latest .vsix
  2. Ctrl+Shift+P → Extensions: Install from VSIX... → Select the .vsix file

Option B: Build from source

git clone https://github.com/git-buster/antigravity-auto-accept.git
cd antigravity-auto-accept
npm install
npx @vscode/vsce package --allow-missing-repository --skip-license

Then Ctrl+Shift+P → Extensions: Install from VSIX... → Select the generated .vsix file

⚠️ Important

  • Do not install other auto-accept extensions (e.g. pesosz) — they will conflict
  • Security tip: Set Terminal Command Auto Execution to Request Review in Antigravity settings for double protection

📋 Usage

⚠️ Prerequisites for Terminal Auto-Run

Terminal auto Run/Reject requires Agent Manager:

  1. Open Agent Manager (not the sidebar Toggle Agent)
  2. Switch to the corresponding chat window in Agent Manager — the plugin can only detect command buttons for the active session
  3. Enter commands in Agent Manager for the Agent to execute
  4. Keep Agent Manager open — closing it breaks CDP connection

✅ Status bar must show CDP x3 or higher for terminal auto-run to work. This means Agent Manager is connected. CDP x2 or lower means Manager may not be connected — file Accept works but terminal auto-run may NOT.

🎉 First-Run Notification

After installing or updating, a notification will appear guiding you to the 📖 User Guide in the Settings panel.

  • Click OK → Notification will appear again next launch
  • Click OK, Don't Show Again → Won't show for this version (will reappear after the next update)

Settings Panel

Click the status bar (bottom right) to open the settings panel:

Item Description
Master Switch Toggle plugin on/off
Auto Accept Files Toggle auto file acceptance
Auto Run Terminal Toggle auto command execution
Blacklist Action Reject dangerous commands or Stop plugin
Language / 语言 Switch between English / 中文

🌐 How to Switch Language

  1. Click the status bar (bottom right) → Settings panel opens
  2. Find Language / 语言 dropdown
  3. Select English or 中文
  4. The panel and all tooltips update immediately

Status Bar

Status Meaning
✓ ON \| CDP x3 ✅ Normal — Manager + editor windows connected, terminal auto-run works
✓ ON \| CDP x4+ ✅ Normal — multiple editor windows + Manager connected
✓ ON \| CDP x2 ⚠️ Manager may not be connected — terminal auto-run may not work (open Agent Manager!)
✓ ON \| CDP x1 ⚠️ Only editor connected — file Accept works, but terminal auto-run does NOT work
⚠ ON \| CDP Disconnected ❌ No CDP connection, check --remote-debugging-port=9222
✕ OFF Disabled

🛡️ Blacklist

Configure in settings.json (Ctrl+, → search autoAccept).

⚠️ Values in settings.json override defaults (not merge).

Blacklist Action Modes:

Mode Behavior
🔴 Reject Auto-click the Reject button to block the dangerous command. The plugin continues running and will keep monitoring subsequent commands.
🛑 Stop Plugin Skip clicking any button. The plugin automatically turns OFF the master switch and stops all automation, waiting for manual intervention. Use this mode if you want full human review after a dangerous command is detected.

🔧 Troubleshooting

Issue Solution
CDP Disconnected Ensure --remote-debugging-port=9222 is set
Blacklist not blocking Run Diagnose to check debug log
CDP fails after packaging Don't use --no-dependencies flag
Terminal auto-run stuck Go to Agent Manager and try clicking the Run button manually. If the button is unresponsive, the Manager has frozen — close and reopen Antigravity to fix it
Settings not taking effect After changing settings (e.g. Auto Run Terminal), toggle the Master Switch OFF and ON to apply changes

📝 Changelog

v1.3.4

  • 🚀 Optimized CDP connection speed — Filtered out unnecessary targets (Launchpad), only connects to Manager + editor windows for faster and more stable performance
  • 📝 Improved status bar documentation — CDP x2+ required for terminal auto-run, x1 = file Accept only

v1.3.3

  • 🔧 Improved user experience

v1.3.2

  • 🔧 Improve UX and clean up dead code

v1.3.1

  • 🆕 Antigravity v1.107.0 Support — Full compatibility with the latest Antigravity version

v1.2.4

  • 🆕 Smart Auto Scroll — Automatically scrolls Agent Manager to the bottom when auto-terminal is enabled. Uses page title detection to only affect Agent Manager (not Settings or Launchpad). Turn off Auto Run Terminal to stop scrolling.
  • 🔧 Live Settings Sync — Settings changes (auto-terminal on/off, blacklist action) take effect instantly via dual update mechanism (lightweight property + full re-injection)
  • 🐛 Fixed: Blacklist reject getting stuck due to internal variable reference error
  • 🐛 Fixed: Master switch / terminal toggle not properly taking effect after settings change

v1.2.3

  • 🆕 Auto Scroll to Bottom — Agent Manager uses virtual scrolling; scroll to bottom ensures new buttons are rendered
  • 🔧 Internal: Updated injected script version

v1.2.2

  • Initial public release with dual-engine architecture, 110+ blacklist rules, bilingual UI, and Settings panel

💬 Feedback

If you encounter any issues or have suggestions, please submit feedback on GitHub Issues. Thank you for your support!


中文

每天反复点击 "Run"、"Accept All"、"Allow",烦不烦? 这个插件帮你全自动处理 — 文件改动自动接受,终端命令自动执行,权限弹窗自动通过。

✅ 支持 Antigravity v1.107.0(最新版本)

💤 晚上挂机睡觉,Agent 帮你写代码。 内置 110+ 条高危命令拦截规则,遇到恶意命令自动阻止,无人值守也安全无忧。

自动接受 Antigravity Agent 的文件改动和终端命令,内置高危命令黑名单保护。

⚡ 功能

  • ✅ 自动接受文件改动 — Agent 修改文件时自动切换 tab 并 Accept
  • ✅ 自动执行终端命令 — Agent 运行命令时自动点击 Run / Allow
  • ✅ 多目标 CDP — 同时连接侧边 Agent 面板和 Agent Manager
  • ✅ OFF 安全停止 — 关闭后注入脚本完全清除
  • 🛡️ 高危命令黑名单 — 预置 110+ 条规则(子串 + 正则),支持主动拒绝 (Reject) 或停止插件 (Stop)
  • ⚙️ 弹出设置菜单 — 细分控制文件 Accept、终端 Run、黑名单行为
  • 🌐 中英文双语 — 设置面板可切换语言
  • 🔄 防竞态机制 — 命令文本未渲染完时自动重试,避免绕过黑名单
  • 📜 智能滚底 — 在自动终端开启时自动将 Agent Manager 滚动到底部,确保新的 Run/Allow 按钮被渲染。由「自动执行终端命令」开关控制,不影响 Settings 和 Launchpad 页面
  • 🎉 首次使用引导 — 安装或更新后弹出通知,引导查看内置使用说明
  • 📖 内置使用说明 — 设置面板内可折叠的帮助区,包含注意事项、功能介绍、黑名单模式说明
  • 🔗 兼容 Antigravity v1.107.0 — 针对最新版 Antigravity 测试和优化

🚀 安装

1. 以 CDP 模式启动 Antigravity

手动在快捷方式目标末尾加 --remote-debugging-port=9222

2. 安装插件

方式 A:从 Release 下载(推荐)

  1. 前往 Releases → 下载最新的 .vsix 文件
  2. Ctrl+Shift+P → Extensions: Install from VSIX... → 选择 .vsix 文件

方式 B:从源码构建

git clone https://github.com/git-buster/antigravity-auto-accept.git
cd antigravity-auto-accept
npm install
npx @vscode/vsce package --allow-missing-repository --skip-license

然后 Ctrl+Shift+P → Extensions: Install from VSIX... → 选择生成的 .vsix 文件

⚠️ 注意

  • 不要同时安装其他 auto-accept 插件(如 pesosz 的),会冲突
  • 安全建议:在 Antigravity 设置中将 Terminal Command Auto Execution 设为 Request Review,配合本插件的黑名单可以双重保护

📋 使用

⚠️ 终端自动执行前提条件

终端命令的自动 Run/Reject 功能必须通过 Agent Manager 窗口运行:

  1. 打开 Agent Manager(不是侧边栏的 Toggle Agent)
  2. 切换到对应的聊天窗口 — 插件只能检测当前活跃会话的命令按钮
  3. 在 Agent Manager 中输入命令让 Agent 执行
  4. Agent Manager 窗口不能关闭,否则 CDP 连接会断开,自动执行失效

✅ 状态栏必须显示 CDP x3 或更高,终端自动执行才能工作。这表示 Agent Manager 已连接。如果只显示 CDP x2 或更低,说明 Manager 可能未连接 — 文件 Accept 正常,但终端自动执行可能不会工作,请打开 Agent Manager!

🎉 首次使用提示

安装或更新后会弹出通知,引导你到设置面板查看 📖 使用说明。

  • 点击 知道了 → 下次启动仍会提示
  • 点击 知道了,不再提示 → 当前版本不再弹出(更新后会重新提示)

设置菜单

点击右下角状态栏弹出设置菜单:

菜单项 说明
总开关 控制插件整体启停
自动接受文件改动 单独控制是否自动 Accept 文件
自动执行终端命令 单独控制是否自动 Run 命令
黑名单行为 选择拦截后是点击 Reject 还是停止插件
语言 / Language 切换 English / 中文

🌐 如何切换语言

  1. 点击右下角状态栏 → 设置面板打开
  2. 找到 语言 / Language 下拉框
  3. 选择 中文 或 English
  4. 面板和所有提示文本立即更新

状态栏

状态 含义
✓ ON \| CDP x3 ✅ 正常 — Manager + 编辑器窗口已连接,终端自动执行正常
✓ ON \| CDP x4+ ✅ 正常 — 多个编辑器窗口 + Manager 已连接
✓ ON \| CDP x2 ⚠️ Manager 可能未连接 — 终端自动执行可能不工作(请打开 Agent Manager!)
✓ ON \| CDP x1 ⚠️ 只连接了编辑器 — 文件 Accept 正常,但终端自动执行不会工作
⚠ ON \| CDP Disconnected ❌ 未连接,检查 --remote-debugging-port=9222
✕ OFF 已关闭

🛡️ 黑名单

在 settings.json 中配置(Ctrl+, → 搜索 autoAccept)。

⚠️ settings.json 的值覆盖默认值(不是合并)。

黑名单触发模式:

模式 行为
🔴 主动拒绝 (Reject) 自动点击 Reject 按钮拦截该危险命令。插件继续运行,后续命令仍会正常监控和执行。
🛑 停止插件 (Stop) 不点击任何按钮,插件自动关闭总开关,停止所有自动化操作,等待人工干预。适用于检测到危险命令后希望完全由人工接管的场景。

🔧 常见问题

问题 解决
CDP Disconnected 确保用 --remote-debugging-port=9222 启动
黑名单没拦截 运行诊断查看 debug log
打包后 CDP 连不上 不要加 --no-dependencies
终端自动运行卡住 去 Agent Manager 手动点击 Run 按钮。如果按钮无法手动点击,说明 Manager 已卡死,需要关闭并重新启动 Antigravity
修改设置后未生效 修改设置(如自动执行终端命令)后,请将总开关关闭再开启以使配置生效

📝 更新日志

v1.3.4

  • 🚀 优化 CDP 连接速度 — 过滤掉不必要的目标(Launchpad),仅连接 Manager + 编辑器窗口,连接更快更稳定
  • 📝 完善状态栏说明 — CDP x2+ 才能自动执行终端命令,x1 = 仅文件 Accept

v1.3.3

  • 🔧 优化了用户体验

v1.3.2

  • 🔧 优化用户体验,清理无用代码

v1.3.1

  • 🆕 支持 Antigravity v1.107.0 — 完全兼容最新版 Antigravity

v1.2.4

  • 🆕 智能滚底 — 自动终端开启时自动将 Agent Manager 滚动到底部。通过页面标题识别,仅影响 Agent Manager(不影响 Settings 和 Launchpad)。关闭「自动执行终端命令」即可停止滚底。
  • 🔧 设置即时同步 — 设置变更(终端开关、黑名单行为)通过双重更新机制(轻量属性更新 + 完整重注入)即时生效
  • 🐛 修复:黑名单拦截卡住(内部变量引用错误导致 scan 崩溃)
  • 🐛 修复:总开关 / 终端开关切换后不生效

v1.2.3

  • 🆕 自动滚底 — Agent Manager 使用虚拟滚动,滚底确保新按钮被渲染
  • 🔧 内部:更新注入脚本版本

v1.2.2

  • 首个公开版本:双引擎架构、110+ 条黑名单规则、中英文双语界面、弹出设置面板

💬 问题反馈

如果你遇到任何问题或有建议,请在 GitHub Issues 中提交反馈,感谢你的支持!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft