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 |
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.
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 |
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, guidelines, and MCP configuration — see Environment variables.