promptgarten 🌱

Command reference Β· Antigravity CLI

/add-dir

Adds an extra directory to the active workspace.

/add-dir <path> belongs to the Utilities category of Antigravity CLI slash commands and extends the active workspace with an additional directory. By default, the agent only sees the session's starting directory; with /add-dir it also gets read and write access to another folder, such as a second repository or a sibling directory in the file system. The command takes a path as a required argument and supports shell-like path autocompletion while typing. Newly added directories are immediately taken into account for file search and autocomplete, without needing to restart the session. /add-dir also pulls in customization discovery for the new folder: skills, rules, and hooks stored there are automatically detected and made available to the agent just like in the main directory. Distinction: /add-dir permanently attaches a directory for the rest of the conversation and grants access to its entire content. For a one-time reference to a single file, an @ mention in the prompt is enough instead, without permanently extending the workspace.

πŸ”„ THE SAME TASK (β€œADD FILE/FOLDER TO CONTEXT”) ON OTHER PLATFORMS

Compare all 28 tasks β†’

βœ… WHEN TO USE IT?

Include code from a second repository or folder

/add-dir ../shared-lib

Add a monorepo subproject to the session in addition

/add-dir packages/api

β›” WHEN NOT TO?

Referencing a file just once

/add-dir permanently attaches an entire directory to the workspace, which is unnecessarily heavy for a one-time reference.

Better: use @<path> directly in the prompt

The directory contains sensitive data the agent shouldn't have permanent access to

/add-dir grants read and write access to the entire folder content and attaches its skills/rules/hooks for the rest of the conversation - more access than needed for a single reference.

Better: Reference only the specific file actually needed via @<path>, instead of exposing the whole folder

SOURCES

MORE COMMANDS Β· Antigravity CLI

/agents/artifact/btw/clear/config/context/copy/credits/diff/exit/fast/feedback

All commands Β· Antigravity CLI β†’

Share:𝕏inπŸ’¬