Junie
Junie Brave Mode and Action Allowlist: Auto-Approve Commands in Junie CLI
How do I stop Junie from asking for approval on every command?
Add allow rules to ~/.junie/allowlist.json so trusted commands run without asking, or turn on brave mode with /brave or Ctrl+B. Brave mode has three levels: Off, Auto and On. On runs all sensitive actions without asking, so pair it with sandbox mode where available.
Brave mode levels
- Off: Junie asks before every sensitive action that is not on the allowlist.
- Auto: a safety check approves terminal commands it thinks are safe and still asks about risky or unknown ones.
- On: Junie runs all sensitive actions without asking.
Cycle levels with the /brave slash command or Ctrl+B. Brave preferences are stored separately for sandboxed and non sandboxed sessions.
Turn on brave mode by default or at launch
~/.junie/config.json
{
"brave": true
}Launch flags
junie --brave junie --sandbox
--sandbox starts Junie in sandbox mode, which lets you use brave mode with less risk. Sandbox mode is only in development, nightly and experimental builds and is not supported on Windows.
The action allowlist file
Junie CLI reads allow rules from ~/.junie/allowlist.json. You can edit it by hand.
~/.junie/allowlist.json
{
"defaultBehavior": "ask",
"allowReadonlyCommands": true,
"rules": {
"executables": {
"rules": [
{ "prefix": "git", "action": "allow" },
{ "pattern": "grep **", "action": "allow" },
{ "pattern": "npm [iur]*", "action": "ask" }
]
}
}
}Rule types and syntax
- Action types: fileEditing, executables, mcpTools, readOutsideProject, readSecretFile.
- Each rule has a prefix or a pattern, plus action set to allow or ask.
- prefix matches commands that start with that text.
- pattern uses glob syntax: * (no /), ** (any characters including /), ? (one character), [abc] and [!abc].
How matching works
- Rules run top to bottom and the first match wins. Put an npm install * ask rule above an npm allow rule to keep installs gated.
- Each part of a && chain is checked and all must be allowed.
- Substitutions like $(...) and backticks are checked at any depth.
- Multi line commands always ask.
In the JetBrains IDE plugin
The plugin settings have an Action Allowlist page with Terminal rules, MCP rules and other rule types, an Add button, and a Check Command button to test a command against your rules.
Get Junie settings changes by email
When a setting, flag or permission rule in this guide changes, it goes in the weekly AgentAtlas update, checked against the vendor docs. One email a week.
Sources
More on Junie
More Junie guides
Other guides
Reviewed Oct 13, 2026. Settings change often; the linked vendor docs are the source of truth.