Vibe Coding with Junie - JetBrains AI Coding Agent
I created a Python project recently to test out Junie - the new AI coding agent from JetBrains. This led to the creation of Pyzlides, a Python library that lets us build presentation slides entirely as code. Interestingly, there are zero lines of code written by me; the entire codebase was generated by Junie.
I started using PyCharm IDE back in 2019 for my work, and I’ve been hooked on it ever since. Since then, I’ve explored other AI-powered IDEs like Cursor and Windsurf, actively experimenting with each new release to see what they offer.
At PyCon US this year, I got to meet the JetBrains PyCharm team in person. They gave me a quick demo of Junie, and I knew immediately I wanted to give it a shot.
Below, I’ll share the detailed steps I took while developing Pyzlides, along with a few tips on making the most of AI-assisted coding.
Initial Setup
For AI coding tools, context is the most important. I always spend lot of time to create the initial prompt which will be given to the agent. I try to make it as detailed as possible with examples and intended usage. Initially, I bootstrapped the environment using uv
and installed the dependencies in the environment. After a bit of brainstorming and help from ChatGPT to decide the project dependencies, I decided to use the below dependencies:
- ReportLab: For generating the PDF slides.
- Pillow: For handling images in slides.
- PyYAML: For parsing the configuration file.
I installed these libraries in the environment and this was my major point of contribution. After this point, the entire building was done by Junie and I was only involved with writing prompts.
Getting started with Junie
I used the Junie premium subscription for this project. Below is a screenshot of Junie’s chat interface:
Junie provides a simple, familiar chat interface to interact with. From the interface, we have two conversation modes:
Code mode: Junie directly generates or edits code.
Ask mode: Useful for discussing the codebase, understanding unfamiliar code structure, or clarifying doubts without making direct code changes.
Additionally, using the +
button, we can attach relevant files to give Junie more context about the project.
Junie includes a Brave Mode toggle. When enabled, Junie executes terminal commands (such as creating directories, running the project, etc.) without asking for user confirmation. I recommend using Brave Mode only with simpler projects where you fully understand and trust the codebase. Otherwise, it poses a risk of unintended actions or prompt injection.
Recent Junie versions introduced another toggle: Think More, prompting the AI model to reflect more carefully during code generation, improving the overall quality of its responses.
Setting context
As we’ve previously discussed, AI coding assistants perform best when given ample context. Junie provides helpful ways to ensure it understands our project’s codebase clearly:
.aiignore
: From the+
menu, we can generate an AI-ignore file, similar to.gitignore
. Files added here won’t be modified by Junie.Guidelines: Also available through the
+
button and example prompts are project-specific instructions. Junie uses these as guidelines to stay aligned with project conventions. I will share the guidelines I created later in this post.
Junie Settings
Before we dive deeper into Pyzlides, let’s quickly look at Junie’s settings:
Models:
I chose Claude Sonnet 4 as my model, as it’s currently one of the best for coding tasks.Connect MCP Servers:
MCP servers allow Junie to interact with external resources. They can be configured globally in settings or specifically for a project by adding them to the/.junie/mcp
directory in the project’s root folder.
For instance, if we integrate Stripe, connecting the Stripe MCP server ensures Junie understands and accurately utilizes Stripe’s latest API operations, significantly improving the quality of generated code.Action Allowlist:
Here, we can specify terminal commands Junie may run directly without asking for our confirmation.
Init Pyzlides
To help Junie understand the project clearly, I prepared an initial prompt using ChatGPT. The complete prompt is available in the Pyzlides repo here.
Here’s a brief version of the initial prompt:
Pyzlides: Python Presentation Creator
Overview
Pyzlides is a Python library that lets us create PDF presentation slides directly from Python code. Slides are generated in standard presentation resolution, and elements like headers, body text, images, and layouts can be defined using simple Python classes. Pyzlides supports custom themes, layouts, and ordering slides through a configuration file.
Features
- Declarative Slide Creation: Define slides using Python classes like
Head1
,BodyText
,Img
, etc.- Custom Layouts: Use custom layouts like
Center
orBottom
for positioning elements.- Configurable Themes: Define themes such as colors, fonts, and backgrounds via a config file.
- Slide Ordering: Specify slide sequence in the configuration file.
- PDF Output: Generate presentations as PDF files.
- Extendable: Easily extend slide functionality by creating new element types or layouts.
Dependencies
- ReportLab: PDF slide generation.
- Pillow: Image handling.
- PyYAML: Config file parsing.
Core Classes
Base Slide Element Classes
Head1(text: str)
: Large header text.
BodyText(text: str)
: Paragraph-style text.
Img(path: str, caption: str)
: Image with optional caption.Bold(text: str)
: Bold formatting.Center(element)
: Center-align element.Bottom(element)
: Bottom-align element.
To begin, I clicked on the example prompt button in Junie to generate project instructions. Junie created detailed guidelines automatically and stored them in the .junie
directory. This file includes key features, project structure, and expectations. You can view it here.
Start Coding
One aspect I liked about Junie was its ability to first generate a clear implementation plan before writing any code. This made complex tasks manageable and easy to review.
Once Junie starts, it updates progress as each step completes. Below you can see Junie’s initial implementation plan for Pyzlides.
Below is the expanded interface when the task was completed by Junie. The pane on the right shows the steps taken for the implementation.
After finishing a task, Junie suggests helpful follow-up actions like adding files to Git or reverting unwanted changes.
The initial implementation by Junie was already impressive. There were minor alignment issues, so I asked Junie to fix these in the next prompt:
the pages are made in portrait mode - change it to landscape mode.
also, bolding does not seem to work.
increase the text size - it is a presentation, not just a simple pdf file.
also make necessary changes so that this can be published as a library. people can install this library and then add config and slide files and use the lib to generate pdf. sample slide files and config can be moved to examples folder if needed. keep the library source directory clean
Once fixed, I asked Junie to add more advanced features and create example slides to showcase Pyzlides capabilities clearly:
create multiple elements to support:
title slide - just a title in the centre - horizontally and vertically
image backgrounds - support images as slide backgrounds.
fix text getting cut out to the next sections.
add H1 to h3 tags - different type of sections.
in the example presentation, add slides to illustrate various types - title only, title with text, title with image, title with image and text, dark mode presentation, white mode presentation, custom background image presentation.
make folders inside example folder for each example. add more elements to the definition as needed - to support a fully featured slides functionality.
also, inline text colours can be specified to text elements.
After this, I asked Junie to add features like code snippets and grid layouts. After these enhancements, the library was nearly complete.
Finishing Up
There were a few remaining issues, primarily with text overflowing slides. I prompted Junie to handle these scenarios clearly:
detect when texts flow out of the view - and then fix it to go to next line. regenerate all examples after this change. also test this with long headings, text, etc. there should be a bit of default margins on top botoom left and right.
also, add a code component - that accept a code in markdown block and provide syntax highlighted output in text. you can use the already installed pygments library for the same.
Next, I asked Junie to address a few bugs from previous implementations:
- syntax highlight is not working.
- when there is too much text, split it into multiple slides automatically. currently the contents are being cut out - for example in the text and code example.
- also the newline feature is not working as expected. since title texts are starting from centre of the page, some text is still getting cut out horizontally - relook the calculation part
Throughout this project, I enabled Brave Mode. This allowed Junie to automatically run example code, generate PDFs, and proactively identify and fix issues.
To make Pyzlides easy for new users, I also had Junie add a README to guide them through using the library. At this stage, I noticed an unused layout
section in the config files. I asked Junie to remove this:
i can see that the layouts section in config is unused. remove this from example config files and Config class defined in core
Junie’s response was prompt and accurate:
The
layouts
section was removed from the Config class in core.py and from all example config files, confirming it was unused. Functionality was verified by successfully generating presentations from both the basic-presentation and grid-layout examples without any errors.
Summary
The entire Pyzlides project—including fixes and improvements—was completed with fewer than 10 prompts. Below is the final file structure:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
project_root/
├── .gitignore
├── pyproject.toml
├── pyzlides.py
├── readme.md
├── uv.lock
│
├── .junie/
│ └── guidelines.md
│
├── pyzlides/
│ ├── __init__.py
│ ├── __main__.py
│ ├── cli.py
│ └── core.py # Core library functionality (1010 lines)
│
└── examples/
├── README.md
│
├── images/
│ ├── bg_black1.jpg
│ ...
│
├── basic-presentation/
│ ...
These are the core files of the library:
pyzlides.py
: Main command-line entry point for generating presentations.pyzlides/
cli.py
: Handles command-line interface functionality.core.py
: Contains the core implementation and logic of Pyzlides. Includes the component definitions, parsing logic and pdf generation code.
My conclusion: I’m impressed with Junie - especially loved the planning mode. Few would guess an AI coding agent could accomplish such a detailed task within minutes.
I haven’t fully refined or battle-tested Pyzlides yet, but it’s already an excellent starting point. You can review the generated PDFs in the
examples
folder, and see for yourself :)
Notes for AI-Assisted Coding
- Use Brave Mode cautiously, especially in complex or sensitive projects.
- Provide clear, detailed context for the best results.
- Always verify the plan generated by the agent and course correct whenever needed.
- Consider tools like GitIngest to enhance context. Also, connect MCP servers when available for deeper integrations.
Links
Pyzlides GitHub project: GitHub - adarshdigievo/pyzlides
Junie Docs: Junie, the AI coding agent by JetBrains
Junie Playbook: PyCharm Junie Playbook - JetBrains Guide
Download Pycharm : PyCharm: The only Python IDE you need
I’d like to thank the JetBrains team for collaborating on this project. I look forward to using Junie in future experiments.