JPIO — Java Project Input/Output
A CLI tool that scaffolds production-ready Spring Boot projects in seconds. Stop writing boilerplate. Start building features.
Table of Contents
- Overview
- Why JPIO?
- Installation
- Quick Start
- Commands
- Project Architecture
- Generated Structure
- Supported Relations
- Roadmap
- Contributing
Overview
JPIO (Java Project Input/Output) is an open-source Python CLI that automates the creation of Spring Boot project scaffolding. You describe your entities and their relationships interactively in the terminal — JPIO generates all the layers: Entity, DTO, Mapper, Repository, Service, ServiceImpl, Controller, and Exceptions.
Built for developers who are tired of copy-pasting the same boilerplate across every new project.
Why JPIO?
Every Spring Boot project starts the same way:
mkdir config controller entity dto mapper repository service exception
Then you write the same JpaRepository interfaces, the same CRUD controllers, the same GlobalExceptionHandler, the same SwaggerConfig... over and over again.
JPIO eliminates that entirely.
| Without JPIO | With JPIO |
|---|---|
| ~30–60 min of boilerplate setup | ~2 minutes |
| Manual folder creation | Auto-generated structure |
| Copy-paste error-prone | Template-driven, consistent |
| Forgotten files | Nothing is missed |
Installation
pip install jpio-cli
Requirements:
- Python 3.9+
- pip
Quick Start
# Go to your Spring Boot project root
cd my-spring-project
# Launch the JPIO wizard
jpio start
# Follow the interactive prompts:
# ? API route prefix : /api/v1
#
# --- Entity 1 ---
# ? Entity name : Product
# ? Fields : name (String), price (Double), stock (Integer)
# ? Has relations? : Yes → ManyToMany → Category
#
# --- Entity 2 ---
# ? Entity name : Category
# ? Fields : name (String)
#
# ? Add another entity? No
#
# ✅ Business layers generated!
Commands
| Command | Description |
|---|---|
jpio start |
Initialize and scaffold business layers for a project |
jpio add |
Add a new entity to an existing JPIO project |
jpio security |
Add a complete Spring Security JWT layer |
jpio scan |
Display the current state of a JPIO project |
jpio test |
Analyze Java code and generate JUnit 5 + Mockito tests |
jpio start
Launches the full interactive wizard. Detects your existing package structure, pom.xml dependencies, and configuration format (properties vs yaml). Generates the complete CRUD structure for your entities.
jpio add
Run inside an existing JPIO project. Prompts for a new entity and appends the generated files without touching existing code. Reads .jpio.json to stay aware of existing entities and relationships.
jpio security
Adds a complete Spring Security + JWT implementation to your project.
- Generates
SecurityConfig,JwtUtil,JwtAuthenticationFilter, andUserDetailsServiceImpl. - Generates authentication endpoints (
/auth/login,/auth/register) and DTOs. - Automatically creates a
Userentity andRoleenum if not already present. - Injects required dependencies into your
pom.xml.
jpio scan
Reads .jpio.json and displays a summary table of the project: entities, fields, and relations.
jpio test
Analyzes your existing Java code (Service, Controller, Repository, Mapper) and generates comprehensive JUnit 5 + Mockito unit tests.
- Smart Analysis: Scans your source code to detect dependencies and injected fields.
- Scenario Generation: Automatically creates happy path and edge case scenarios (e.g.,
findById->shouldReturnObject&shouldThrowNotFoundException). - Mockito Integration: Generates all required
@Mockand@InjectMocksfields. - MockMvc Support: For Controllers, it generates
WebMvcTestwithMockMvccalls and status assertions. - Filtering: Use
--only EntityNameor--type serviceto target specific areas.
Project Architecture
├── jpio/
│ ├── main.py # CLI entry point (Click)
│ ├── bin/
│ │ └── jpio-parser.jar # Java parser utility
│ ├── commands/
│ │ ├── new.py # `jpio start` — full project wizard
│ │ ├── add.py # `jpio add` — add entity
│ │ ├── security.py # `jpio security` — security flow
│ │ ├── scan.py # `jpio scan` — display project state
│ │ └── test.py # `jpio test` — unit test generator
│ ├── core/
│ │ ├── models.py # Dataclasses: Field, Relation, Entity, ProjectConfig
│ │ ├── analyzer.py # Interactive prompts → builds ProjectConfig
│ │ ├── security_analyzer.py # Security wizard
│ │ ├── java_parser.py # JAR parser wrapper
│ │ ├── test_plan_analyzer.py # Test logic brain
│ │ ├── generator.py # Jinja2 rendering engine
│ │ ├── test_generator.py # Test rendering engine
│ │ ├── security_generator.py # Security file generation
│ │ └── writer.py # Java code strings → files on disk
│ ├── utils/
│ │ ├── console.py # Rich: banners, tables, success/error output
│ │ └── file_helper.py # Path manipulation, pom.xml dependency injection
│ └── templates/
│ ├── entity/ # CRUD templates
│ ├── exception/ # Global exception handling templates
│ ├── config/ # Swagger/SpringDoc templates
│ ├── security/ # Spring Security JWT templates
│ ├── tests/ # JUnit 5 templates
│ └── project/ # application.properties/yaml templates
├── tests/
│ ├── test_analyzer.py
│ ├── test_generator.py
│ ├── test_test_generator.py
│ ├── test_security_generator.py
│ └── test_writer.py
├── pyproject.toml
└── README.md
Generated Structure
For a project with package com.pio.ecommerce and two entities Product and Category:
src/main/java/com/pio/ecommerce/
├── config/
│ ├── SecurityConfig.java # (If security added)
│ └── SwaggerConfig.java
├── controller/
│ ├── AuthController.java # (If security added)
│ ├── ProductController.java
│ └── CategoryController.java
├── dto/
│ ├── request/
│ │ ├── LoginRequestDTO.java
│ │ ├── ProductRequestDTO.java
│ │ └── CategoryRequestDTO.java
│ └── response/
│ ├── AuthResponseDTO.java
│ ├── ProductResponseDTO.java
│ └── CategoryResponseDTO.java
├── security/ # JWT Logic (If security added)
│ ├── JwtUtil.java
│ └── JwtAuthenticationFilter.java
├── models/
│ ├── entity/
│ │ ├── User.java # (If security added)
│ │ ├── Product.java
│ │ └── Category.java
│ └── enum/
│ └── Role.java
├── repository/
│ ├── UserRepository.java
│ ├── ProductRepository.java
│ └── CategoryRepository.java
└── service/
├── ProductService.java
└── ProductServiceImpl.java
Supported Relations
| Relation | Description | Example |
|---|---|---|
OneToMany |
One entity has many of another | Order → OrderItem |
ManyToOne |
Many entities belong to one | OrderItem → Order |
ManyToMany |
Both sides have many | Product ↔ Category |
JPIO automatically handles:
- The
@JoinTableannotation forManyToMany - The
mappedByattribute on the inverse side - Pluralization and correct field types (
List<Target>)
Roadmap
- MVP: interactive wizard + full CRUD scaffold generation
- OneToMany / ManyToMany relation support
-
jpio addcommand for existing projects -
jpio scanproject inspector - Enums support & Request/Response DTO separation
- Spring Security scaffolding (v0.5.0)
- Smart Unit Test generation (v0.6.0)
-
jpio add enumcommand for existing projects - IntelliJ IDEA plugin
- VS Code extension
- Lombok support toggle
- MapStruct vs manual mapper toggle
Contributing
Contributions are welcome. Please open an issue before submitting a pull request.
git clone https://github.com/PIO-VIA/JPIO.git
cd JPIO
pip install -e ".[dev]"
License
MIT © PIO
Metadata
Release files for jpio-cli 0.6.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jpio_cli-0.6.5.tar.gz | 7.5 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jpio_cli-0.6.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.1 MB
Release files / jpio_cli-0.6.5.tar.gz
| Download URL | jpio_cli-0.6.5.tar.gz |
|---|---|
| Size | 7.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ef8d4492d0af529386cd3a494f78ce1489d98df520d0cf9ef487bf220148157
|
|
BLAKE2b-256 checksum How to use checksums |
06110c290da1dd7352df7940b8b1a4469e9bfada96feeb34867daf7ea334ab6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 15, 2026.
Transparency logRelease files / jpio_cli-0.6.5-py3-none-any.whl
| Download URL | jpio_cli-0.6.5-py3-none-any.whl |
|---|---|
| Size | 7.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
64332adf4907fab5f970c8882b8832127363d49b1bbfd4c58c21ff715ea9847d
|
|
BLAKE2b-256 checksum How to use checksums |
3462ba114c2fdf359c5d4451efdeb16657800f26ea68db1a04e0559b54d1cb5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 15, 2026.
Transparency log