Unless I don’t understand how AntiGravity works. Even if I would specify in the allowed commands “git add *”, I always get prompted for confirmation and I now have 400 unique commands I needed to allowed on one of my project.
Is it a know bug? Is is a user problem (me not understanding how to add/use wildcards).
Hi @SteveRodrigue,
- The
* wildcard only works at the tool namespace level (e.g., command(*) to allow all commands globally). It does not function as a shell glob for arguments, so Antigravity treats git add * as a literal string.
- Prefix matching often fails to match subcommands or arguments (especially on Windows/PowerShell). The UI then falls back to saving each exact, fully-resolved command string upon approval, causing the 400+ entry bloat.
Could you please follow these steps:
-
To allow git add with any file arguments without getting prompted each time, use the regex: prefix in your permissions allowlist:
-
{
"permissions": {
"allow": [
"command(regex:git add .+)",
"command(regex:git commit .+)",
"command(git status)",
"command(git diff)"
]
}
}
-
This matches git add followed by any path or argument, allowing you to safely delete the 400+ bloated one-off entries.
(Alternative: If you are working in a trusted local repository, you can also set Tool Permission / Terminal Command Auto Execution to “Always Proceed” in settings to bypass confirmation prompts entirely).
Thanks! I manually updated my file and after a reload of Antigravity, it seems to work.
I’m adding an excerpt of my config, because the structure wasn’t exactly the same in my project file:
"permissionGrants": {
"permissionGrants": {
"allow": [
"command(regex:git .+)",
"command(regex:gh .+)",
"command(regex:(?:npm|npx|node|tsx|winget|grep) .+)"
[...]