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. | 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, | 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: | junie --input-format json |
--output-format | Specify output format for print mode (options: | 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. | 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 |
--session-id | Use a specific session ID, or a | 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 | junie --prompt "Fix the bug" |
--system-prompt | Add process-local user guidelines to the top-level issue agent in every session, alongside guidelines loaded from files such as | junie --system-prompt "Follow the team conventions" |
--plan | Start interactive mode in Plan Mode. Can be combined with | 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 | 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. Possible values: | 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 | junie --max-steps 50 "my task" |
--fork-session | Copy the session given by | junie --session-id abc --fork-session "my task" |
--act-as-interactive | Run the task with the interactive prompt and tools (the | junie --act-as-interactive "explain the build" |
--share-anonymous-statistics | Override the anonymous usage statistics sharing setting for this run. Accepts | 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 --channel=eap |
--use-version=<build> | Run a specific installed build. When combined with | junie --use-version=243.22562.218 |
--force, -f | Reinstall the latest build of the current channel when used with | junie update --force |
--release | Deprecated compatibility option. It no longer selects the release channel; use | junie --channel=release |
--eap | Deprecated compatibility option. It no longer selects the EAP channel; use | junie --channel=eap |
--nightly | Deprecated compatibility option. It no longer selects the nightly channel; use | junie --channel=nightly |
--experimental | Deprecated compatibility option. It no longer selects the experimental channel; use | 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. | junie --cache-dir "/tmp/junie-cache" |
--agent-mode | Set the initial agent mode ( | junie --agent-mode chat |
-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 | junie --config-location ./configs/junie.json |
--config-default-locations | Enable or disable loading configuration from the default locations: | 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 | 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 | 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 | 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 | junie --command-default-location false |
--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 | junie --agent-default-location false |
--extensions-default-location | Override the default extensions directory ( | 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" |
The code review issue agent is available in Nightly and Experimental builds only through non-interactive JSON input:
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 codeReviewIssueTask; otherwise, it reviews local changes. There is no --review-issue flag or /review-issue command, and legacy EJ_TASK input is not supported for this task.
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 | 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.