Junie Help

Using Junie in the terminal

Learn about working with Junie CLI in an interactive terminal interface.

Prompting

With Junie CLI installed and authenticated, navigate to the project directory where you want to use it.

  1. Start an interactive session with Junie CLI.

    junie
  2. Type your prompt in the natural language, for example:

    > find the files in this project that handle log error descriptions

Real-time follow-ups

You can type follow-up prompts while Junie CLI is working on the task without waiting for it to finish. The added clarifications are appended to the initial prompt and taken into account by the agent immediately.

Reference files and directories

Use @ to quickly reference files or directories in your prompt.

Reference files and folders

You can also drag and drop files and images into the terminal window to reference them.

Image inputs

Drag and drop or reference screenshots or design specs in the prompt for Junie CLI to read the image details. Junie CLI accepts all common image formats such as PNG and JPEG.

Search the prompt history

Junie CLI preserves your prompt history across all sessions and application runs.

To search the prompt history, use Ctrl+R, and then navigate through the results using Up and Down arrow keys.

Slash commands and shortcuts

Slash commands allow you to access various Junie CLI features directly from the prompt. Type / in the prompt to see and use the available slash commands.

In addition to the built-in commands, you can add custom slash commands for frequently used prompts and repetitive tasks.

To see all available shortcuts, type ?.

Run shell commands

You can run shell commands without leaving Junie CLI by prefixing it with !, for example:

!ls -la

Command approval

For running potentially sensitive actions, such as executing most of the terminal commands, editing files outside the project, or invoking MCP tools, Junie will ask for approval from the user.

Action Allowlist

When Junie CLI stops for user approval, you can select the → Always allow option to add the indicated command to the Action Allowlist. Once on the Action Allowlist, the command will always be executed without user approval in the future Junie runs.

Action allowlist junie cli

The full list of allowed commands and command patterns is stored in the ~/.junie/allowlist.json file. You can also edit this file manually to add or remove allowed or restricted commands and patterns. For details, see Action Allowlist configuration.

Brave mode

You can authorize Junie CLI to execute all potentially sensitive actions without user approval by enabling brave mode with the Ctrl+B shortcut.

Brave mode on

Plan mode

In plan mode, Junie CLI analyzes the codebase with read-only operations and creates an implementation plan without making any changes to the project files.

To toggle plan mode, use the Shift+Tab shortcut.

Plan mode enabled

Junie will suggest a plan and wait for the user input – either confirmation or rejection to proceed with the implementation. If you reject the plan, provide follow-up instructions to continue:

Reject the plan

Faster results mode

Faster results mode speeds up Junie CLI on the fly while your prompt is being run. To enable faster results mode, use the Ctrl+F shortcut.

Working faster mode

Manage your account

Use the /account command to manage your credentials and API keys:

  • Select Junie Account to authenticate with Junie CLI via JetBrains Account or a Junie API key.

    To generate a JUNIE_API_KEY access token, go to junie.jetbrains.com/cli.

  • Select Bring Your Own Key (BYOK) to add API keys for LLM providers like OpenAI, Anthropic, Google, or xAI.

Manage your session

Clear up session context

Use /new to clear up the context of the current session and start a new session in Junie CLI interactive mode.

View session transcript

To access the full transcript of the current session, including all previous prompts and the agent output, use the Ctrl+T shortcut. When in the Transcript view, use Ctrl+N to load older entries, or Esc to return to the main view.

Resume previous sessions

To see the session history and resume one of the previous sessions, use /history.

Junie CLI stores the full session context, including LLM usage data and the history of user prompts and agent responses, for the last 10 sessions.

Quit the session

To exit the Junie CLI interactive mode without losing login credentials, use /quit. Alternatively, you can exit Junie CLI by using Ctrl+C twice.

Model selection

Use /model to select the LLM used for the current session. Default is the recommended pre-selected option that uses a dynamically set model with the best price quality ratio.

The selection of available models depends on your authentication method with Junie CLI. With BYOK, only the provider-specific models are available.

Token usage and costs

The /usage command shows the cost breakdown for the current session, including token usage, used models, and remaining balance.

Check session cost

Extend Junie CLI

14 March 2026