Headless mode
You can run Junie CLI in headless mode without interactive UI in CI/CD environments and build pipelines. Such integration will automatically trigger AI code reviews or other prompts as part of your CI or build pipeline.
Installation
Authentication token
Junie CLI requires an authentication token to run. To generate the token, go to junie.jetbrains.com/cli.
Usage
Authenticate Junie CLI using the --auth option and run the junie command with your prompt as a positional argument:
To list all available command options, run:
For the full list of available options and environment variables, see reference.
Project trust
Interactive UI launches always enforce project trust. One-shot prompts, piped-input tasks, ACP, Gateway, and other non-interactive CLI tasks do not show the interactive project-trust prompt. Trust-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 the rollout is enabled, non-interactive CLI tasks load project-scoped Junie inputs only when the canonical project has a valid authenticated exact-project marker or is below a valid authenticated parent-directory marker. An unknown project continues in restricted mode with writable temporary project Junie storage outside the repository, so ordinary project reading and editing still work without loading repository-controlled MCP servers, hooks, agents, skills, or guidelines.
To create a marker, start junie interactively and select Trust this project or Trust all projects in <parent>. Delete the corresponding marker under <Junie Home>/trust to revoke exact or inherited parent trust for the next process launch. Explicit --config-location paths remain deliberate inputs and are loaded in restricted mode.
Gateway and ACP modes retain their existing trusted behavior while the non-interactive rollout toggle is disabled. Enabling it applies the same marker-aware restricted behavior to those modes without prompting.