ar-infra-cli 0.1.2__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ar_infra_cli-0.2.0/PKG-INFO +544 -0
- ar_infra_cli-0.2.0/ar_infra_cli.egg-info/PKG-INFO +544 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/ar_infra_cli.egg-info/SOURCES.txt +6 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/ar_infra_cli.egg-info/requires.txt +5 -5
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/pyproject.toml +7 -7
- ar_infra_cli-0.2.0/readme.md +475 -0
- ar_infra_cli-0.2.0/src/ar_infra/application/use_cases/add_dependency_use_case.py +112 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/application/use_cases/generate_project_use_case.py +22 -7
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/application/use_cases/input_dto.py +0 -4
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/application/use_cases/output_dto.py +0 -5
- ar_infra_cli-0.2.0/src/ar_infra/cli/command/add_dependency.py +118 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/cli/command/init.py +58 -33
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/cli/main.py +52 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/cli/prompt/interactive_prompt.py +105 -50
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/cli/prompt/validator.py +1 -1
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/cli/resources/documentation.py +30 -0
- ar_infra_cli-0.2.0/src/ar_infra/cli/ui/color_properties.py +20 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/cli/ui/console.py +0 -2
- ar_infra_cli-0.2.0/src/ar_infra/cli/ui/help.py +236 -0
- ar_infra_cli-0.2.0/src/ar_infra/cli/ui/message.py +65 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/domain/constant.py +0 -2
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/domain/entities/gradle_dependency.py +0 -1
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/domain/entities/path_resolver.py +38 -44
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/domain/enums/template_feature.py +5 -2
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/domain/exceptions/validation_error.py +0 -10
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/domain/value_objects/artifact_id.py +0 -2
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/domain/value_objects/group_id.py +0 -27
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/domain/value_objects/package_name.py +2 -4
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/domain/value_objects/version.py +0 -2
- ar_infra_cli-0.2.0/src/ar_infra/infrastructure/config.py +2 -0
- ar_infra_cli-0.2.0/src/ar_infra/infrastructure/gradle/dependency_parser.py +114 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/infrastructure/gradle/gradle_parser.py +8 -17
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/infrastructure/gradle/gradle_writter.py +22 -20
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/infrastructure/processor/bot.py +28 -49
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/infrastructure/processor/exception.py +0 -3
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/infrastructure/processor/format_script_runner.py +4 -6
- ar_infra_cli-0.2.0/src/ar_infra/infrastructure/processor/github_app.py +185 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/infrastructure/processor/package_renamer.py +10 -10
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/infrastructure/template/env_handler.py +2 -2
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/infrastructure/template/exception.py +0 -3
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/infrastructure/template/facadeit_handler.py +27 -17
- ar_infra_cli-0.2.0/src/ar_infra/infrastructure/template/feature_config.py +202 -0
- ar_infra_cli-0.2.0/src/ar_infra/infrastructure/template/feature_manager.py +201 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/infrastructure/template/github_template_fetcher.py +53 -12
- ar_infra_cli-0.2.0/src/ar_infra/infrastructure/template/swagger_handler.py +104 -0
- ar_infra_cli-0.2.0/src/ar_infra/properties.py +5 -0
- ar_infra_cli-0.1.2/PKG-INFO +0 -68
- ar_infra_cli-0.1.2/ar_infra_cli.egg-info/PKG-INFO +0 -68
- ar_infra_cli-0.1.2/src/ar_infra/cli/ui/color_properties.py +0 -2
- ar_infra_cli-0.1.2/src/ar_infra/cli/ui/help.py +0 -106
- ar_infra_cli-0.1.2/src/ar_infra/cli/ui/message.py +0 -50
- ar_infra_cli-0.1.2/src/ar_infra/infrastructure/config.py +0 -13
- ar_infra_cli-0.1.2/src/ar_infra/infrastructure/template/feature_config.py +0 -137
- ar_infra_cli-0.1.2/src/ar_infra/infrastructure/template/feature_manager.py +0 -84
- ar_infra_cli-0.1.2/src/ar_infra/properties.py +0 -3
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/MANIFEST.in +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/ar_infra_cli.egg-info/dependency_links.txt +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/ar_infra_cli.egg-info/entry_points.txt +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/ar_infra_cli.egg-info/top_level.txt +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/setup.cfg +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/__init__.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/__init__.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/application/__init__.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/application/use_cases/__init__.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/application/use_cases/exception.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/cli/__init__.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/cli/command/__init__.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/cli/prompt/__init__.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/cli/resources/__init__.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/cli/resources/banner.txt +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/cli/ui/__init__.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/cli/ui/banner.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/cli/ui/progress.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/cli/ui/welcome.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/domain/__init__.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/domain/entities/__init__.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/domain/entities/path_constant.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/domain/enums/__init__.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/domain/exceptions/__init__.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/domain/value_objects/__init__.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/health.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/infrastructure/__init__.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/infrastructure/fs_utilities.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/infrastructure/gradle/__init__.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/infrastructure/gradle/gradle_exception.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/infrastructure/processor/__init__.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/infrastructure/template/__init__.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/infrastructure/template/development_artifact_remover.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/infrastructure/template/project_signature.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/infrastructure/template/rest_exception_manager.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/src/ar_infra/logger.py +0 -0
- {ar_infra_cli-0.1.2 → ar_infra_cli-0.2.0}/tests/test_health.py +0 -0
|
@@ -0,0 +1,544 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ar-infra-cli
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Production-ready Spring Boot project generator CLI
|
|
5
|
+
Author-email: Abegà Razafindratelo <a.razafindratelo@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Abega1642/ar-infra-cli
|
|
8
|
+
Project-URL: Repository, https://github.com/Abega1642/ar-infra-cli
|
|
9
|
+
Project-URL: Issues, https://github.com/Abega1642/ar-infra-cli/issues
|
|
10
|
+
Keywords: cli,spring-boot,generator,java,gradle
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
19
|
+
Classifier: Operating System :: OS Independent
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
Requires-Dist: typer[all]>=0.21.1
|
|
23
|
+
Requires-Dist: click>=8.3.1
|
|
24
|
+
Requires-Dist: rich>=14.2.0
|
|
25
|
+
Requires-Dist: questionary>=2.1.1
|
|
26
|
+
Requires-Dist: pydantic>=2.12.5
|
|
27
|
+
Requires-Dist: pydantic-settings>=2.12.0
|
|
28
|
+
Requires-Dist: gitpython>=3.1.45
|
|
29
|
+
Requires-Dist: jinja2>=3.1.6
|
|
30
|
+
Requires-Dist: httpx>=0.28.1
|
|
31
|
+
Requires-Dist: requests>=2.32.5
|
|
32
|
+
Requires-Dist: toml>=0.10.2
|
|
33
|
+
Requires-Dist: pyyaml>=6.0.3
|
|
34
|
+
Requires-Dist: python-dotenv>=1.2.1
|
|
35
|
+
Requires-Dist: pathspec>=0.12.1
|
|
36
|
+
Requires-Dist: pathvalidate>=3.3.1
|
|
37
|
+
Provides-Extra: dev
|
|
38
|
+
Requires-Dist: pytest>=9.0.2; extra == "dev"
|
|
39
|
+
Requires-Dist: pytest-cov>=7.0.0; extra == "dev"
|
|
40
|
+
Requires-Dist: pytest-asyncio>=1.3.0; extra == "dev"
|
|
41
|
+
Requires-Dist: pytest-mock>=3.15.1; extra == "dev"
|
|
42
|
+
Requires-Dist: pytest-xdist>=3.8.0; extra == "dev"
|
|
43
|
+
Requires-Dist: pytest-timeout>=2.4.0; extra == "dev"
|
|
44
|
+
Requires-Dist: pytest-benchmark>=5.2.3; extra == "dev"
|
|
45
|
+
Requires-Dist: faker>=39.0.0; extra == "dev"
|
|
46
|
+
Requires-Dist: freezegun>=1.5.5; extra == "dev"
|
|
47
|
+
Requires-Dist: ruff>=0.14.11; extra == "dev"
|
|
48
|
+
Requires-Dist: black>=25.12.0; extra == "dev"
|
|
49
|
+
Requires-Dist: mypy>=1.19.1; extra == "dev"
|
|
50
|
+
Requires-Dist: types-toml>=0.10.8.20240310; extra == "dev"
|
|
51
|
+
Requires-Dist: types-pyyaml>=6.0.12.20250915; extra == "dev"
|
|
52
|
+
Requires-Dist: types-requests>=2.32.4.20260107; extra == "dev"
|
|
53
|
+
Requires-Dist: bandit[toml]>=1.9.2; extra == "dev"
|
|
54
|
+
Requires-Dist: safety>=3.7.0; extra == "dev"
|
|
55
|
+
Requires-Dist: pip-audit>=2.10.0; extra == "dev"
|
|
56
|
+
Requires-Dist: coverage[toml]>=7.13.0; extra == "dev"
|
|
57
|
+
Requires-Dist: pre-commit>=4.5.1; extra == "dev"
|
|
58
|
+
Requires-Dist: sphinx>=8.2.3; extra == "dev"
|
|
59
|
+
Requires-Dist: sphinx-rtd-theme; extra == "dev"
|
|
60
|
+
Requires-Dist: sphinx-autodoc-typehints>=3.6.0; extra == "dev"
|
|
61
|
+
Requires-Dist: build>=1.4.0; extra == "dev"
|
|
62
|
+
Requires-Dist: setuptools>=80.9.0; extra == "dev"
|
|
63
|
+
Requires-Dist: wheel>=0.45.1; extra == "dev"
|
|
64
|
+
Requires-Dist: twine>=6.2.0; extra == "dev"
|
|
65
|
+
Requires-Dist: ipython>=9.9.0; extra == "dev"
|
|
66
|
+
Requires-Dist: lxml>=5.3.0; extra == "dev"
|
|
67
|
+
Requires-Dist: typing-extensions>=4.12.0; extra == "dev"
|
|
68
|
+
Requires-Dist: ipdb>=0.13.13; extra == "dev"
|
|
69
|
+
|
|
70
|
+
<p align="center">
|
|
71
|
+
<img src="ar-infra-logo.png" alt="ar-infra-cli logo" width="400"/>
|
|
72
|
+
</p>
|
|
73
|
+
|
|
74
|
+
<h1 align="center">ar-infra-cli</h1>
|
|
75
|
+
|
|
76
|
+
<p align="center">
|
|
77
|
+
<strong>CLI generator for production-ready Spring Boot backends</strong><br/>
|
|
78
|
+
Opinionated infrastructure scaffolding powered by ar-infra-template
|
|
79
|
+
</p>
|
|
80
|
+
|
|
81
|
+
<p align="center">
|
|
82
|
+
<a href="https://github.com/Abega1642/ar-infra-cli/actions">
|
|
83
|
+
<img src="https://img.shields.io/badge/ci%2Fcd-passing-brightgreen?style=for-the-badge&logo=githubactions&logoColor=white" />
|
|
84
|
+
</a>
|
|
85
|
+
<a href="https://github.com/Abega1642/ar-infra-cli/blob/main/LICENSE">
|
|
86
|
+
<img src="https://img.shields.io/github/license/Abega1642/ar-infra-cli?style=for-the-badge" />
|
|
87
|
+
</a>
|
|
88
|
+
<img src="https://img.shields.io/badge/version-0.2.0-blue?style=for-the-badge" />
|
|
89
|
+
<img src="https://img.shields.io/badge/python-3.11-3776AB?style=for-the-badge&logo=python&logoColor=white" />
|
|
90
|
+
<img src="https://img.shields.io/badge/CLI-Typer-000000?style=for-the-badge" />
|
|
91
|
+
</p>
|
|
92
|
+
|
|
93
|
+
<p align="center">
|
|
94
|
+
<img src="https://skillicons.dev/icons?i=python,java,spring,gradle,docker,postgres,mysql,rabbitmq,github&theme=light" />
|
|
95
|
+
</p>
|
|
96
|
+
|
|
97
|
+
<p align="center">
|
|
98
|
+
<sub>Designed & maintained by <a href="https://github.com/Abega1642">Abegà Razafindratelo</a></sub>
|
|
99
|
+
</p>
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
<p align="center">
|
|
104
|
+
<img src="ar-infra-cli-banner.png" alt="ar-infra-cli banner" width="50%"/>
|
|
105
|
+
</p>
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Table of Contents
|
|
110
|
+
|
|
111
|
+
- [Introduction](#introduction)
|
|
112
|
+
- [What's New in v0.2.0](#whats-new-in-v020)
|
|
113
|
+
- [What is ar-infra?](#what-is-ar-infra)
|
|
114
|
+
- [What is ar-infra-template?](#what-is-ar-infra-template)
|
|
115
|
+
- [What is ar-infra-cli?](#what-is-ar-infra-cli)
|
|
116
|
+
- [Installation](#installation)
|
|
117
|
+
- [Usage](#usage)
|
|
118
|
+
- [Interactive Mode](#interactive-mode)
|
|
119
|
+
- [Command Line Mode](#command-line-mode)
|
|
120
|
+
- [Adding Dependencies](#adding-dependencies)
|
|
121
|
+
- [Available Options](#available-options)
|
|
122
|
+
- [Feature Flags](#feature-flags)
|
|
123
|
+
- [Examples](#examples)
|
|
124
|
+
- [Generated Project Structure](#generated-project-structure)
|
|
125
|
+
- [System Requirements](#system-requirements)
|
|
126
|
+
- [Conclusion](#conclusion)
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Introduction
|
|
131
|
+
|
|
132
|
+
The **ar-infra-cli** is a command-line tool designed to generate **production-ready Spring Boot applications**. It leverages the [ar-infra-template](https://github.com/Abega1642/ar-infra-template.git) as its foundation, ensuring that every generated project starts with a complete, enterprise-grade infrastructure.
|
|
133
|
+
|
|
134
|
+
This CLI automates the creation of new backend services, eliminating the repetitive setup work and enforcing consistent architecture and security practices across projects.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## What's New in v0.2.0
|
|
139
|
+
|
|
140
|
+
### MySQL Database Support
|
|
141
|
+
|
|
142
|
+
- **Multiple database options**: Choose between PostgreSQL and MySQL during project initialization
|
|
143
|
+
- **Dedicated database selection workflow**: Database choice is now a separate step with clear prompts
|
|
144
|
+
- **Full MySQL integration**: Connection pooling, migrations, and entity management configured automatically
|
|
145
|
+
|
|
146
|
+
### New `add-dependency` Command
|
|
147
|
+
|
|
148
|
+
- **Gradle dependency management**: Add dependencies to existing projects without manual file editing
|
|
149
|
+
- **Single or batch additions**: Add one dependency or multiple in a single command
|
|
150
|
+
- **Project path flexibility**: Specify custom project paths or use current directory
|
|
151
|
+
|
|
152
|
+
### Enhanced OpenAPI Documentation Handling
|
|
153
|
+
|
|
154
|
+
- **Dynamic specification cleanup**: OpenAPI documentation (doc/api.yml) now updates based on selected features
|
|
155
|
+
- **SwaggerHandler integration**: Automatically removes unused API endpoints for non-selected features
|
|
156
|
+
- **Accurate documentation**: Generated API specifications reflect only the enabled infrastructure components
|
|
157
|
+
|
|
158
|
+
### Template Version Compatibility
|
|
159
|
+
|
|
160
|
+
- **Tag-based cloning**: CLI now clones specific template repository versions using Git tags
|
|
161
|
+
- **Backward compatibility**: Older CLI versions continue to work with their corresponding template versions
|
|
162
|
+
- **Forward compatibility**: New template updates won't break existing CLI installations
|
|
163
|
+
|
|
164
|
+
### Streamlined Feature Selection
|
|
165
|
+
|
|
166
|
+
- **Two-step selection process**: Database choice separated from other infrastructure features
|
|
167
|
+
- **Zero-feature option**: New `--no-feature` flag generates minimal Spring Boot projects
|
|
168
|
+
- **Better workflow**: More intuitive feature selection aligned with project needs
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## What is ar-infra?
|
|
173
|
+
|
|
174
|
+
**ar-infra** refers to the architecture and infrastructure baseline defined by this ecosystem. It represents a structured, production-ready backend stack that includes:
|
|
175
|
+
|
|
176
|
+
- Messaging (RabbitMQ)
|
|
177
|
+
- Storage (S3-compatible bucket)
|
|
178
|
+
- Database (PostgreSQL or MySQL with Flyway migrations)
|
|
179
|
+
- Email service
|
|
180
|
+
- Security configuration
|
|
181
|
+
- Health check endpoints
|
|
182
|
+
- Integration testing with Testcontainers
|
|
183
|
+
- CI/CD workflows
|
|
184
|
+
- Dockerized runtime environment
|
|
185
|
+
- OpenAPI documentation with Swagger UI
|
|
186
|
+
|
|
187
|
+
This architecture is designed to be reliable, maintainable, and secure, suitable for enterprise-scale applications.
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## What is ar-infra-template?
|
|
192
|
+
|
|
193
|
+
The [ar-infra-template](https://github.com/Abega1642/ar-infra-template.git) is the **base template** that implements the ar-infra architecture. It provides the full project structure, configurations, validators, health endpoints, and CI/CD pipelines.
|
|
194
|
+
|
|
195
|
+
It is not intended to be cloned and customized manually. Instead, it serves as the **foundation** for generated projects, ensuring that every new application starts with the same solid infrastructure.
|
|
196
|
+
|
|
197
|
+
For more information about the ar-infra architecture, visit the [ar-infra-template repository](https://github.com/Abega1642/ar-infra-template.git).
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## What is ar-infra-cli?
|
|
202
|
+
|
|
203
|
+
The **ar-infra-cli** is the tool that generates new Spring Boot projects based on the ar-infra-template. It provides customization options such as:
|
|
204
|
+
|
|
205
|
+
- **groupId** and **artifactId**
|
|
206
|
+
- **Project version**
|
|
207
|
+
- **Database selection** (PostgreSQL or MySQL)
|
|
208
|
+
- **Feature selection** (add or remove components as needed)
|
|
209
|
+
- **Target location** customization
|
|
210
|
+
- **GitHub App integration** for automated CI/CD setup
|
|
211
|
+
- **Dependency management** for existing projects
|
|
212
|
+
|
|
213
|
+
By running a single command, developers can bootstrap a fully configured Spring Boot application based on the ar-infra architecture without manual setup.
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Installation
|
|
218
|
+
|
|
219
|
+
### Binary Installation (Recommended)
|
|
220
|
+
|
|
221
|
+
#### Linux (x64)
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
curl -LO https://github.com/Abega1642/ar-infra-cli/releases/download/v0.2.0/ar-infra-linux-amd64
|
|
225
|
+
curl -LO https://github.com/Abega1642/ar-infra-cli/releases/download/v0.2.0/ar-infra-linux-amd64.sha256
|
|
226
|
+
shasum -a 256 -c ar-infra-linux-amd64.sha256
|
|
227
|
+
chmod +x ar-infra-linux-amd64
|
|
228
|
+
sudo mv ar-infra-linux-amd64 /usr/local/bin/ar-infra
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
#### macOS (Intel)
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
curl -LO https://github.com/Abega1642/ar-infra-cli/releases/download/v0.2.0/ar-infra-macos-amd64
|
|
235
|
+
curl -LO https://github.com/Abega1642/ar-infra-cli/releases/download/v0.2.0/ar-infra-macos-amd64.sha256
|
|
236
|
+
shasum -a 256 -c ar-infra-macos-amd64.sha256
|
|
237
|
+
chmod +x ar-infra-macos-amd64
|
|
238
|
+
sudo mv ar-infra-macos-amd64 /usr/local/bin/ar-infra
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
#### macOS (Apple Silicon)
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
curl -LO https://github.com/Abega1642/ar-infra-cli/releases/download/v0.2.0/ar-infra-macos-arm64
|
|
245
|
+
curl -LO https://github.com/Abega1642/ar-infra-cli/releases/download/v0.2.0/ar-infra-macos-arm64.sha256
|
|
246
|
+
shasum -a 256 -c ar-infra-macos-arm64.sha256
|
|
247
|
+
chmod +x ar-infra-macos-arm64
|
|
248
|
+
sudo mv ar-infra-macos-arm64 /usr/local/bin/ar-infra
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
#### Windows (PowerShell as Administrator)
|
|
252
|
+
|
|
253
|
+
```powershell
|
|
254
|
+
Invoke-WebRequest -Uri "https://github.com/Abega1642/ar-infra-cli/releases/download/v0.2.0/ar-infra-windows-amd64.exe" -OutFile "ar-infra.exe"
|
|
255
|
+
Invoke-WebRequest -Uri "https://github.com/Abega1642/ar-infra-cli/releases/download/v0.2.0/ar-infra-windows-amd64.exe.sha256" -OutFile "ar-infra.exe.sha256"
|
|
256
|
+
certutil -hashfile ar-infra.exe SHA256
|
|
257
|
+
Move-Item ar-infra.exe C:\Windows\System32\ar-infra.exe
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### Python Package Installation
|
|
261
|
+
|
|
262
|
+
Using pipx (recommended for CLI tools):
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
pipx install ar-infra-cli
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
Using pip:
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
pip install ar-infra-cli
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## Usage
|
|
277
|
+
|
|
278
|
+
The **ar-infra-cli** provides two main commands: `ar-infra init` for project generation and `ar-infra add-dependency` for dependency management.
|
|
279
|
+
|
|
280
|
+
### Interactive Mode
|
|
281
|
+
|
|
282
|
+
The interactive mode guides you through project setup with prompts for each configuration option. This is the recommended approach for first-time users.
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
ar-infra init
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
The CLI will ask you to provide:
|
|
289
|
+
|
|
290
|
+
- Group ID (e.g., `com.example`)
|
|
291
|
+
- Artifact ID (e.g., `myapp`)
|
|
292
|
+
- Project version (e.g., `1.0.0`)
|
|
293
|
+
- Output path
|
|
294
|
+
- Database choice (PostgreSQL, MySQL, or none)
|
|
295
|
+
- Additional features to include or exclude
|
|
296
|
+
- GitHub repository setup (optional)
|
|
297
|
+
|
|
298
|
+
When you choose to push your project to a repository, the CLI will guide you through automated authorization via the ar-infra-bot GitHub App, ensuring your CI/CD workflows work immediately.
|
|
299
|
+
|
|
300
|
+
### Command Line Mode
|
|
301
|
+
|
|
302
|
+
For automation or quick generation, all options can be provided directly via command-line flags.
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
ar-infra init --group=com.example --artifact=myapp --project-version=1.0.0
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
Generate a project with MySQL and specific features:
|
|
309
|
+
|
|
310
|
+
```bash
|
|
311
|
+
ar-infra init \
|
|
312
|
+
--group=com.example \
|
|
313
|
+
--artifact=backend-api \
|
|
314
|
+
--features=mysql,rabbitmq,s3_bucket
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
Generate a minimal project with no infrastructure features:
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
ar-infra init \
|
|
321
|
+
--group=com.example \
|
|
322
|
+
--artifact=minimal-app \
|
|
323
|
+
--no-feature
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
Skip GitHub App integration if you don't need CI/CD setup:
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
ar-infra init \
|
|
330
|
+
--group=com.example \
|
|
331
|
+
--artifact=backend-api \
|
|
332
|
+
--skip-github-app
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### Adding Dependencies
|
|
336
|
+
|
|
337
|
+
The `add-dependency` command allows you to add Gradle dependencies to existing projects.
|
|
338
|
+
|
|
339
|
+
#### Add a single dependency
|
|
340
|
+
|
|
341
|
+
```bash
|
|
342
|
+
ar-infra add-dependency "implementation 'io.jsonwebtoken:jjwt-api:0.13.0'"
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
#### Add multiple dependencies
|
|
346
|
+
|
|
347
|
+
```bash
|
|
348
|
+
ar-infra add-dependency \
|
|
349
|
+
"implementation 'io.jsonwebtoken:jjwt-api:0.13.0'" \
|
|
350
|
+
"runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.13.0'" \
|
|
351
|
+
"runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.13.0'"
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
#### Add dependency to specific project
|
|
355
|
+
|
|
356
|
+
```bash
|
|
357
|
+
ar-infra add-dependency \
|
|
358
|
+
--project-path /path/to/project \
|
|
359
|
+
"implementation 'org.springframework.boot:spring-boot-starter-data-jpa'"
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
### Available Options
|
|
363
|
+
|
|
364
|
+
#### `init` Command Options
|
|
365
|
+
|
|
366
|
+
| Option | Description | Example |
|
|
367
|
+
| -------------------- | ------------------------------------------- | --------------------- |
|
|
368
|
+
| `--group` | Maven group ID for the project | `com.example` |
|
|
369
|
+
| `--artifact` | Maven artifact ID for the project | `backend-api` |
|
|
370
|
+
| `--project-version` | Version of the generated project | `1.0.0` |
|
|
371
|
+
| `--path` | Directory where the project will be created | `/home/user/projects` |
|
|
372
|
+
| `--project-dir` | Name of the project directory | `my-project` |
|
|
373
|
+
| `--features` | Comma-separated list of features to include | `mysql,rabbitmq` |
|
|
374
|
+
| `--disable-features` | Comma-separated list of features to exclude | `rabbitmq,email` |
|
|
375
|
+
| `--no-feature` | Generate project without any features | N/A |
|
|
376
|
+
| `--no-cache` | Skip template caching and fetch fresh | N/A |
|
|
377
|
+
| `--skip-github-app` | Skip GitHub App integration | N/A |
|
|
378
|
+
|
|
379
|
+
#### `add-dependency` Command Options
|
|
380
|
+
|
|
381
|
+
| Option | Description | Example |
|
|
382
|
+
| ---------------- | ------------------------------------- | ------------------ |
|
|
383
|
+
| `--project-path` | Path to the project root | `/path/to/project` |
|
|
384
|
+
| Dependencies | One or more Gradle dependency strings | See examples above |
|
|
385
|
+
|
|
386
|
+
### Feature Flags
|
|
387
|
+
|
|
388
|
+
The following features can be enabled or disabled during project generation:
|
|
389
|
+
|
|
390
|
+
#### Database Options (Choose One or None)
|
|
391
|
+
|
|
392
|
+
| Feature | Description |
|
|
393
|
+
| ------------ | -------------------------------------------------- |
|
|
394
|
+
| `postgresql` | PostgreSQL database support with Flyway migrations |
|
|
395
|
+
| `mysql` | MySQL database support with Flyway migrations |
|
|
396
|
+
|
|
397
|
+
#### Additional Infrastructure Features
|
|
398
|
+
|
|
399
|
+
| Feature | Description |
|
|
400
|
+
| ----------- | ------------------------------------------------- |
|
|
401
|
+
| `rabbitmq` | RabbitMQ message broker integration |
|
|
402
|
+
| `s3_bucket` | AWS S3-compatible storage integration (BackBlaze) |
|
|
403
|
+
| `email` | Email sending capabilities |
|
|
404
|
+
|
|
405
|
+
By default, all features are enabled. Use `--disable-features` to exclude specific components, or use `--no-feature` to generate a minimal Spring Boot application.
|
|
406
|
+
|
|
407
|
+
---
|
|
408
|
+
|
|
409
|
+
## Examples
|
|
410
|
+
|
|
411
|
+
### Basic Usage
|
|
412
|
+
|
|
413
|
+
Generate a project with default settings in interactive mode:
|
|
414
|
+
|
|
415
|
+
```bash
|
|
416
|
+
ar-infra init
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
### Quick Start with MySQL
|
|
420
|
+
|
|
421
|
+
Generate a project with MySQL database:
|
|
422
|
+
|
|
423
|
+
```bash
|
|
424
|
+
ar-infra init --group=com.mycompany --artifact=backend-api --features=mysql
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
### Full Customization
|
|
428
|
+
|
|
429
|
+
Generate a project with all options specified:
|
|
430
|
+
|
|
431
|
+
```bash
|
|
432
|
+
ar-infra init \
|
|
433
|
+
--group=dev.razafindratelo \
|
|
434
|
+
--artifact=cool-project \
|
|
435
|
+
--project-version=2.0.0 \
|
|
436
|
+
--path=/home/user/projects \
|
|
437
|
+
--project-dir=cool-project \
|
|
438
|
+
--features=postgresql,s3_bucket,rabbitmq
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
### Minimal Configuration
|
|
442
|
+
|
|
443
|
+
Generate a minimal Spring Boot project without any infrastructure:
|
|
444
|
+
|
|
445
|
+
```bash
|
|
446
|
+
ar-infra init \
|
|
447
|
+
--group=com.example \
|
|
448
|
+
--artifact=minimal-api \
|
|
449
|
+
--no-feature
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
### Fresh Template Fetch
|
|
453
|
+
|
|
454
|
+
Generate a project with fresh template (bypass cache):
|
|
455
|
+
|
|
456
|
+
```bash
|
|
457
|
+
ar-infra init \
|
|
458
|
+
--group=com.example \
|
|
459
|
+
--artifact=myapp \
|
|
460
|
+
--no-cache
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
### Add JWT Dependencies
|
|
464
|
+
|
|
465
|
+
Add JWT authentication dependencies to an existing project:
|
|
466
|
+
|
|
467
|
+
```bash
|
|
468
|
+
ar-infra add-dependency \
|
|
469
|
+
"implementation 'io.jsonwebtoken:jjwt-api:0.13.0'" \
|
|
470
|
+
"runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.13.0'" \
|
|
471
|
+
"runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.13.0'"
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
---
|
|
475
|
+
|
|
476
|
+
## Generated Project Structure
|
|
477
|
+
|
|
478
|
+
Projects generated by **ar-infra-cli** include:
|
|
479
|
+
|
|
480
|
+
- Complete Spring Boot application structure
|
|
481
|
+
- Gradle build configuration
|
|
482
|
+
- Docker and Docker Compose setup
|
|
483
|
+
- CI/CD workflows (GitHub Actions)
|
|
484
|
+
- Integration tests with Testcontainers
|
|
485
|
+
- Health check endpoints
|
|
486
|
+
- OpenAPI documentation (dynamically configured)
|
|
487
|
+
- Security configuration
|
|
488
|
+
- Database migration scripts (Flyway)
|
|
489
|
+
- Message broker configuration (optional)
|
|
490
|
+
- S3 storage integration (optional)
|
|
491
|
+
- Email service configuration (optional)
|
|
492
|
+
|
|
493
|
+
---
|
|
494
|
+
|
|
495
|
+
## System Requirements
|
|
496
|
+
|
|
497
|
+
### Binary Distribution
|
|
498
|
+
|
|
499
|
+
- **Linux**: x86_64 architecture, GLIBC 2.17+
|
|
500
|
+
- **macOS**: 10.13+ (Intel), 11.0+ (Apple Silicon)
|
|
501
|
+
- **Windows**: Windows 10/11, x86_64 architecture
|
|
502
|
+
|
|
503
|
+
### Python Package
|
|
504
|
+
|
|
505
|
+
- **Python**: 3.11 or higher
|
|
506
|
+
- **Package Manager**: pip or pipx
|
|
507
|
+
|
|
508
|
+
### Additional Requirements
|
|
509
|
+
|
|
510
|
+
- Internet connectivity for GitHub App integration (optional)
|
|
511
|
+
- Git installed for repository operations
|
|
512
|
+
|
|
513
|
+
---
|
|
514
|
+
|
|
515
|
+
## Conclusion
|
|
516
|
+
|
|
517
|
+
The **ar-infra-cli** is the entry point for teams adopting the ar-infra architecture. By combining the solid foundation of **ar-infra-template** with the automation of a CLI tool, it enables developers to start new backend projects quickly, consistently, and securely.
|
|
518
|
+
|
|
519
|
+
With v0.2.0, MySQL support provides database flexibility, the new `add-dependency` command simplifies dependency management, and tag-based template versioning ensures long-term compatibility across CLI versions.
|
|
520
|
+
|
|
521
|
+
This tool is maintained by **Abegà Razafindratelo**. For questions, issues, or contributions, please refer to the project repository or contact directly at [a.razafindratelo@gmail.com](mailto:a.razafindratelo@gmail.com).
|
|
522
|
+
|
|
523
|
+
For more information, visit the [ar-infra-template repository](https://github.com/Abega1642/ar-infra-template).
|
|
524
|
+
|
|
525
|
+
---
|
|
526
|
+
|
|
527
|
+
## Support and Documentation
|
|
528
|
+
|
|
529
|
+
- **Repository**: [https://github.com/Abega1642/ar-infra-cli](https://github.com/Abega1642/ar-infra-cli)
|
|
530
|
+
- **Issue Tracker**: [https://github.com/Abega1642/ar-infra-cli/issues](https://github.com/Abega1642/ar-infra-cli/issues)
|
|
531
|
+
- **Template Repository**: [https://github.com/Abega1642/ar-infra-template](https://github.com/Abega1642/ar-infra-template)
|
|
532
|
+
- **GitHub App**: ar-infra-bot (installation guided during project setup)
|
|
533
|
+
|
|
534
|
+
---
|
|
535
|
+
|
|
536
|
+
## Security Considerations
|
|
537
|
+
|
|
538
|
+
- Binary integrity verification via SHA256 checksums is strongly recommended
|
|
539
|
+
- All binaries are built via GitHub Actions with full transparency
|
|
540
|
+
- Secrets are injected at build time rather than bundled, improving security
|
|
541
|
+
- The ar-infra-bot GitHub App uses minimal, scoped permissions
|
|
542
|
+
- No code signing is provided; users should verify checksums before execution
|
|
543
|
+
- Source code is available for audit
|
|
544
|
+
- Template version tags ensure predictable and auditable project generation
|