-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Contributors and community members are encouraged to post on https://layer5.io/blog. A new blog post fitting the following description is requested to be written by a community member:
Desired Title: gemini cli how to add trusted directories
Topic: Gemini CLI Configuration to avoid wasted time having to approve prompts.
Trusted directories can be added in the Gemini CLI through interactive prompts, commands, or by manually editing the configuration file.
Interactive Prompts
The CLI can prompt for trust settings.
When running the Gemini CLI in a new, untrusted folder, a dialog will appear.
Select Trust folder to trust the current directory. Select Trust parent folder to trust the current folder and all subdirectories.
To change the trust level for the current folder, run the /permissions command from within that directory to bring up the interactive dialog.
Commands for Multi-Directory Support
To give the CLI access to multiple directories, use the /directory command or the --include-directories flag.
To start a session with multiple directories:
gemini --include-directories path/to/dir1,path/to/dir2Paths can be absolute or relative.
To add a new directory during an active session:
/directory add <path>Multiple paths can be added, separated by commas.
To view all active directories:
/directory showThe alias /dir also works for these commands.
Manually Editing the Configuration File
Trusted folder rules are stored in a JSON file, which can be inspected or edited manually.
The file is located at ~/.gemini/trustedFolders.json in the home directory.
Edit this file directly to add or remove paths. Changes should take effect after restarting the CLI session.
Contributor Resources
The layer5.io website uses Gatsby, React, and GitHub Pages. Site content is found under the master branch.
- See contributing instructions
- See Layer5 site designs in this Figma project.