How to Track AI IDE Commands with Suvadu
AI-powered code editors like Cursor, Antigravity, and Windsurf run shell commands as part of their agent workflows — installing packages, running tests, modifying configs. Those commands run with your full permissions, but they vanish the moment you close the terminal tab. Here's how to use Suvadu to capture every command your IDE executes, regardless of which editor you use.
The Problem
When you use an AI IDE's agent mode or integrated terminal, commands run in a shell session the editor controls. You might see npm test flash by, or a git diff scroll past, but unless you're actively watching, the details are lost. Close the terminal tab, and they're gone entirely.
This is especially problematic when your IDE:
- Installs or removes packages you didn't explicitly approve
- Runs build scripts or test suites with unexpected flags
- Modifies configuration files via shell commands
- Executes multiple commands in sequence where only the last output is visible
Supported IDEs
Suvadu detects 6+ IDE terminals automatically by inspecting environment variables each IDE sets in its shell sessions:
| IDE | Detection Variable | Executor Label |
|---|---|---|
| Cursor | $CURSOR_INJECTION | cursor |
| Antigravity | $ANTIGRAVITY_AGENT | antigravity |
| Windsurf | $WINDSURF | windsurf |
| VS Code | $VSCODE_INJECTION | vscode |
| IntelliJ IDEA | $INTELLIJ_ENVIRONMENT_READER | intellij |
| PyCharm | $PYCHARM_HOSTED | pycharm |
All of these are recorded with executor_type=ide and the specific editor name as the executor value. Detection happens automatically on every command — no manual tagging required.
Setup
Setting up IDE tracking takes two steps:
Step 1: Install shell hooks
If you haven't already, add Suvadu's shell hooks to your shell configuration:
# For Zsh (add to ~/.zshrc) eval "$(suv init zsh)" # For Bash (add to ~/.bashrc) eval "$(suv init bash)"
Step 2: Run the init command for your IDE
$ suv init cursor ✓ Shell hooks detected in ~/.zshrc ✓ Cursor environment variables detected Cursor commands will be tracked automatically. $ suv init antigravity ✓ Shell hooks detected in ~/.zshrc ✓ Antigravity environment variables detected Antigravity commands will be tracked automatically.
Each init command verifies that your shell hooks are in place and that the IDE's environment variables are detectable. No additional configuration needed — as long as the hooks are loaded, every command in the IDE's terminal is captured automatically.
For VS Code, Windsurf, IntelliJ, and PyCharm, detection is fully automatic once shell hooks are installed. No separate init step required.
Verifying It Works
Open your IDE's integrated terminal and run any command. Then verify:
$ suv search --executor cursor # You should see your recent Cursor commands with executor=cursor $ suv search --executor antigravity # Same for Antigravity commands
Querying IDE Commands
Once tracking is active, you can filter your history by specific IDE or across all IDEs at once:
# All commands from a specific IDE today $ suv search --executor cursor --after today $ suv search --executor antigravity --after today # All IDE commands (any editor) from today $ suv search --executor-type ide --after today # IDE commands in the current project $ suv search --executor cursor --here # Failed IDE commands this week $ suv search --executor-type ide --exit-code 1 --after "7 days ago" # Replay what your IDE did chronologically $ suv replay --executor cursor --after today
Human vs IDE Commands
One of the most useful queries is comparing what you typed versus what your IDE ran:
$ suv stats --days 7 Executor Breakdown (last 7 days) ───────────────────────────────── human │████████████████████████ 1,203 (58%) cursor │████████ 412 (20%) antigravity │████ 248 (12%) claude-code │██ 128 ( 6%) vscode │█ 62 ( 3%) windsurf │ 31 ( 1%)
If your IDEs collectively account for a third of your commands, that's a significant portion of your workflow running without direct oversight. Suvadu makes that visible at a glance.
Combining with AI Agent Tracking
IDE tracking pairs naturally with Suvadu's Claude Code integration. You can query across all non-human executors at once:
# Everything that wasn't typed by you $ suv search --executor-type agent,ide --after today # Or filter to specific combinations $ suv search --executor cursor,claude-code,antigravity --after today
Best Practices
- Review after agent sessions. A quick
suv search --executor-type ide --after todaytakes 10 seconds and surfaces anything unexpected. - Watch for package installs. Filter for
npm install,pip install, orcargo addcommands to catch dependency changes. - Bookmark useful patterns. When your IDE solves something cleverly,
suv bookmark add <id>so you can reference it later. - Add notes for context.
suv note <id> -c "Cursor installed this for auth migration"turns raw commands into documented decisions. - Use tags. If you work on multiple projects, auto-tagging by directory keeps your IDE commands organized per-project.
Install Suvadu, run suv init for your IDE, and start tracking every command your editor runs.
Total recall for your terminal. Database-backed shell history with AI agent tracking, built in Rust.
Install now →Madhubalan Appachi
Building developer tools at Appachi Tech. Creator of Suvadu and Kaval.