Junie CLI and Claude Code are both proprietary terminal coding agents, and the choice between them is not a quality contest — it is a choice of endpoint boundary. Junie CLI's custom-model profiles accept four request formats, so it can drive any model your endpoint serves through one of those four; Claude Code accepts the Anthropic Messages format, and Anthropic states it "doesn't support routing Claude Code to non-Claude models through any gateway". Everything else — approval modes, sandboxing, what a subscription buys — follows from that one difference, and both of them bill internal helper traffic you never asked for — on different terms.
Naming the products precisely first, because JetBrains ships several things called Junie. Junie CLI is the terminal agent; the Junie IDE plugin, Junie Local and JetBrains AI Assistant are separate surfaces with different rules. Junie left beta on June 17, 2026, and the latest entry on the official What's New page is Release 26.9.14, build 3196.4, dated September 14, 2026. Claude Code publishes @anthropic-ai/claude-code to npm, where the registry listed 2.1.278 as latest on September 21, 2026. Neither carries an open-source licence: JetBrains' public repository carries an all-rights-reserved LICENSE.md, and Anthropic's package declares "SEE LICENSE IN README.md". The rest of this paragraph was checked September 19, 2026.
Which one should you pick
Pick Junie CLI if the model you want to run is not a Claude model, or if you want a route with no JetBrains money in it at all. Its custom-model documentation lists OpenAICompletion, OpenAIResponses, Google and Anthropic as the accepted apiType values, and its BYOK page states that "All usage is billed by the provider — no JetBrains AI subscription is required." Junie CLI also speaks ACP via junie --acp true; neither "ACP" nor "Agent Client Protocol" appears in Claude Code's documentation index.
Pick Claude Code if you are staying on Claude models, if you want OS-level command sandboxing in a build you can actually install, or if a flat-rate claude.ai subscription suits your usage better than metered tokens. Its sandbox documentation states the sandbox "is built into Claude Code and runs on macOS, Linux, and WSL2" with nothing to install on macOS. Junie's equivalent is gated: JetBrains states that "Sandbox mode is currently available only in development, nightly, and experimental builds. EAP and release builds do not expose --sandbox or /sandbox, and always keep sandbox mode off."
Being a JetBrains user is not by itself a reason to pick Junie. Anthropic ships an official JetBrains plugin for IntelliJ IDEA, PyCharm, Android Studio, WebStorm, PhpStorm and GoLand, which runs the claude command in the IDE's integrated terminal. The reverse asymmetry is sharper: JetBrains' own plugin documentation states that "Using your own API key with Junie is not supported via Junie plugin". Bringing your own key is a Junie CLI capability, not a Junie capability.
Migration cost is small on both sides and asymmetric in what it costs you. Junie takes one JSON file; Claude Code takes two environment variables. But switching Claude Code to a third-party endpoint disables Remote Control and voice dictation, and Slack and cloud sessions are outside a gateway deployment entirely — while pointing Junie at your own endpoint sends its internal helper traffic to your endpoint too, so JetBrains warns you "may see API calls to a model you didn't explicitly select". Those are the two real switching costs, and they are covered in detail below.
Junie CLI vs Claude Code: what actually differs
| Behaviour | Junie CLI | Claude Code |
|---|---|---|
| Request formats for a custom endpoint | Four: OpenAICompletion, OpenAIResponses, Google, Anthropic | Anthropic Messages, plus Bedrock InvokeModel and Google Cloud rawPredict variants |
| Base URL convention | The complete endpoint; JetBrains states Junie appends no path | The origin; Claude Code appends /v1/messages itself |
| Credential | apiKey in the profile; JetBrains documents only that omitting it sends requests "without an Authorization header", not the scheme it uses when present. $${VAR} interpolation supported | ANTHROPIC_AUTH_TOKEN → bearer, ANTHROPIC_API_KEY → x-api-key; the wrong one returns 401 |
| Non-Claude models | In scope by design | Anthropic states it does not support routing to non-Claude models through any gateway |
| Approval model | Brave mode Off / Auto / On via /brave or Ctrl+B; allowlist at ~/.junie/allowlist.json | Permission modes plus the sandboxed Bash tool |
| OS-level sandbox in a release build | No — development, nightly and experimental builds only | Yes on macOS, Linux and WSL2; native Windows not supported |
| Helper / background traffic | A separate internal role on top of your primary model; in a custom profile fasterModel inherits your primary model unless you override it | Background tasks go to the main model behind an ANTHROPIC_BASE_URL gateway, or to the default Haiku model when an Anthropic Console key is the credential |
| Agent Client Protocol | junie --acp true | Not present in the documentation index |
| Fully local path | Junie Local, macOS Apple Silicon only, with hard hardware requirements | None published |
Sources for this table, all read September 19, 2026: JetBrains' custom LLM models, Junie CLI and Junie Local pages, and Anthropic's gateway compatibility, gateway connection and gateway overview pages. One caveat on Junie Local: the August 24, 2026 announcement presents it as shipped, while the current documentation says the /local command "is available in nightly builds" on Macs with 64 GB of RAM or more. Those two official pages disagree; confirm in your own build before planning around it.
One more asymmetry worth knowing before you compare model quality. Junie's short aliases are not shortcuts to the newest build: its model-selection page mapped sonnet to Claude Sonnet 5, opus to Claude Opus 4.8, gpt to GPT-5.4, gemini-pro to Gemini 3.1 Pro Preview and grok to Grok 4.3 on September 19, 2026, and states that each alias "maps to a specific model version set by the JetBrains team based on our own internal evaluations and is not necessarily the latest available version". That table is explicitly mutable, so a session started with --model opus is not a like-for-like comparison against whatever Claude Code is running today unless you pin the version yourself.
What each one costs to run
Neither tool charges for itself. What differs is the default billing path, and JetBrains publishes two price columns that are easy to mix up.
| Plan | Personal, billed monthly | Organization, billed monthly | Included allowance |
|---|---|---|---|
| JetBrains AI Free | $0 | $0 | 3 AI Credits per 30 days |
| JetBrains AI Pro | $10 | $20 | 10 credits personal / 20 organization |
| JetBrains AI Ultimate | $30 | $60 | 35 credits personal / 70 organization |
| Junie CLI with BYOK or a custom endpoint | $0 to JetBrains; the provider bills you | No credits consumed | |
| Junie CLI on a Junie API key | Usage-based; no public rate card found | Not published | |
Prices from JetBrains' licensing and subscriptions page, checked September 19, 2026, which also states that "Each AI Credit equals $1 USD charged in your local currency" and that top-up credits are valid for 12 months. Two traps. First, the Junie pricing card quotes $8.33 and $25.00 per user per month for AI Pro and AI Ultimate against the help page's $10 and $30. The two are not a contradiction — the lower pair is what the card shows for the personal plans, and both pairs carry the same 10 and 35 credits per 30 days — but a figure from the card is not comparable to a monthly commitment. This guide did not find the annual total stated on either page, so none is quoted here. Second, the Junie landing page advertises "5 AI credits included" for its free start, while the help documentation documents 3 AI Credits per 30 days for AI Free; both pages are jetbrains.com and this guide could not reconcile them. The usage-based Junie API key route is the real gap: junie.jetbrains.com/cli redirects to a login wall, so no rate, markup or minimum is published outside it. No number is quoted here because none exists publicly.
| Claude plan | Billed annually | Billed monthly | Claude Code |
|---|---|---|---|
| Free | $0 | $0 | Not included |
| Pro | $17 / month | $20 / month | Included |
| Max | From $100 / month, at 5× or 20× Pro usage | Included | |
| Team, standard seat | $20 / seat / month | $25 / seat / month | Included |
| Team, premium seat | $100 / seat / month | $125 / seat / month | Included |
From claude.com/pricing, checked September 19, 2026. For a per-token anchor rather than a plan fee, Anthropic's cost documentation reports that across enterprise deployments "the average cost is around $13 per developer per active day and $150-250 per developer per month, with costs remaining below $30 per active day for 90% of users". JetBrains publishes no equivalent figure for Junie, so there is no honest way to put the two side by side as totals. One caveat if you plan to read your spend out of the client: the same page states that "Claude Code computes the dollar figure locally from token counts at list price" unless a modelPricing table is in effect, so behind any endpoint whose rates differ from Anthropic's list, the /usage figure is arithmetic rather than your bill.
Pointing either agent at your own endpoint
This is where the two diverge most concretely, and the base-URL convention is opposite between them, which is an easy way to make a working key produce a 404. Junie takes the full path; Claude Code takes the origin and appends /v1/messages itself, so the same string will not work in both places.
A Junie custom profile for an OpenAI-format endpoint, derived from JetBrains' published schema and not from a run — Junie CLI was not installed for this guide and no request was sent through it to Kunavo, so treat this as the documented shape to start from rather than a tested configuration:
{
"id": "claude-sonnet-5",
"displayName": "Kunavo — Claude Sonnet 5",
"baseUrl": "https://api.kunavo.com/v1/chat/completions",
"apiType": "OpenAICompletion",
"apiKey": "${KUNAVO_API_KEY}",
"fasterModel": { "id": "claude-haiku-4-5" }
}Save it as $JUNIE_HOME/models/kunavo.json for your user account or .junie/models/kunavo.json inside a project, then select it with junie --model custom:kunavo — the filename minus .json is the profile id, and custom models carry a custom: prefix. Swap baseUrl to https://api.kunavo.com/v1/messages with "apiType": "Anthropic", or to https://api.kunavo.com/v1/responses with "apiType": "OpenAIResponses", if you prefer either of those formats. Kunavo serves all three routes; which one Junie prefers for tool calling on a given model is not something this guide tested.
Claude Code, by contrast, needs no file at all:
# Claude Code appends /v1/messages itself, so the variable is an ORIGIN.
export ANTHROPIC_BASE_URL=https://api.kunavo.com
export ANTHROPIC_AUTH_TOKEN=sk-kn-...
claudeKunavo accepts the credential in either header, so both variables reach it; ANTHROPIC_AUTH_TOKEN is the simpler choice because Anthropic documents that with ANTHROPIC_API_KEY you are prompted once in interactive mode to approve the key before it takes over, while ANTHROPIC_AUTH_TOKEN takes precedence immediately. The same pair works in ~/.claude/settings.json under an env block, and a settings-file value beats a shell export. Full steps are in the Claude Code integration doc; for the general shape see what an LLM gateway is.
One detail that shows the boundary from the other side. Claude Code can list an endpoint's models in its /model picker when you set CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1, which queries GET /v1/models — a route Kunavo serves. But Anthropic's compatibility guide states that Claude Code "keeps an entry when its id contains claude or anthropic anywhere in the string" and ignores the rest. So even the discovery feature filters a mixed catalog down to the Claude models, which is the same boundary as the protocol restriction, expressed as a UI list.
The cost line most comparisons miss. JetBrains' model-selection documentation states that Junie "also uses a separate model for certain internal tasks" — summarizing context, classifying and routing tasks, extracting information for memory — and that "This applies even when using BYOK", so "you may see API calls to a model you didn't explicitly select." In a custom profile that is the fasterModel role, and the same documentation states role blocks "inherit the top-level properties" when not defined. A one-model profile therefore bills your helper traffic at your primary model's rate. The fasterModel override in the snippet above is the fix.
A worked cost estimate
This is token arithmetic on stated assumptions, not a measured task cost and not a bill ceiling. Assume one session sends 200k uncached input tokens and receives 12k output tokens on the primary model, and that Junie's helper role adds 60k input and 4k output on top — that helper ratio is an assumption for illustration, because neither vendor publishes one. Rates are live Kunavo catalog prices per million tokens.
| Model | Kunavo input / output per 1M | Primary only | Primary + helper on the same profile |
|---|---|---|---|
| Claude Sonnet 5 | $2.00 / $10.00 | $0.520 | $0.680 |
| Claude Opus 5 | $2.00 / $10.00 | $0.520 | $0.680 |
| Claude Haiku 4.5 | $0.40 / $2.00 | $0.104 | $0.136 |
| Gemini 3.8 Flash | $0.525 / $2.625 | $0.137 | $0.179 |
Three readings. First, the right-hand column is the shape a Junie profile produces once its helper role is counted, so under these assumptions that helper traffic adds $0.160 per session on Claude Sonnet 5 — setting fasterModel.id to Claude Haiku 4.5 instead brings that line to $0.032. Claude Code is not a zero on this line either — it has its own background traffic, which Anthropic's cost page puts at "typically under $0.04 per session" — but behind a bearer-token gateway that traffic rides your main model rather than a model you did not pick. Second, the Gemini 3.8 Flash row is reachable from Junie CLI through the OpenAICompletion profile but not from Claude Code in a supported way, which is the endpoint boundary showing up as money. Third, on Kunavo's catalog Claude Opus 5 lists at $2.00 / $10.00 against Anthropic's $5.00 / $25.00, while Claude Sonnet 5 sits at Anthropic's list price rather than under it — so "cheapest listed rate" and "lowest cost to finish the task" are still separate questions, and only your own repository answers the second.
Kunavo's catalog amount is a billing floor rather than a cap: when the upstream reports its charge, the bill is the greater of catalog cost and upstream cost times the applicable markup. Cache behaviour is excluded from this example deliberately — nothing in Junie's documentation describes cache breakpoints or cache accounting for custom endpoints, so no cache saving is claimed here. The minimum top-up is $10 in prepaid credit, a funding minimum rather than a task fee or a subscription; see billing details. Related reading: Claude Code pricing, running Claude Code without a subscription, and the agent API directory for how other clients handle custom endpoints.
Create a Kunavo account if you want one prepaid balance behind whichever of the two you land on.
FAQ
Is Junie CLI better than Claude Code?
No published benchmark compares them, so anyone answering that with a score is inventing one. JetBrains' Junie landing page calls it the most cost-efficient coding agent and a top performer on SWE-Rebench, but publishes no run, date, harness or methodology beside those words, and neither claim is a Junie-versus-Claude-Code result. The difference that is checkable is the endpoint boundary: Junie CLI's custom-model profiles accept four API formats — OpenAI Chat Completions, OpenAI Responses, Google and Anthropic — while Claude Code accepts the Anthropic Messages format plus Amazon Bedrock and Google Cloud variants, and Anthropic states it does not support routing Claude Code to non-Claude models through any gateway. Pick on that boundary, not on a score.
Can Junie CLI use a custom API endpoint or a self-hosted model?
Yes, through a JSON profile. Junie CLI reads model profiles from $JUNIE_HOME/models/*.json for your user account and .junie/models/*.json inside a project, and the filename minus the .json extension becomes the profile id you select with junie --model custom:<id>. Required keys are id, baseUrl and apiType; apiKey is optional and supports ${VAR_NAME} interpolation, where a missing variable makes the profile fail to load with an error message. The critical detail is that baseUrl is the complete endpoint URL — JetBrains' documentation states Junie appends no path to it — so an OpenAI-format profile ends in /v1/chat/completions, not at the origin. This capability belongs to the CLI only; JetBrains' own plugin documentation states that using your own API key is not supported via the Junie plugin.
Does Junie CLI bill a second model I did not choose?
Yes. JetBrains' model-selection documentation states that Junie uses a separate model for internal tasks — summarizing context, classifying and routing tasks, extracting information for memory and other helper work — and that this applies even when using BYOK, so you may see API calls to a model you did not explicitly select. In a custom profile that role is fasterModel, and the documentation states that primaryModel and fasterModel inherit the top-level properties when not explicitly defined. So a single-model profile sends both your primary traffic and your helper traffic to the same endpoint at the same rate; setting fasterModel.id to a cheaper model is the lever. Claude Code's equivalent is documented the other way round: Anthropic's gateway compatibility guide states that behind an ANTHROPIC_BASE_URL gateway, the model for background tasks is "The main model, or the default Haiku model when ANTHROPIC_API_KEY or apiKeyHelper supplies an Anthropic Console key and ANTHROPIC_AUTH_TOKEN is unset", unless ANTHROPIC_DEFAULT_HAIKU_MODEL pins one. So Claude Code does send background traffic through your endpoint — Anthropic's cost page puts it at "typically under $0.04 per session" — but with a bearer token it bills at your primary model's rate rather than at a second model you did not pick.
Is Junie CLI free, and what does Claude Code cost?
Junie CLI's own landing page says it is free to start with no card or subscription required, and its BYOK documentation states that all usage is billed by the provider with no JetBrains AI subscription required. What a JetBrains subscription buys is AI Credits: the JetBrains help documentation prices AI Pro at $10 per month personal or $20 per month for organizations, and AI Ultimate at $30 personal or $60 for organizations, with one AI Credit equal to $1 USD. Claude Code is included in every paid Claude plan — Pro at $17 per month billed annually or $20 monthly, Max from $100 per month, Team standard seats at $20 per seat billed annually. Both tools cost nothing to install; the bill is the model traffic behind them.
Do I need Junie because I use IntelliJ or PyCharm?
No. Anthropic ships an official Claude Code plugin for JetBrains IDEs — IntelliJ IDEA, PyCharm, Android Studio, WebStorm, PhpStorm and GoLand — and its documentation states the plugin runs the claude command in the IDE's integrated terminal and does not bundle its own copy of the CLI. So using a JetBrains IDE is not on its own an argument for Junie. The argument for Junie is the endpoint boundary and the terminal-native JetBrains workflow; the argument against it, for someone who wants their own key inside Junie's IDE plugin, is that the plugin does not take one — the same page points those users at AI Assistant's AI chat instead.
What does Claude Code give up when I point it at a third-party endpoint?
Four things, per Anthropic's own gateway documentation. Remote Control and voice dictation both rely on a claude.ai identity and are unavailable while ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN or an apiKeyHelper is active; Remote Control is additionally disabled while ANTHROPIC_BASE_URL points at a non-Anthropic host, a behavior introduced in v2.1.196. Claude Code in Slack and cloud sessions always use Anthropic's API and are not part of a gateway deployment. Billing also changes: a gateway credential replaces the claude.ai subscription login for that session, the subscription's usage limits stop applying, and the traffic bills per token to whoever owns the credential. Setting only the base URL, with no credential, does not replace the subscription.
Every source this guide relies on is linked above and was fetched on September 19, 2026, apart from the npm registry entry for the Claude Code package, re-read on September 21, 2026. They are junie.jetbrains.com's CLI, BYOK, custom-LLM, ACP, plugin-models, model-selection and Junie Local pages, its What's New page, its out-of-beta and Junie Local posts, its landing page and its LICENSE.md; jetbrains.com's AI licensing and subscriptions page; code.claude.com's overview, gateway overview, gateway-connect, gateway-protocol, sandboxing, JetBrains-plugin and cost pages plus its documentation index; and claude.com/pricing. Kunavo rates are read from the live catalog at build time. Neither agent was installed and no request was sent through either one to Kunavo, so the configurations here are derived from published schemas rather than tested; no performance comparison is made, because no published head-to-head benchmark of these two tools exists.