Add folders outside the project to the workspace

getting started

// what it does

By default the agent can only touch files under the directory you launched from. --include-directories widens the workspace to extra folders so a single session can reason across a shared library and its consumer. Pass a comma-separated list, or repeat the flag; you can also add directories live with the /directory add command.

// shell

$ gemini --include-directories ../shared-lib,../api-types
$ gemini --include-directories ../docs

// gotcha

Included directories become writable to the agent, not just readable — a YOLO or auto-edit run can modify files in every listed folder. Only add trees you are comfortable having edited.

// resources