Have you ever imagined having an AI agent that understands your entire project, runs tests, handles refactoring, and works straight from the terminal — without opening a heavy IDE? That’s exactly what JetBrains’ Junie CLI promises. And from what we’ve seen in the Beta version launched in March 2026, the promise is real.
If you’re a developer keeping up with the AI coding agent wars — Claude Code, Codex, Gemini CLI, Cursor — you need to know about Junie CLI. It arrived with a different approach: being LLM-agnostic, running in any environment, and deeply integrating with JetBrains IDEs.
In this complete guide, I’ll show you everything: installation, setup, hands-on examples, and a head-to-head comparison with Claude Code. Let’s go.
What Is Junie CLI?
Junie CLI is the evolution of Junie — JetBrains’ AI agent that previously existed only as an IDE plugin — into a standalone command-line agent. This means you can now use it:
- Directly in your terminal (macOS, Linux, and Windows)
- Inside any IDE (not just JetBrains)
- In CI/CD pipelines (GitHub Actions, GitLab CI)
- In headless mode for automation
The big differentiator? It doesn’t lock you into a single language model. You can choose from models by Anthropic, OpenAI, Google, Grok, and others — or use your own API key with BYOK.
Why Is Junie CLI Different from Other Agents?
There are dozens of AI coding agents on the market. So why should you pay attention to Junie CLI? Here are the points that truly set it apart:
1. Truly LLM-Agnostic
While Claude Code only works with Anthropic models, Junie CLI lets you choose. Want to use Gemini 3 Flash because it’s cheaper? Go ahead. Prefer Claude Sonnet for quality? That works too. This kind of flexibility is rare.
2. Deep Integration with JetBrains IDEs
Since April 2026, Junie CLI can connect to your running JetBrains IDE and leverage all available code intelligence: indexing, semantic analysis, build and test configurations. It literally “sees” what you see in the IDE.
In practice, this means that when Junie renames a symbol, it uses the IDE’s semantic index to find every occurrence — something a simple text search would easily miss.
3. One-Click Migration
Already using Claude Code or Codex? Junie CLI offers streamlined migration. This lowers the barrier to entry for anyone who wants to try it without losing their setup.
4. BYOK — Bring Your Own Key
The BYOK pricing model lets you use your existing API keys from Anthropic, OpenAI, Google, xAI, or OpenRouter. No extra platform charges for using the agent.
How to Install Junie CLI
Installation is quick and straightforward. Pick the method for your system:
macOS / Linux (curl)
curl -fsSL https://junie.jetbrains.com/install.sh | bash
macOS (Homebrew)
brew tap jetbrains/junie
brew update
brew install junie
Windows (PowerShell)
powershell -NoProfile -ExecutionPolicy Bypass -Command "iex (irm 'https://junie.jetbrains.com/install.ps1')"
Via npm (for CI/CD)
npm install -g @jetbrains/junie-cli
After installation, run junie in your terminal. On first launch, it will ask you to choose your authentication method:
- JetBrains Account — uses your JetBrains AI subscription
- Junie API Key — usage-based billing (generate at
junie.jetbrains.com/cli) - BYOK — your own API keys from providers like Anthropic or OpenAI
Hands-On Examples with Junie CLI
Let’s move past theory and get our hands on the terminal. Here are real-world examples of how to use Junie CLI day to day.
Example 1: Hello World — Your First Prompt
Open the terminal at your project root and run:
junie
This opens interactive mode. Type your prompt:
> Create a GET /hello endpoint in ASP.NET Core that returns "Hello from Junie!"
Junie will analyze the project, create the necessary file, and scaffold the endpoint. Simple as that.
Example 2: To-Do List — Building a Complete Feature
> Implement a full CRUD for tasks (to-do list) using the project's existing stack. Include model, controller, service, and unit tests.
Junie will:
- Analyze the project structure
- Identify the stack (e.g., .NET 10 + EF Core)
- Create the files: Model, Controller, Service, Repository
- Generate unit tests
- Run the tests to validate
Example 3: Automated Code Review in CI/CD
This is one of the most powerful features. Add the following to your GitHub Actions:
name: Junie Code Review
on:
pull_request:
types: [opened, synchronize]
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- name: Install Junie
run: npm install -g @jetbrains/junie-cli
- name: Review PR
env:
JUNIE_AUTH_TOKEN: ${{ secrets.JUNIE_API_KEY }}
run: junie "Review and fix any code quality issues in the latest commit" --auth="$JUNIE_AUTH_TOKEN"
Now every PR opened in your repository goes through an automated AI review. This is gold for teams that want to maintain code quality without overloading human reviewers.
Example 4: Using IDE Context
If you have IntelliJ or Rider open, just run Junie CLI in the same project directory. It auto-detects the IDE and uses all available indexing:
cd /my-dotnet-project
junie
> Rename the CustomerService class to ClientService across the entire project, respecting all references
Junie will use the IDE’s semantic index — no broken find-and-replace.
Junie CLI vs Claude Code: Which One Should You Pick?
This is the million-dollar question. Both are powerful AI coding agents, but with different philosophies. Here’s the comparison:
| Feature | Junie CLI | Claude Code |
|---|---|---|
| Developer | JetBrains | Anthropic |
| Supported models | Multiple (Anthropic, OpenAI, Google, Grok) | Claude models only |
| Context Window | ~200k tokens | ~400k tokens |
| IDE Integration | Deep (JetBrains IDEs) | Terminal-first |
| Native CI/CD | Yes (GitHub Actions, GitLab CI) | Yes |
| BYOK | Yes | No |
| Migration from other agents | One click | Manual |
| IDE Semantic Analysis | Yes (via plugin) | No |
| Pricing | JetBrains AI subscription or BYOK | Anthropic Pro/Max plans |
| Benchmarks (accuracy) | ~63.5% (ranked second) | ~55.5% (ranked third) |
| Best at | Pair programming, semantic refactoring | Deep context, restructuring |
When to use Junie CLI?
- You already use JetBrains IDEs (IntelliJ, Rider, PyCharm)
- You want the flexibility to switch LLM models
- You need native CI/CD integration
- You want to use your own API keys
When to use Claude Code?
- You need a massive context window (400k+ tokens)
- You work on large-scale code restructuring
- You prefer an agent that “thinks more” before acting
- You’re already in the Anthropic ecosystem
Practical Tips to Get the Most Out of Junie CLI
After researching and testing, here are tips that will save you time:
Create a .junie/guidelines.md file at the project root. Junie reads this file to understand style rules, code standards, and team conventions — similar to Claude Code’s CLAUDE.md.
Use headless mode in CI/CD with the --auth flag for non-interactive automation. Great for reviews, README updates, and automatic linting.
Mix and match models using BYOK: use Gemini Flash for quick, cheap tasks and Claude Sonnet for complex tasks that require deeper reasoning.
Use @ for context: in interactive mode, use @file.cs or @folder/ to attach specific files to the prompt context. This greatly improves response accuracy.
Try the slash commands: type / in interactive mode to see available commands. There are shortcuts for context reset, model switching, and more.
What to Expect from the Future of Junie CLI
Junie CLI is still in Beta, but JetBrains is investing heavily. A few things on the radar:
- Android Studio support is confirmed as “coming soon”
- JetBrains Air — the new ADE (Agentic Development Environment) — works alongside Junie CLI for multi-agent workflows
- Expanded support for local models (Ollama, Qwen) is a strong community demand
- Improvements in token efficiency — Junie currently consumes more tokens than competitors like Codex
Conclusion: Is Junie CLI Worth It?
If you’re a developer looking for an AI coding agent that’s flexible, integrable, and doesn’t lock you into a single ecosystem, Junie CLI deserves your attention.
Key takeaways from this post:
- Junie CLI is JetBrains’ AI agent that works in the terminal, IDE, and CI/CD
- It’s LLM-agnostic — you choose whichever model you want
- JetBrains IDE integration gives it semantic refactoring power that other agents don’t have
- The BYOK model eliminates extra platform costs
- In benchmarks, it has been outperforming Claude Code in overall accuracy
- It’s still in Beta, but it’s evolving fast
If you already use JetBrains, installing Junie CLI is practically a must. If you don’t, it’s still worth it for the model flexibility and CI/CD integration. The future of development is agnostic — and Junie CLI figured that out before most.


