CLI reference
Complete reference for the 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-... |
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-... |
--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-... |
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 to resume a previous session. If none is provided, a new session ID is generated. | junie --session-id 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" |
--task | Provide the task description (alternative to positional argument). | junie --task "task in plain English" |
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" |
-h, --help | Show the help message and exit. | junie --help |
-t, --timeout | The time limit in milliseconds. | junie --timeout 30000 |
--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-locations | Enable or disable adding custom slash commands from the default per-user and per-project locations. Defaults to | junie --command-default-locations 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 |
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" |
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.