Fezu home

Run JetBrains Junie in a tab

Agents: junie · On: phone, desktop

A tab can run Junie, JetBrains' coding agent CLI (junie). Fezu drives it over the CLI's ACP mode, so its answers, edits, plans and approvals show in the same transcript as the other agents.

Why you would use it

You use Junie with a JetBrains AI subscription, or with your own model key, and want to run it from the phone with the same controls you use on the other agents' tabs. Without either, you can still run Junie's free model in one-shot runs. This page lists what Junie does in a tab and what it does not.

How to use it

  1. Install the CLI if the workstation does not have it. See install-an-agent.
  2. Log in. Junie runs on a JetBrains account with a JetBrains AI subscription, or on a model key in the workstation's environment. See Logging in below.
  3. Pick Junie in a tab's agent menu (#agentpick, under the message box), then a model in the model menu (#modelpick).
  4. Set the effort on the same menu: low, medium, high or xhigh, as the model offers them.

The agent menu with Junie in its list after Copilot, with its mark.

Logging in

A JetBrains account without a JetBrains AI subscription logs in, but Junie then refuses every message in a full session. With How Junie runs on Auto (the default), Fezu then moves the tab to one-shot runs on Junie's free model; see One-shot runs. With it on Full session (ACP) the tab shows:

No active JetBrains AI subscription found. Junie needs a JetBrains AI subscription for this account, or a model key in the box's env (JUNIE_API_KEY or a provider key); see /login.

One-shot runs

A one-shot run sends each message to Junie as a run of its own, and the next message carries on the same Junie session. It is the only way to reach Junie's free model (Junie Lite): JetBrains turns that model off in a full session, so an account with no JetBrains AI subscription can use Junie only this way.

  1. Open the cog's Agents card and tap Junie's row.
  2. Pick how Junie runs in How Junie runs (#agent-run-junie):
    • Auto: a full session while your account can run one. When a message fails because the account has no subscription, the workstation remembers it and new Junie tabs open on one-shot runs. A model key in the workstation's environment keeps Auto on a full session.
    • Full session (ACP): always a full session, with every Junie feature this page lists.
    • One-shot runs: always one-shot runs.
  3. A tab on one-shot runs shows Junie's default model in the model menu (#modelpick), with the efforts low, medium and high. Without a model key that is the free model.

On Auto, a tab at Full whose message fails for lack of a subscription moves on its own and sends the same message again. The transcript shows:

Junie has no plan on this account: switched to one-shot runs on Junie's free model

A tab in Plan does not switch: its message fails with Junie has no plan on this account, and one-shot runs have no Plan; turn Plan off to run on Junie's free model, and nothing is sent again.

A tab at Ask or Auto stays where it is, and its message fails with:

Junie's free model runs only at Full, with no approvals; set the tab to Full to use it.

The workstation forgets that the account has no subscription when you log in to Junie again, and when you change How Junie runs. The setting is kept on each workstation and is not synced to your other workstations.

What a one-shot tab does:

What works

The levels

Fezu What Junie does
Ask Edits files without asking. Asks before it runs a command. Each request is a card.
Auto Runs the commands Junie judges safe. Asks before the rest.
Full Asks nothing.
Plan (flag) Junie's plan mode, on any level. It reads and plans, and asks before any command.
Full, on one-shot runs Asks nothing. The only level a one-shot run has; there is no Plan.

What you see

Options and settings

Setting Default What it changes
JUNIE_BIN (environment variable on the workstation) unset The path to the junie binary. It wins over every other place Fezu looks.
JUNIE_HOME (environment variable on the workstation) ~/.junie Where Junie keeps its sessions and logs. Fezu reads both there.
Update every hour, agentUpdate.junie off Runs Junie's installer once an hour when no Junie tab works. See update-agents-automatically.
How Junie runs, agentRun.junie Auto A full session, one-shot runs on Junie's free model, or Auto, which picks. Kept on each workstation. See One-shot runs.

Limits and known gaps