{"id":577044,"date":"2025-06-23T10:20:03","date_gmt":"2025-06-23T09:20:03","guid":{"rendered":"https:\/\/blog.jetbrains.com\/?post_type=phpstorm&#038;p=577044"},"modified":"2025-06-26T17:39:23","modified_gmt":"2025-06-26T16:39:23","slug":"discover-junie-for-phpstorm","status":"publish","type":"phpstorm","link":"https:\/\/blog.jetbrains.com\/fr\/phpstorm\/2025\/06\/discover-junie-for-phpstorm","title":{"rendered":"Discover Junie for PhpStorm: A Game-Changing AI Coding Agent for PHP Development"},"content":{"rendered":"\n<p>With the release of <a href=\"https:\/\/www.jetbrains.com\/junie\/\" target=\"_blank\" rel=\"noopener\">Junie<\/a>, the AI coding agent by JetBrains, <a href=\"https:\/\/www.jetbrains.com\/phpstorm\/\" target=\"_blank\" rel=\"noopener\">PhpStorm<\/a> has entered the realm of agentic IDEs. Now, the PhpStorm IDE doesn\u2019t just provide classical developer productivity tools and AI assistance features, but can also do massive amounts of work for PHP developers autonomously.<\/p>\n\n\n\n<p>Unlike other coding agent plugins, Junie is native to PhpStorm, which means it uses PhpStorm\u2019s core features, such as source code navigation, project structure navigation, <em>Search Everywhere<\/em>, and code inspections to plan and execute multistep tasks and supervise the outcome.&nbsp;<\/p>\n\n\n\n<p>You can <a href=\"https:\/\/www.jetbrains.com\/help\/junie\/install-junie.html\" target=\"_blank\" rel=\"noopener\">install<\/a> Junie like any other PhpStorm plugin and open it in the IDE by clicking the <strong><em> <\/em><\/strong><em>Junie<\/em> icon on the right-hand sidebar.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"2400\" height=\"1236\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2025\/06\/junie-laravel-demo.png\" alt=\"\" class=\"wp-image-577047\"\/><\/figure>\n\n\n\n<p>In this blog post, we\u2019ll follow Junie doing its work and see how it fits into your familiar PhpStorm workflow, while kicking off a whole new way of writing code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Starting with a clean Laravel project&nbsp;<\/h2>\n\n\n\n<p>Let\u2019s start with a clean Laravel project. There\u2019s nothing here but the defaults, and what I want to do is add some functionality to it. So my prompt is:<\/p>\n\n\n\n<p><code>Implement CRUD actions to manage books via web forms, also create and run a seeder to add 10 books into the database, write tests, and execute them. Use the Tailwind CSS form component library.<\/code><\/p>\n\n\n\n<p><strong>?Tip: <\/strong>To avoid follow-up clarifications where possible, provide Junie with detailed guidelines and instructions in the initial prompt. This helps minimize the number of requests sent to LLMs and optimize the token usage, which means you\u2019re left with a higher <a href=\"https:\/\/youtrack.jetbrains.com\/articles\/SUPPORT-A-1860\/What-is-the-quota-limit-for-different-JetBrains-AI-plans-AI-Free-AI-Trial-AI-Pro-AI-Ultimate\" target=\"_blank\" rel=\"noopener\">JetBrains AI quota<\/a>!<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"2412\" height=\"1474\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2025\/06\/junie-prompt-updated.png\" alt=\"\" class=\"wp-image-577806\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Watching Junie work<\/h2>\n\n\n\n<p>When I run the prompt, Junie starts by creating a plan and then follows the proposed plan step by step, stopping at terminal commands for user confirmation.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" loading=\"lazy\" width=\"1600\" height=\"978\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2025\/06\/image-32.png\" alt=\"\" class=\"wp-image-577199\"\/><\/figure>\n\n\n\n<p>As you can see, Junie is pretty transparent with what it does and which files it searches for, opens, or edits, reporting on what exactly is being performed at each step along the way.&nbsp;<\/p>\n\n\n\n<p>While Junie is running, you can <strong>open Junie\u2019s terminal<\/strong> to see the CLI command currently executed by the agent and the complete output history. You can even interact with the terminal while Junie is running some of the commands.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"2412\" height=\"1474\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2025\/06\/junie-open-database.png\" alt=\"\" class=\"wp-image-577246\"\/><\/figure>\n\n\n\n<p>When Junie is done, you can double-click the changed or added file to open it in PhpStorm\u2019s diff viewer, locate and open the file itself in the editor, or roll back changes for the edited files.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"2400\" height=\"1392\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2025\/06\/junie-open-added-file.png\" alt=\"\" class=\"wp-image-577257\"\/><\/figure>\n\n\n\n<p>From here, you can accept all changes, give Junie a follow-up task, or roll everything back if needed.<\/p>\n\n\n\n<p>In our case, Junie created CRUD screens for managing books. It also wrote tests and executed them without any manual interference. There\u2019s a new database seeder, and it was actually run, with 10 test books added to the database.&nbsp;<\/p>\n\n\n\n<p>Exactly as instructed!&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2025\/06\/image-30.png\" alt=\"\" class=\"wp-image-577165\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"2412\" height=\"982\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2025\/06\/rows-added-to-database.png\" alt=\"\" class=\"wp-image-577268\"\/><\/figure>\n\n\n    <div class=\"buttons\">\n        <div class=\"buttons__row\">\n                                                <a href=\"https:\/\/plugins.jetbrains.com\/plugin\/26104-jetbrains-junie\" class=\"btn\" target=\"\" rel=\"noopener\">Try Junie<\/a>\n                                                    <\/div>\n    <\/div>\n\n\n\n\n\n\n\n<h2 class=\"wp-block-heading\">The power of Junie guidelines<\/h2>\n\n\n\n<p>In the initial prompt, I instructed Junie on which technologies to use. However, for more consistent outcomes, it\u2019d be better to create a <code>.junie\/guidelines.md<\/code> file in the project root and list all the preferred technologies, naming conventions, and coding standards there. Guidelines can also spare Junie from making irrelevant assumptions and minimize follow-ups or manual intervention.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"2406\" height=\"1140\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2025\/06\/project-guidelines.png\" alt=\"\" class=\"wp-image-577279\"\/><\/figure>\n\n\n\n<p>You can compose the guidelines file yourself, ask Junie to generate project-specific guidelines on an existing project for you, or reuse the guidelines and rules that are specific to your framework or technology stack shared by other developers, for example, <a href=\"https:\/\/github.com\/dcblogdev\/laravel-junie\/tree\/main\/src\/docs\" target=\"_blank\" rel=\"noopener\">Laravel guidelines by David Carr<\/a>.&nbsp;<\/p>\n\n\n\n<p><strong>?Tip: <\/strong>Use the <code>.aiignore<\/code> file to restrict Junie from accessing specific files and directories. The&nbsp;<code>.aiignore<\/code>&nbsp;file follows the same&nbsp;<a href=\"https:\/\/git-scm.com\/docs\/gitignore\" target=\"_blank\" rel=\"noreferrer noopener\">syntax and pattern format<\/a>&nbsp;as the&nbsp;<code>.gitignore<\/code>&nbsp;file.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Allowed terminal commands<\/h2>\n\n\n\n<p>Additionally, in the example above, I manually confirmed all terminal commands run by Junie. However, I feel confident in allowing Junie to run any <code>php artisan<\/code> command without confirmation. To do so, I\u2019ll add this type of command to the Junie allowlist in the IDE settings via <em>Settings | Tools | Junie | Action Allowlist<\/em> using the RegEx syntax.<\/p>\n\n\n\n<p>Allowing all <code>php artisan<\/code> commands, including with complex arguments and options, would look as follows:<\/p>\n\n\n\n<p><code>^\\Qphp artisan \\E\\S+(?:\\s+(?:[-\\w:=]+|\"[^\"]*\"|'[^']*'))*$<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"2400\" height=\"1420\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2025\/06\/junie_allowlist.png\" alt=\"\" class=\"wp-image-578082\"\/><\/figure>\n\n\n\n<p>To enable Junie to run all terminal commands without user confirmation, select the <em>Brave Mode<\/em> checkbox.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Ask mode<\/h2>\n\n\n\n<p>Junie comes with the agentic code mode selected by default. However, you can also chat with Junie in <em>Ask<\/em> mode, asking questions referencing your project context but without having your code changed.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"2400\" height=\"916\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2025\/06\/junie-ask-mode.png\" alt=\"\" class=\"wp-image-577301\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Using Junie on existing projects<\/h2>\n\n\n\n<p>We started with a clean project and let Junie do its thing. But what about existing projects? Junie is optimized for a profound understanding of the project context and working with large-scale repos and complicated tasks. PHP developers can use Junie to:<\/p>\n\n\n\n<ul>\n<li>Analyze and understand a large legacy codebase and update it to the latest versions of the framework and packages it uses.<\/li>\n\n\n\n<li>Analyze the commit history to figure out issues in PHP or JavaScript code and fix them.<\/li>\n\n\n\n<li>Analyze the codebase to detect weak spots and areas for improvement.<\/li>\n\n\n\n<li>Explore new ways of implementing features or come up with quick proofs of concept.<\/li>\n\n\n\n<li>Challenge Junie with something creative and investigate new ways of collaboration between human and agent!<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p>Junie is extremely powerful in delivering coding results, but ultimately, what it can do depends on the accuracy of the input it gets and the proficiency of the engineer using it. Do you have any impressive &#8220;<strong>Junified<\/strong>&#8221; use cases to share with us? We&#8217;d love to hear about them!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What developers say<\/h2>\n\n\n\n<p>Check out what other PHP developers have used Junie for:<\/p>\n\n\n\n<ul>\n<li><a href=\"https:\/\/youtu.be\/YeR60hXjXaI?feature=shared\" target=\"_blank\" rel=\"noopener\">NEW PhpStorm Junie AI VS Cursor: &#8220;Usable&#8221; Agent from JetBrains?<\/a> by Povilas Korop<\/li>\n\n\n\n<li><a href=\"https:\/\/youtu.be\/tfBS85Ksfag?feature=shared\" target=\"_blank\" rel=\"noopener\">New AI Editor by JetBrains: Junie<\/a> by Nuno Maduro<\/li>\n\n\n\n<li><a href=\"https:\/\/www.linkedin.com\/pulse\/first-impressions-junie-phpstorm-carlos-granados-ptuff\/\" target=\"_blank\" rel=\"noopener\">First impressions of Junie with PhpStorm<\/a> by Carlos Granados<\/li>\n<\/ul>\n\n\n\n<p>Junie is already making quite an impression in the PHP and Laravel communities. Here&#8217;s what early users say:<\/p>\n\n\n\n<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\">Played around with Junie today. Very cool &#8211; and it does a particularly great job of showing you what it&#39;s doing. <a href=\"https:\/\/t.co\/sSARLq0YrA\" target=\"_blank\">https:\/\/t.co\/sSARLq0YrA<\/a> <a href=\"https:\/\/t.co\/huDMG120wA\" target=\"_blank\">pic.twitter.com\/huDMG120wA<\/a><\/p>&mdash; Jeffrey Way (@jeffrey_way) <a href=\"https:\/\/twitter.com\/jeffrey_way\/status\/1921993344164532606?ref_src=twsrc%5Etfw\" target=\"_blank\" rel=\"noopener\">May 12, 2025<\/a><\/blockquote> <script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n\n\n\n<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\">I&#39;m trying out Junie from <a href=\"https:\/\/twitter.com\/jetbrains?ref_src=twsrc%5Etfw\" target=\"_blank\" rel=\"noopener\">@jetbrains<\/a> in <a href=\"https:\/\/twitter.com\/phpstorm?ref_src=twsrc%5Etfw\" target=\"_blank\" rel=\"noopener\">@phpstorm<\/a>. I&#39;m impressed.<br>The thing that stood out so far is that I didn&#39;t have to give it specific references to the files that need to be updated and it found all of them on its own. And at the end it asked to run the build process to\u2026<\/p>&mdash; Mircea Sandu (@mircea_sandu) <a href=\"https:\/\/twitter.com\/mircea_sandu\/status\/1921898378704605495?ref_src=twsrc%5Etfw\" target=\"_blank\" rel=\"noopener\">May 12, 2025<\/a><\/blockquote> <script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n\n\n\n<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\">Gotta correct myself \u2014 Junie isn\u2019t that slow when you consider it\u2019s the best coding assistant I\u2019ve tried so far. The results are insanely good. Amazing work, <a href=\"https:\/\/twitter.com\/jetbrains?ref_src=twsrc%5Etfw\" target=\"_blank\" rel=\"noopener\">@jetbrains<\/a>!<\/p>&mdash; Patrik Gmitter (@PatrikGmitter) <a href=\"https:\/\/twitter.com\/PatrikGmitter\/status\/1926655403405742091?ref_src=twsrc%5Etfw\" target=\"_blank\" rel=\"noopener\">May 25, 2025<\/a><\/blockquote> <script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n\n\n\n<blockquote class=\"twitter-tweet\"><p lang=\"en\" dir=\"ltr\">Finally got round to giving Junie in <a href=\"https:\/\/twitter.com\/phpstorm?ref_src=twsrc%5Etfw\" target=\"_blank\" rel=\"noopener\">@phpstorm<\/a> a go, it was a great help figuring out and then fixing some N+1 issues I was having in my application!<\/p>&mdash; Jon Purvis (@JonPurvis_) <a href=\"https:\/\/twitter.com\/JonPurvis_\/status\/1924128405408117009?ref_src=twsrc%5Etfw\" target=\"_blank\" rel=\"noopener\">May 18, 2025<\/a><\/blockquote> <script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n\n\n    <div class=\"buttons\">\n        <div class=\"buttons__row\">\n                                                <a href=\"https:\/\/plugins.jetbrains.com\/plugin\/26104-jetbrains-junie\" class=\"btn\" target=\"\" rel=\"noopener\">Try Junie<\/a>\n                                                    <\/div>\n    <\/div>\n\n\n\n\n","protected":false},"author":1413,"featured_media":577094,"comment_status":"closed","ping_status":"closed","template":"","categories":[2347],"tags":[8759],"cross-post-tag":[8681],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/phpstorm\/577044"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/phpstorm"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/types\/phpstorm"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/users\/1413"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/comments?post=577044"}],"version-history":[{"count":9,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/phpstorm\/577044\/revisions"}],"predecessor-version":[{"id":578094,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/phpstorm\/577044\/revisions\/578094"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/media\/577094"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/media?parent=577044"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/categories?post=577044"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/tags?post=577044"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/cross-post-tag?post=577044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}