config.json
Junie CLI can load settings from JSON configuration files in addition to command-line flags and environment variables. Configuration files are useful when you want to keep shared project defaults in the repository or define personal defaults once for all projects.
Default configuration locations
By default, Junie CLI looks for config.json in these locations:
User scope:
~/.junie/config.jsonProject scope:
<project-root>/.junie/config.json
The project-level configuration is intended for settings that should be shared with the whole team. The user-level configuration is intended for personal defaults on your machine.
Project trust
Interactive Junie CLI sessions ask for a trust decision before loading project configuration from a project that has no valid stored trust marker:
Keep untrusted — continue with isolated temporary project Junie storage.
Trust this project — trust only the canonical project directory.
Trust all projects in
<parent>— trust the canonical parent directory and projects below it.
Junie canonicalizes project and scope paths and resolves symbolic links before evaluating trust. Exact trust applies only to that project. Parent trust applies to projects at or below the displayed canonical parent, using path-aware containment rather than string-prefix matching. A valid exact or ancestor marker lets a matching project start without another prompt.
An untrusted project remains the workspace for ordinary file operations, but Junie does not implicitly load project configuration, MCP servers, hooks, extensions, models, plans, demos, custom agents or commands, skills, root or project Junie guidelines, project memory, or automatic migration/onboarding sources. Instead, Junie uses a writable temporary project Junie directory outside the repository. MCP servers, skills, and commands added during the session use that directory and are removed when the CLI process closes. Global sources under Junie Home remain enabled.
After the interactive UI opens an untrusted project, its startup header explains that project files remain available while project-provided Junie configuration is not loaded.
Paths supplied explicitly through CLI options or environment variables, including --config-location, remain enabled because the user selected them deliberately.
Junie stores only a project-trust authentication key in macOS Keychain, Windows Credential Manager, or Linux Secret Service. Each exact-project or parent-directory scope has a separate authenticated marker under <Junie Home>/trust; the default location is ~/.junie/trust. The marker contains its kind and canonical path, but cannot grant trust unless its integrity code matches the key in native secure storage. Deleting an exact marker revokes that project; deleting a parent marker revokes inherited trust for projects below it on the next CLI process. Keeping a project untrusted does not create a denial marker.
If native secure storage is unavailable, its key is invalid, or a marker cannot be written and verified, a trust selection applies to the current run only and Junie reports that it was not persisted. Neither the key nor trust markers are written to settings.json or the plaintext secure_credentials.json fallback.
Interactive UI launches always resolve project trust and prompt when no valid exact-project or ancestor marker exists. Non-interactive JSON, ACP, and Gateway launches never write an interactive trust prompt into their output. Marker enforcement for these non-UI modes is controlled by a build rollout toggle and is currently disabled, so they retain their previous trusted behavior. When enabled, they use a valid matching marker when available and otherwise continue in restricted mode with temporary project Junie storage.
Configuration precedence
When the same setting is defined in multiple places, Junie resolves it in this order (highest priority first):
Command-line flags
User settings from
~/.junie/settings.jsonProject configuration from
<project-root>/.junie/config.jsonwhen the CLI project is trustedUser configuration from
~/.junie/config.json
For example, if ~/.junie/config.json sets "model": "sonnet", the project config sets "model": "gpt", and you run junie --model opus, the effective model is opus.
Add extra configuration files
To load additional configuration files, use --config-location. You can specify it multiple times:
Explicit configuration locations are loaded even when the CLI project is untrusted.
To disable loading from the default user and project locations, use --config-default-locations false.
For CI, you can use the equivalent environment variables:
Environment variable | CLI equivalent | Description |
|---|---|---|
JUNIE_CONFIG_LOCATION | --config-location | Additional configuration file paths. Can be specified multiple times. |
JUNIE_CONFIG_DEFAULT_LOCATIONS | --config-default-locations | Enable or disable loading |
Supported configuration fields
The following JSON fields are currently supported in config.json:
Field | Description |
|---|---|
| Default model to use. For supported built-in model IDs and custom model profiles, see Model selection and Custom LLM models. |
| Default BYOK provider. For supported provider values, see LLM providers. |
| Enables brave mode by default. |
| Additional feature flags. |
| Extra folders where Junie should search for MCP configurations. |
| Enable or disable the default MCP locations. |
| Extra folders where Junie should search for agent skills. |
| Enable or disable the default skill locations. |
| Extra folders where Junie should search for custom slash commands. |
| Enable or disable the default custom slash command locations. |
| Extra folders where Junie should search for custom agents. |
| Enable or disable the default custom agent locations. |
| Extra folders where Junie should search for custom model profiles. |
| Enable or disable the default model locations. |
| Enable or disable automatic update checks. |
| Path to the guidelines file Junie should use. |
| Default task time limit. |
| Default BYOK API keys for supported providers. |
| Custom proxy endpoints for routing LLM traffic. |
| Shell commands to run on session lifecycle events. See Hooks. |
Relative paths in config.json are resolved relative to the folder that contains that configuration file.
For safety, hooks from the default project configuration file are ignored. Use ~/.junie/config.json for personal hooks, or pass a hook config file explicitly with --config-location.
Example configuration file
How configuration combines with other features
Configuration files control discovery for several other Junie CLI features:
For the exact command-line flags, see CLI reference.