Junie Help

CLI reference

Complete reference for the commands and command-line flags available with the junie command. For the full list of environment variables, see Environment variables.

Command-line flags

Authorization options

Junie token

Option

Description

Example

-a, --auth

Provide a token (Junie API key) to authenticate with Junie CLI.

To generate the token, visit junie.jetbrains.com/cli.

junie --auth perm-...
--auth-license

Provide a license key to start Junie with the specified license.

junie --auth-license ...

Provider API keys

Use these variables to authenticate directly with a specific LLM provider (BYOK). Only the key for the provider of your selected model is required.

Option

Description

Example

--anthropic-api-key

API key for Anthropic (Claude models).

junie --anthropic-api-key sk-...
--google-api-key

API key for Google AI (Gemini models).

junie --google-api-key AI...
--grok-api-key

API key for xAI (Grok models).

junie --grok-api-key sk-...
--meta-api-key

API key for Meta Model API (Muse Spark models).

junie --meta-api-key ...
--openai-api-key

API key for OpenAI (GPT models).

junie --openai-api-key sk-...
--openrouter-api-key

API key for OpenRouter, an aggregator service that provides access to a wide variety of LLMs from different providers through a unified API (BYOK).

junie --openrouter-api-key sk-...
--litellm-url

Base URL of a LiteLLM proxy (for example, http://localhost:4000). Used together with --litellm-api-key.

junie --litellm-url http://localhost:4000
--litellm-api-key

API key for the LiteLLM proxy. Optional for self-hosted proxies that do not require authentication.

junie --litellm-api-key sk-...

Core options

Option

Description

Example

--input-format

Specify input format for piped input (options: text, json).

junie --input-format json
--output-format

Specify output format for print mode (options: text, json, json-stream).

junie --output-format text
--json-output-file

Save JSON output to a file.

junie --json-output-file ./output.json
--guidelines-filename

Name or path of a custom guidelines file to use instead of the default. See guidelines file resolution order.

junie --guidelines-filename "guidelines_ci.md"
--model

Specify the model to be used by Junie CLI.

When not specified, Junie CLI uses the default model that is set dynamically.

For the list of supported model aliases, see available models.

junie --model sonnet "my task"
--project, -p

Specify the path to the project directory where Junie will run. When not specified, the current project directory is used.

junie --project ./path/to/project
--trust-project

Trust the project directory and load its .junie configuration for the current process without writing persistent trust markers. Also available as JUNIE_TRUST_PROJECT=true. Ignored for the user home directory.

junie --trust-project "my task"
--session-id

Use a specific session ID, or a junie://sessions/<id> session link, to resume a previous session. A session link can also be passed as the positional argument: junie junie://sessions/<id>. If none is provided, a new session ID is generated.

junie --session-id junie://sessions/session-251209-172932-1ze8
--skip-update-check

Disable the automated check for and download of the latest Junie CLI update on startup.

junie --skip-update-check "my task"
--prompt

Start interactive mode with an initial prompt already submitted. The TUI opens and the prompt is auto-submitted after onboarding. Unlike --task, the session stays interactive — you can continue typing new prompts after the initial one completes.

junie --prompt "Fix the bug"
--system-prompt

Add process-local user guidelines to the top-level issue agent (and to a custom agent launched with --agent) in every session, alongside guidelines loaded from files such as AGENTS.md. The value is not saved to settings or session history. If an ACP client also supplies a session system prompt, Junie CLI appends it after this value on a new line. Chat agents and subagents do not receive these instructions.

junie --system-prompt "Follow the team conventions"
--plan

Start interactive mode in Plan Mode. Can be combined with --prompt to auto-submit a prompt in plan mode.

junie --plan
--task

Provide the task description (alternative to positional argument).

junie --task "task in plain English"
--resume

Resume the last session, or the session specified by --session-id.

junie --resume
--brave

Turn on Brave Mode. Interactive mode only.

junie --brave
--demo

Run a visual demo of a feature using computer use. Requires a running Docker daemon and a model with Computer Use support.

junie --demo
--effort

Set the model reasoning effort level. Built-in levels: none, minimal, low, medium, high, xhigh, max. Supported values depend on the selected model and can include custom efforts defined for custom models. Fails with an error listing the model's supported efforts if the value is unsupported or blank. Requires --model, JUNIE_MODEL, --agent, or JUNIE_AGENT.

junie --model opus --effort high
--provider

Select the BYOK provider to use. When not set, the Junie or Custom model provider is used.

junie --provider openai
--use-local-cache

Enable local AI caches even when they are disabled in the configuration.

junie --use-local-cache
--max-steps

Limit the number of agent steps per task. Takes precedence over the MAX_STEPS environment variable and the step limit setting.

junie --max-steps 50 "my task"
--fork-session

Copy the session given by --session-id into a new session and run the task there; the original session is left untouched. Cannot be combined with --resume.

junie --session-id abc --fork-session "my task"
--act-as-interactive

Run the task with the interactive prompt and tools (the answer tool, chat modes) while still running unattended: the agent never asks the user anything. Requires a task.

junie --act-as-interactive "explain the build"
--share-anonymous-statistics

Override the anonymous usage statistics sharing setting for this run. Accepts true or false.

junie --share-anonymous-statistics false

Managed launcher options

These options control version, channel, and update routing in managed Junie CLI installations. They are hidden from junie --help because they are intended for the managed launcher rather than the running application.

Option

Description

Example

--channel=<name>

Run a build from the specified channel for this invocation without changing the default channel. With junie update, switch the installed channel instead. Supported values: release, eap, nightly, and experimental.

junie --channel=eap
--use-version=<build>

Run a specific installed build. When combined with --channel, run the specified build from that channel for this invocation.

junie --use-version=243.22562.218
--force, -f

Reinstall the latest build of the current channel when used with junie update. The root command accepts this option only for managed launcher compatibility; it has no effect without update.

junie update --force
--release

Deprecated compatibility option. It no longer selects the release channel; use --channel=release instead.

junie --channel=release
--eap

Deprecated compatibility option. It no longer selects the EAP channel; use --channel=eap instead.

junie --channel=eap
--nightly

Deprecated compatibility option. It no longer selects the nightly channel; use --channel=nightly instead.

junie --channel=nightly
--experimental

Deprecated compatibility option. It no longer selects the experimental channel; use --channel=experimental instead.

junie --channel=experimental

System options

Option

Description

Example

--acp

Enable Agent Client Protocol (ACP) mode for IDE/editor integrations. See Junie for ACP clients for details.

junie --acp true
-c, --cache-dir

Specify a custom path to the directory where Junie CLI will store caches.

This is useful for isolating data between different projects or when working in environments with restricted access to the default home directory.

junie --cache-dir "/tmp/junie-cache"
--agent-mode

Set the initial agent mode (classic or chat) for newly created sessions.

junie --agent-mode chat
--log-prompt-usage

When enabled, append each prompt's text (up to 100 lines), token count, and cost to log-prompt-<date>-pid-<pid>.log under <Junie Home>/logs (defaults to ~/.junie/logs). Disabled by default. Supported in headless runs, including release builds. Interactive and ACP logging requires a local development build and excludes replayed completions. Also available as JUNIE_LOG_PROMPT_USAGE.

junie --log-prompt-usage "my task"
-h, --help

Show the help message and exit.

junie --help
--version

Show Junie CLI version.

junie --version

Configuration file options

Option

Description

Example

--config-location

Add an extra config.json file location. Can be specified multiple times.

junie --config-location ./configs/junie.json
--config-default-locations

Enable or disable loading configuration from the default locations: ~/.junie/config.json and <project>/.junie/config.json. Defaults to true.

junie --config-default-locations false

For more information on configuration files and precedence, see Junie CLI configuration files.

MCP options

Option

Description

Example

--mcp-location

Specify additional folders where MCP servers should be found. Can be specified multiple times to add several locations.

junie --mcp-location /path/to/mcp
--mcp-default-locations

Enable or disable adding MCP servers from default locations (per-user and per-project). Defaults to true.

junie --mcp-default-locations false

For more information on configuring MCP servers, see MCP configuration.

Model and skill discovery options

Option

Description

Example

--model-location

Specify additional folders where custom model profiles should be found. Can be specified multiple times.

junie --model-location ./.junie/models
--model-default-locations

Enable or disable adding custom models from the default per-user and per-project locations. Defaults to true.

junie --model-default-locations false
--skill-location

Specify additional folders where agent skills should be found. Can be specified multiple times.

junie --skill-location ./shared-skills
--skill-default-locations

Enable or disable adding skills from the default per-user and per-project locations. Defaults to true.

junie --skill-default-locations false
--command-location

Specify additional folders where custom slash commands should be found. Can be specified multiple times.

junie --command-location ./shared-commands
--command-default-location

Enable or disable adding custom slash commands from the default per-user and per-project locations. Defaults to true.

junie --command-default-location false
--agent

Run the named custom agent as the session's main agent in Classic session mode.

junie --agent code-review-helper "Check my diff"
--agent-location

Specify additional folders where custom agents should be found. Can be specified multiple times.

junie --agent-location ./shared-agents
--agent-default-location

Enable or disable adding custom agents from the default per-user and per-project locations. Defaults to true.

junie --agent-default-location false
--extensions-default-location

Override the default extensions directory (~/.junie/extensions).

junie --extensions-default-location ./my-extensions

These options can also be set in config.json. For details, see Junie CLI configuration files.

Version control options

Option

Description

Example

--merge

Start a merge-conflicts resolution task between the current branch and the specified branch or commit.

junie --merge feature-branch
--rebase

Start a rebase-conflicts resolution task for the specified branch or commit.

junie --rebase 1a2b3c4
--review

Start a code review task. Can be combined with a task description.

junie --review "Review my changes"

JSON review input also runs the code review issue agent:

printf '%s' '{"codeReviewTask":{"description":"Review my changes"}}' | junie --input-format=json

The description is optional and defaults to Review the code. To review a remote pull or merge request, add "reviewTarget":{"type":"remoteRequest","number":42} inside codeReviewTask; otherwise, it reviews local changes. The codeReviewTask JSON key accepts the description, review target, diffCommand, and allowApprove. allowApprove defaults to true; set it to false to keep the agent's approval verdict while preventing an approval from being issued on the remote pull/merge request. This field requires a Junie CLI version that supports it. A diffCommand must be a plain git diff over revisions, otherwise the review fails. Without a diffCommand, the changes to review are inferred from the description; when they cannot be inferred, the review covers uncommitted changes. Other legacy options such as fetchVcsInfo and includeInlineCommentToolInstructions are ignored.

Commands

Commands run a single action and exit without starting a session.

Command

Description

Example

junie update

Download the latest available Junie CLI version. The update is applied the next time Junie CLI starts.

junie update
junie cache

Show disk usage for old versions, update archives, and logs. Doesn't delete anything.

junie cache
junie cache clean

Remove old versions, update archives, and logs. Use --dry-run to preview and --sessions to also remove old finished sessions.

junie cache clean --dry-run

For more information on cleaning up disk space, see Cache management.

Environment variables

Most command-line flags have equivalent environment variables, which is useful for CI/CD pipelines and headless environments.

For the full list of environment variables — including authentication, model selection, configuration files, guidelines, skills, and MCP configuration — see Environment variables.

19 November 2026