layer5io / layer5io/layer5

[Blog] Write a blog post on how to configure Gemini CLI for trusted directories

Open
#7,297 1 comment 1 reaction 2 assignees View on GitHub

@yi-nuo426 is already working on this.

Since Dec 28, 2025.

area/blog framework/gatsby help wanted language/markdown
Dominant language
JavaScript
Stars
1.1k
Forks
1.6k
Avg merge
2d 10h
Merged PRs (30d)
18

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/dir2
Paths 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 show

The 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.