Junie for PhpStorm: Native AI Agent Built for PHP Developers
JetBrains' native AI agent for PhpStorm uses code navigation, inspections, and project structure to autonomously execute multistep PHP tasks. Here's what it means for Laravel developers.
TL;DR
- Junie is JetBrains' native AI coding agent for PhpStorm, not a plugin hack
- Uses PhpStorm's core features (code navigation, inspections, Search Everywhere) to execute multistep tasks autonomously
- Handles complex workflows: CRUD generation, database seeding, test writing, and execution without manual intervention
- PHP developers get transparent execution, terminal access, and granular control over what commands run automatically
The Big Picture
PhpStorm just became an agentic IDE. Junie isn't another chatbot bolted onto your editor. It's a native AI agent that uses PhpStorm's internals — source code navigation, project structure analysis, code inspections — to plan and execute complex tasks autonomously.
The difference matters. Most coding agents are plugins that treat your IDE like a black box, making educated guesses about your codebase. Junie has direct access to PhpStorm's understanding of your PHP project. It knows your class hierarchies, your Laravel routes, your database schema. When it plans a multistep task, it's working with the same semantic understanding PhpStorm uses for refactoring and code completion.
For PHP developers, this means you can hand off entire features — not just code snippets. CRUD interfaces with Tailwind forms. Database seeders that actually run. Tests that execute and report results. All while you watch the agent work through PhpStorm's familiar interface.
The real shift here is moving from "AI that suggests code" to "AI that ships features." Junie doesn't just generate a controller. It creates the controller, writes the routes, builds the views, seeds test data, writes tests, and runs them. Then it shows you exactly what it did, file by file, with full rollback capability.
How It Works
Junie installs as a PhpStorm plugin. Click the Junie icon in the right sidebar, and you get a chat interface with two modes: agentic code mode (default) and Ask mode for questions without code changes.
The workflow is transparent. Give Junie a prompt, and it creates a plan. Then it executes that plan step by step, showing you which files it's searching, opening, or editing. When it hits a terminal command, it stops for confirmation unless you've allowlisted that command type.
Here's where the PhpStorm integration shines. Junie uses Search Everywhere to locate files. It reads code inspections to understand quality issues. It navigates your project structure the same way you do manually. When it generates code, it's informed by PhpStorm's understanding of your Laravel project structure, your namespaces, your dependencies.
The terminal integration is particularly clever. Junie has its own terminal window where you can see command output in real time. You can even interact with the terminal while Junie is running commands. When it's done, you get a diff viewer for every changed file. Accept all changes, roll back individual files, or reject everything.
Guidelines make Junie smarter. Create a .junie/guidelines.md file in your project root and specify your tech stack, naming conventions, coding standards. Junie reads this before planning tasks. The Laravel community is already sharing framework-specific guidelines. David Carr published a Laravel guidelines repo that you can drop into any project.
The allowlist system gives you granular control. By default, Junie asks permission for every terminal command. But you can allowlist patterns using regex. Want to auto-approve all php artisan commands? Add the pattern to Settings → Tools → Junie → Action Allowlist. Or enable Brave Mode and let Junie run everything without confirmation.
The .aiignore file works like .gitignore but for Junie. Restrict access to vendor directories, config files, or anything else you don't want the agent touching.
Under the hood, Junie is making LLM calls, but it's optimizing token usage by leveraging PhpStorm's semantic understanding. Instead of sending your entire codebase as context, it sends targeted information based on what PhpStorm already knows about your project structure. This keeps costs down and responses fast.
What This Changes For Developers
The practical impact is biggest on repetitive, multistep work. Scaffolding a new feature used to mean: generate migration, create model, write controller, build views, add routes, seed test data, write tests. That's 30 minutes of context switching even when you know exactly what you're building.
Junie collapses that into a single prompt. The example from JetBrains: "Implement CRUD actions to manage books via web forms, create and run a seeder to add 10 books, write tests, and execute them. Use Tailwind CSS form components." Junie delivers all of it, including running the seeder and executing the tests.
Legacy codebases are where this gets interesting. PHP developers are using Junie to analyze large repos, understand commit history to track down bugs, and upgrade projects to newer framework versions. One developer used it to detect N+1 query issues and fix them automatically.
The transparency changes how you supervise AI work. You're not just reviewing generated code. You're watching Junie navigate your project, seeing which files it opens, which inspections it reads, which commands it runs. When something goes wrong, you know exactly where in the process it happened.
The Ask mode is useful for onboarding or exploring unfamiliar codebases. Chat with Junie about your project without changing anything. It has full context on your Laravel app's structure, dependencies, and conventions.
Early adopters in the PHP community are pushing Junie into creative territory. Proof-of-concept implementations. Exploring alternative architectures. Challenging the agent with complex refactoring tasks. The spec-driven development approach works particularly well here — write detailed specs in your guidelines file, and Junie implements them consistently.
Try It Yourself
Install Junie from the PhpStorm plugin marketplace. Open a Laravel project (or start a fresh one). Click the Junie icon in the right sidebar.
Start with a contained task to see how it works:
Create a Book model with title, author, and published_year fields. Generate a migration, run it, and create a factory with realistic test data.Watch Junie plan the task, create the files, and execute the migration. Open the diff viewer to see exactly what changed.
Next, try a more complex workflow:
Add API endpoints for the Book model with JSON responses. Include validation, error handling, and API resource transformers. Write feature tests for all endpoints and run them.This is where the multistep execution shines. Junie will create controllers, routes, resources, validation rules, tests, and execute the test suite.
For production use, create .junie/guidelines.md in your project root:
# Project Guidelines
## Tech Stack
- Laravel 11
- PHP 8.3
- Tailwind CSS 3.x
- Pest for testing
## Conventions
- Use single-action controllers for complex operations
- API responses must use Laravel API Resources
- All database queries must use eager loading to prevent N+1
- Follow PSR-12 coding standards
## Testing
- Write Pest tests for all new features
- Use database transactions for test isolation
- Aim for 80%+ code coverage on business logicNow Junie will follow these rules automatically without you specifying them in every prompt.
The Bottom Line
Use Junie if you're building Laravel apps in PhpStorm and you're tired of scaffolding boilerplate. The native integration means it understands your project structure better than plugin-based agents. The transparency and rollback capability make it safer than tools that just dump code into your editor.
Skip it if you're not in the JetBrains ecosystem or you're working on projects where AI-generated code creates more review overhead than it saves. Junie is optimized for PhpStorm's semantic understanding of PHP and Laravel. If you're using VS Code or working in a different language, you won't get the same benefits.
The real opportunity is for teams maintaining large PHP codebases. Legacy modernization, framework upgrades, and systematic refactoring are where Junie's multistep execution and PhpStorm integration create the most leverage. The risk is over-relying on the agent for complex business logic without adequate review. Junie's recent merge into JetBrains AI Chat suggests the company is doubling down on this approach. If you're already paying for JetBrains AI, Junie is worth the 30 minutes to evaluate on a real project.
Source: Junie