Command reference ยท Antigravity CLI
/hooks
Browses the active pre-/post-hooks.
/hooks belongs, according to the official CLI reference, to the "Tools & Tasks" category and opens a searchable overview in the TUI of all currently loaded and active pre- and post-hooks. These are scripts that Antigravity automatically runs before or after certain agent actions, such as a pre-flight check before a tool call or automatic formatting after a file has been written.
Hooks are defined either directly in your settings.json or shipped as part of a plugin via its own hooks.json; /hooks shows you, bundled together, what is actively loaded from both sources. The underlying configuration lives by default at ~/.gemini/config/hooks.json โ an earlier bug, fixed in version 1.0.8, accidentally wrote changes to a different, non-shared path.
The command itself changes nothing: it is a pure inspection tool, not an editor for hooks.
โ WHEN TO USE IT?
Check active hooks before a session
Type /hooks to see whether a plugin has registered, for example, a post-edit formatting hook
Find the cause of unexpected behavior
After a surprising automatic format run following a save, open /hooks to check which hook is responsible
โ WHEN NOT TO?
Wanting to enable/disable a plugin entirely
/hooks only shows an overview, it does not manage plugins directly.
Better: Use agy plugin enable <name> or agy plugin disable <name>
Wanting to edit hooks yourself
According to the docs, /hooks is a pure inspection tool, not an editor for hooks.json.
Better: Edit hooks.json directly in settings.json or in the respective plugin folder
SOURCES
- Antigravity CLI docs: command reference โ antigravity.google
- Antigravity CLI docs: Plugins โ antigravity.google
MORE COMMANDS ยท Antigravity CLI