Junie Help

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

  • Project 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:

  1. Keep untrusted — continue with isolated temporary project Junie storage.

  2. Trust this project — trust only the canonical project directory.

  3. 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):

  1. Command-line flags

  2. User settings from ~/.junie/settings.json

  3. Project configuration from <project-root>/.junie/config.json when the CLI project is trusted

  4. User 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:

junie \ --config-location /opt/company/junie/config.json \ --config-location ./configs/junie.local.json

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 config.json from the default user and project locations. Defaults to true.

Supported configuration fields

The following JSON fields are currently supported in config.json:

Field

Description

model

Default model to use. For supported built-in model IDs and custom model profiles, see Model selection and Custom LLM models.

provider

Default BYOK provider. For supported provider values, see LLM providers.

brave

Enables brave mode by default.

flags

Additional feature flags.

mcp-locations

Extra folders where Junie should search for MCP configurations.

mcp-default-locations

Enable or disable the default MCP locations.

skill-locations

Extra folders where Junie should search for agent skills.

skill-default-locations

Enable or disable the default skill locations.

command-locations

Extra folders where Junie should search for custom slash commands.

command-default-locations

Enable or disable the default custom slash command locations.

agent-locations

Extra folders where Junie should search for custom agents.

agent-default-location

Enable or disable the default custom agent locations.

model-locations

Extra folders where Junie should search for custom model profiles.

model-default-locations

Enable or disable the default model locations.

auto-update

Enable or disable automatic update checks.

guidelines-location

Path to the guidelines file Junie should use.

time-limit

Default task time limit.

byok

Default BYOK API keys for supported providers.

proxies

Custom proxy endpoints for routing LLM traffic.

hooks

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

{ "model": "sonnet", "provider": "anthropic", "brave": false, "flags": [], "mcp-locations": ["./mcp", "./shared/mcp"], "mcp-default-locations": true, "skill-locations": ["./skills"], "skill-default-locations": true, "command-locations": ["./commands"], "command-default-locations": true, "agent-locations": ["./agents"], "agent-default-location": true, "model-locations": ["./models"], "model-default-locations": true, "auto-update": true, "guidelines-location": "./team-guidelines.md", "time-limit": 3600, "byok": { "anthropic": "sk-ant-...", "openai": "sk-..." }, "proxies": [ { "name": "my-proxy", "kind": "Ingrazzio", "api-url": "https://my-ingrazzio-instance.example.com", "headers": ["X-Custom-Header: value"] } ], "hooks": { "SessionStart": [ { "matcher": "startup", "hooks": [ { "type": "command", "command": "aws sso login --profile dev" } ] } ] } }

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.

28 July 2026