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

You can also start an interactive session with a prompt already submitted using the --prompt flag:

junie --prompt "Fix the failing tests in the auth module"

Unlike --task (which runs in headless mode), --prompt opens the full interactive TUI and auto-submits the prompt after onboarding. The session stays interactive — you can continue typing new prompts after the initial one completes.

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.

Some built-in slash commands accept user prompts as arguments. For example, /new fix tests starts a new session with fix tests in the prompt, and /plan refactor commands enables plan mode and submits refactor commands immediately.

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 /brave slash command or the Ctrl+B shortcut.

Brave mode on

Plan mode

In plan mode, Junie CLI analyzes the codebase with read-only operations and produces a design document for the task before any code is written. Toggle plan mode with the Shift+Tab shortcut or the /plan slash command.

You can also start Junie CLI directly in plan mode using the --plan flag:

junie --plan junie --prompt "Refactor the commands module" --plan

For details, see Plan Mode.

Debug mode

In debug mode, Junie CLI acts as an AI debugging assistant that manages breakpoints, inspects runtime state, and evaluates expressions against a live debugger session in a connected JetBrains IDE. Toggle debug mode with the Shift+Tab+Tab shortcut or the /debug slash command. For details, see Debug 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. Use /new <prompt> to start a new session with the prompt text already filled in.

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.

Continue the session in a browser

Use /remote to share the running Junie CLI session with the Junie web app and continue working on the same task from another device. For details, see Remote Mode.

Model and effort

Use /model to select the LLM and, for supported models, the reasoning effort level 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.

Model selection with effort

Effort level

For models that support adjustable reasoning effort (for example, recent Claude, GPT-5, and Gemini models), you can pick how hard the model thinks before answering. The set of supported effort levels (such as Low, Medium, High, XHigh, Max) depends on the selected model.

You can change the effort level in two ways:

  • Use the /model command and pick an effort level alongside the model.

  • Use the dedicated /effort command to change only the effort level for the current model.

Effort level selection

You can also set the default effort level for new sessions with the --effort <level> CLI flag or the JUNIE_EFFORT environment variable. For details, see Model selection.

Local code review

Use the /review slash command to run a code review of your local changes before you commit them. Junie CLI uses the same review backend as automated code reviews on GitHub, so the feedback you get locally is consistent with what would be reported on a pull request.

When you run /review, Junie CLI detects the git state of the project and offers a wizard with only the review targets that make sense in the current state:

  • From Main — review your current branch against main. Shown only when a main branch exists and you are not currently on it (there is nothing to compare if you are already on main).

  • Last Commit — review the diff of the most recent commit. Always available as long as the project has at least one commit.

  • Unstaged Changes — review changes that are not yet staged. Shown only when there are actual unstaged changes in the working tree.

Pick an option, and Junie will start a review task that comments on the selected diff.

Review wizard

After the review is complete, Junie presents the findings and lets you accept or dismiss individual comments.

Review results

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

08 June 2026