Context & The Core Problem
Managing command permissions in Antigravity is currently frustrating and unintuitive. Clicking “Allow” on a permission prompt saves the exact, fully-resolved string (including all paths, flags, and chained commands).
To illustrate how bloated this gets just by working normally, here is an actual snippet of my config.json:
"command(git diff)",
"command(git diff --name-only)",
"command(git diff --stat)",
"command(git diff --stat; git diff)",
"command(git diff *)",
"command(git diff HEAD)",
"command(git diff; git log -n 5)",
"command(git log)",
"command(git log --stat -n 3)",
"command(git log -n 1)",
"command(git log -n 10 --oneline)",
"command(git log -n 5)",
"command(git log -n 5 --oneline)",
"command(git log -n 5 --oneline; git status)",
"command(git log -n 5 ; git diff --staged)",
"command(git log -n 5; git status)",
"command(dotnet test)",
"command(dotnet test c:\\Users\\...\\Repos\\projectXY\\projectXY.Application.Test\\projectXY.Application.Test.csproj)",
"command(dotnet test projectXY.sln)"
I am prompted for every single variation. If the AI runs dotnet test projectXY.sln instead of just dotnet test, I get a prompt. If the AI chains commands or just changes a space (e.g., git diff;git status vs git diff ; git status), I am forced to accept every new variant.
The Problems
No Explicit Wildcards:
According to the docs, the wildcard * only works for an entire namespace (e.g., command(*)). If I intuitively try to allow all git diff commands by writing command(git diff *), it simply fails. The system forces me to either allow everything globally or suffer through endless prompts.
AI just wants to use other commands:
Example 1 - Dotnet Test:
While the whitelistet command(dotnet test) could be used, it always wants to use another command, which I didnt allow yet. If it asks for command(dotnet test ProjectX.sln) Ill allow it and the next time it asks for some other command like command(dotnet test c:\\Users\\..\\Repos\\ProjectX\\Projectx.sln…
Example 2 - Git
"command(git diff)",
"command(git diff --name-only)",
"command(git diff --stat)",
"command(git diff --stat; git diff)",
"command(git diff *)",
"command(git diff HEAD)",
"command(git diff; git log -n 5)",
"command(git log)",
"command(git log --stat -n 3)",
"command(git log -n 1)",
"command(git log -n 10 --oneline)",
"command(git log -n 5)",
"command(git log -n 5 --oneline)",
"command(git log -n 5 --oneline; git status)",
"command(git log -n 5 ; git diff --staged)",
"command(git log -n 5; git status)",
"command(git status)",
"command(git status -s)",
"command(git status ; git diff)",
"command(git status ; git diff ; git diff --staged)",
"command(git status; git diff)",
"command(git status; git diff HEAD)",
"command(git status; git log -n 5)",
"command(git status; git log -n 5 --oneline)",
It cant be, that i allow git diff, git status, git log and then get asked for every little command which isnt exactly like the ones that are already allowed and that it asks for git diff and then git diff --staged and whatsoever… ![]()
Proposed Solutions
Support Explicit Wildcards:
Officially support the asterisk * in command rules so that command(git diff *) or command(dotnet test *) works exactly as users expect, matching any trailing arguments.
Better Matching:
The permission engine should ignore trailing command separators like ; or && when matching tokens, so that a rule for git status successfully matches git status;.