Your personal memory, across sessions, agents, and devices.

What Is Junie CLI? JetBrains' Model-Agnostic Coding Agent

memU Team memU Team

Junie CLI is the terminal version of Junie, JetBrains' AI coding agent. You run it from a project folder and pick the model behind it. Claude and GPT models are on the menu next to Gemini and Grok. Your sign-in method decides which models you see and who bills you. Junie's project context lives in plain files that survive a model switch. Facts come from the Junie CLI docs as read on October 28, 2026.

What is Junie CLI, in one sentence?

Junie CLI is JetBrains' agentic coding tool for the terminal, which plans and edits code in your project with a model you choose from several providers.

It runs on all three desktop systems. You can also run it headless, for example in a CI job with junie --auth and a prompt such as "Fix any failing tests." JetBrains ships a GitHub Action and a GitLab CI/CD setup for the same purpose. The AI Assistant docs describe Junie inside the IDE and point to the CLI docs for the terminal interface.

How does Junie CLI differ from Claude Code?

The usual comparison is Claude Code, Anthropic's terminal agent. Both read instruction files and support skills and subagents. The biggest difference is who picks the model.

Junie CLI Claude Code
Models Aliases for Anthropic, OpenAI, Google and xAI models, plus custom endpoints Anthropic's Claude models
How you pay JetBrains subscription, a usage-billed Junie API key, or your own provider key Anthropic plans or API
Instruction file .junie/AGENTS.md or a root AGENTS.md, plus a global ~/.junie/AGENTS.md CLAUDE.md, or AGENTS.md when no CLAUDE.md exists
Notes the agent writes itself Not described in the Junie docs Auto memory, first 200 lines or 25KB loaded per session
Imports from other agents /import for configs from Claude Code and other agents Reads an existing AGENTS.md

Sources: the Junie quickstart plus its pages on guidelines and slash commands. Claude Code from Anthropic's memory docs.

How do you install Junie CLI?

On macOS and Linux, the quickstart gives one command:

curl -fsSL https://junie.jetbrains.com/install.sh | bash

Windows has a PowerShell equivalent on the same page. Then run junie from the root of your project. On first launch you choose how to sign in:

  • A JetBrains account, which uses Junie as part of your JetBrains subscription.
  • A Junie API key from junie.jetbrains.com/cli, set as JUNIE_API_KEY. This one is billed by usage.
  • Your own provider key. The BYOK page lists six providers, from OpenAI and Anthropic to OpenRouter and GitHub Copilot.

Custom endpoints work too. For self-hosted models, the quickstart names Ollama and LM Studio as examples.

Which models does Junie CLI support?

Inside a session, /model opens the model picker. The model selection page lists short aliases that JetBrains maps to current versions. As of October 28, 2026, opus maps to Claude Opus 5.5 and gpt to GPT-6.1 Sol. gemini-pro maps to the Gemini 3.1 Pro preview, and grok maps to Grok 4.7. JetBrains says the model behind an alias may change over time.

If you pick nothing, Junie uses Default. JetBrains describes it as a dynamic choice with "the best price-quality ratio." Your sign-in method limits the list. With your own key, you only see that provider's models. Some models are reachable through both your key and a JetBrains subscription. In that case the key wins and the provider bills you.

Reasoning effort is a separate dial, set with /effort. The quickstart recommends the default because higher effort can cost much more and respond more slowly.

What does Junie CLI cost?

JetBrains does not print a CLI price on these pages. The cost depends on how you authenticate. A JetBrains account draws on your AI subscription, and a Junie API key is billed by usage. With your own provider key, the provider bills you directly. You then need no JetBrains subscription. The early access page adds that joining the EAP is free and includes a monthly usage quota.

To see what a session spent, run /usage. It shows the session's cost and token use next to your remaining balance.

Can Junie CLI run a team of agents?

Junie has no named agent-team feature, but two kinds of feature come close. Subagents are Markdown files with YAML front matter in .junie/agents/ or ~/.junie/agents/. The subagents page says the main agent delegates to them automatically by matching name and description. You cannot call one by hand with a slash command. A subagent model policy, in early access, decides whether they reuse the main model or may use a cheaper tier.

The second kind is manual. /new starts another live session, and /worktree gives that session its own Git worktree. /goal runs a single task in an orchestrated, step-by-step mode.

How does Junie CLI keep context between sessions and models?

Junie keeps project context in guideline files. At the start of each task it reads .junie/AGENTS.md first. If that is missing, it reads a root AGENTS.md plus .junie/playbook.md and any .junie/rules files. The legacy .junie/guidelines.md still works. A global file at ~/.junie/AGENTS.md is included too, and project rules win on conflict.

Because these are files, they survive a model switch. Opus and GPT read the same AGENTS.md. Conversation history is saved per session: /history resumes one, and /compact compresses the context, which may discard some information. The guidelines page does not describe a feature where Junie writes its own notes between sessions. Anything you want kept across sessions has to go into a guideline file. You can write it yourself or ask the agent to.

Junie also looks for other agents' files. The first time it opens a project, it offers to move another agent's guideline files into .junie/AGENTS.md. /import copies configs from Claude Code and other agents, Cursor among them. Skills from .claude/skills can be imported into .junie/skills. Each import is a copy. After it, the two files evolve on their own.

The bottom line

Junie CLI is worth trying if you want one agent that runs on Claude or GPT, or if you already pay for JetBrains AI. Start with the Default model and default effort, and pin a model only once you know which one suits your code. If you also run Claude Code or Codex, put shared rules in a root AGENTS.md and skip .junie/AGENTS.md, because Junie reads the root file only when .junie/AGENTS.md is missing.

How do you keep coding agent memory when you switch tools?

Every model inside Junie reads the same guideline files, so a model switch keeps your rules. A tool switch can lose them. Junie's import copies another agent's instructions once, and later edits on either side do not sync. Claude Code keeps its own auto memory per repository, and Codex keeps its own session history. If Claude Code learns that your tests need a running database, Codex will not know it.

memU is a lightweight, agent-driven memory system that keeps one shared wiki of Markdown for several agents. Each host adapter has two parts. The first is a scheduled background task that slices new session logs into jobs. The agent decides what to keep and writes it as memory or skill Markdown. The second is a standing instruction in CLAUDE.md or AGENTS.md that tells the agent to retrieve before answering.

memU itself makes no LLM or chat calls. All supported hosts share one backend, so what Codex learned, Claude Code can retrieve. Junie is not on memU's tested list today. The support matrix covers hosts such as Claude Code and Codex. A generic adapter detects agents beyond those, but we have not seen it tested with Junie.

To try the hosted version, which is free and syncs across devices, get an API key from memu.so and send your agent one message:

Read https://memu.pro/SKILL.md, follow its instructions to install and configure memU, API Key is YOUR_MEMU_API_KEY.

The self-hosted setup is in the memU GitHub repository, released under Apache-2.0.

FAQ

Is Junie CLI free?

Not by default. You pay through a JetBrains AI subscription or a usage-billed Junie API key. Your own provider key also works. The Junie CLI early access program is free and includes a monthly usage quota.

Which LLMs can Junie CLI use?

Built-in aliases cover models from Anthropic and OpenAI as well as Google and xAI. With your own key you can also use OpenRouter or GitHub Copilot. Self-hosted models work through endpoints such as Ollama or LM Studio.

Does Junie CLI read AGENTS.md?

Yes. It reads .junie/AGENTS.md first, and falls back to a root AGENTS.md combined with .junie/playbook.md and .junie/rules files.

Can I resume a Junie CLI session?

Yes. The /history command searches saved sessions and resumes one, and /link gives a session link you can pass to junie to reopen it.

Is Junie CLI the same as the Junie plugin in IntelliJ?

They are the same agent in different interfaces. The plugin runs inside JetBrains IDEs through AI Assistant, and the CLI runs in a terminal or in CI.