I. Overview
@oinone/pamirs-cli (command: oinone-backend) is the Oinone backend project scaffold for quickly generating Maven multi-module Oinone backend projects. Current CLI version: 7.2.1, latest supported Oinone framework versions: 7.2.9 / 6.4.12.
Features:
- Interactive project creation with sensible defaults and validation
- Silent mode for CI/CD pipelines
- Optional enterprise repository credential generation
- Built-in
doctorcommand for environment checks
II. Environment Requirements
| Phase | Requirement |
|---|---|
| Run CLI | Node.js |
| Build generated backend project | Java + Maven (can be verified with doctor) |
Java and Maven requirements by Oinone version:
| Oinone Version | JDK | Maven | Spring Boot |
|---|---|---|---|
6.4.* | Java 8 (1.8.0_221+) | — | 2.3.8 |
7.2+ | Java 17 | Maven 3.6.3+ | 3.3.13 |
III. Installation
npm install -g @oinone/pamirs-cliVerify installation:
oinone-backend --versionYou can also use npx without global installation:
npx @oinone/pamirs-cli create my-projectIV. Creating a Project
(I) Interactive Creation
Run the create command and follow the prompts:
oinone-backend create my-projectNote
In interactive mode, the default groupId is pro.shushi.pamirs.demo.
(II) Silent Creation (Recommended for CI/CD)
Pass all configurations via parameters without interaction:
Community edition:
oinone-backend create my-project \
--group-id pro.shushi.demo \
--oinone-version 7.2.9 \
--edition community2
3
4
Enterprise edition:
oinone-backend create my-project-enterprise \
--group-id pro.shushi.demo \
--oinone-version 7.2.9 \
--edition enterprise \
--username <username> \
--password <password> \
--write-project-credential2
3
4
5
6
7
(III) Dry-Run Mode
Use --dry-run to validate parameters without writing to disk:
oinone-backend create my-project \
--group-id pro.shushi.demo \
--oinone-version 7.2.9 \
--edition community \
--dry-run2
3
4
5
(IV) Specifying Features / Middleware / Modules
oinone-backend create my-project \
--group-id pro.shushi.demo \
--oinone-version 7.2.9 \
--edition standard \
--features TURBO,PERMISSION \
--middlewares rocketmq \
--modules sql_record,timezone2
3
4
5
6
7
Note
--features, --middlewares, and --modules all support comma-separated values. Pass none to disable all options.
(V) Creating an Oinone 6.4.* Project
Community edition:
oinone-backend create my-project-64 \
--group-id pro.shushi.demo \
--oinone-version 6.4.12 \
--edition community2
3
4
Enterprise edition:
oinone-backend create my-project-64-enterprise \
--group-id pro.shushi.demo \
--oinone-version 6.4.12 \
--edition enterprise \
--username <username> \
--password <password> \
--write-project-credential2
3
4
5
6
7
V. Generated Project Structure
The generated backend project has a Maven multi-module structure:
my-project/
├── pom.xml # Parent POM (imports oinone-bom)
├── my-project-api/ # API module (interface definitions)
├── my-project-core/ # Core business module
├── my-project-boot/ # Bootstrap module (Spring Boot entry point)
│ ├── src/main/java/.../MyProjectApplication.java
│ └── src/main/resources/
│ ├── application.yml
│ └── config/
│ └── application-dev.yml
└── docker/ # Docker deployment configuration2
3
4
5
6
7
8
9
10
11
Build the project:
cd my-project
mvn clean install2
Note
The {artifactId}-boot module is the Spring Boot entry point. Ensure your JDK and Maven versions meet the requirements for the selected Oinone version (see Environment Requirements).
VI. Command Reference
(I) Global Parameters
| Parameter | Description |
|---|---|
-l, --lang <lang> | Language (zh-CN / en-US) |
-v, --version | Output version number |
-h, --help | Output help |
(II) oinone-backend create [artifactId]
| Parameter | Description |
|---|---|
-g, --group-id <groupId> | Project groupId (default pro.shushi.pamirs.demo) |
-o, --oinone-version <version> | Oinone version (e.g. 7.2.9) |
-p, --package <package> | Base package name (defaults to groupId) |
-e, --edition <edition> | System edition: community / seed / standard / professional / enterprise |
--features <features> | Feature list, comma-separated (or pass none) |
--middlewares <middlewares> | Middleware list, comma-separated (or pass none) |
--modules <modules> | Module/app list, comma-separated (or pass none) |
-u, --username <username> | Enterprise Maven repository username (optional) |
-P, --password <password> | Enterprise Maven repository password (optional) |
--write-project-credential | Write settings.xml to the project directory and append to .gitignore |
-f, --force | Overwrite/merge if target directory exists |
-d, --dry-run | Dry-run mode: do not write to disk |
(III) oinone-backend doctor
| Parameter | Description |
|---|---|
-o, --oinone-version <version> | Oinone version to validate (only 6.4.* and 7.2+ are supported) |
oinone-backend doctor --oinone-version 7.2.9(IV) --features (Optional Features)
Default features by edition:
| Edition | Default Features |
|---|---|
community | None |
seed | TURBO,SYS_SETTING_CORPORATE |
standard | TURBO,SYS_SETTING_CORPORATE,PERMISSION,NO_CODE_APP_CREATION,METADATA_MANAGER |
professional | TURBO,SYS_SETTING_CORPORATE,PERMISSION,NO_CODE_APP_CREATION,METADATA_MANAGER,DATA_AUDIT,VIRTUAL_FIELDS |
enterprise | TURBO,SYS_SETTING_CORPORATE,PERMISSION,NO_CODE_APP_CREATION,METADATA_MANAGER,DATA_AUDIT,VIRTUAL_FIELDS,LOW_CODE_GENERATION,SSO |
(V) --middlewares (Middleware)
| Default | Options |
|---|---|
rocketmq | rocketmq,kafka,rabbitmq |
Pass none to disable all middleware.
(VI) --modules (Modules/Apps)
| Options |
|---|
print,sql_record,channel,international,my_center,timezone |
VII. Enterprise Repository Credentials
When creating an enterprise edition project with --write-project-credential, the CLI generates a settings.xml file in the project directory and automatically appends it to .gitignore.
Build with the credentials file:
cd my-project
mvn clean install -s settings.xml2
Tip
settings.xmlcontains Maven repository credentials. Do not commit it to version control (the CLI automatically adds it to.gitignore).
VIII. Version and Template Mapping
| Oinone Version | Template Directory | Description |
|---|---|---|
6.4.* | template-6.4.0 | Java 8 + Spring Boot 2.3.8 |
7.2+ | template-7.2.0 | Java 17 + Maven 3.6.3+ + Spring Boot 3.3.13 |
Release notes:
Warning
Unsupported Oinone versions will result in an immediate error and no project will be generated.
IX. Source Dependency (Local Development)
When you need to debug or extend the Oinone backend framework source code, you can link the generated project with the framework source for local development as follows.
(I) How It Works
IntelliJ IDEA's "parent directory" workspace mechanism works with Maven multi-module projects: by opening the parent directory, IDEA recursively discovers all Maven projects under it (including the local framework source). Dependencies are resolved as local modules (project references) rather than Maven repository JARs, so changes to the framework source take effect immediately.
(II) Steps
1. Create a Parent Directory
mkdir oinone-dev && cd oinone-dev2. Generate the Project and Clone the Framework Source
In the parent directory, generate the project using the CLI:
oinone-backend create my-project \
--group-id pro.shushi.demo \
--oinone-version 7.2.9 \
--edition community2
3
4
In the same parent directory, clone the Oinone backend framework source:
git clone https://github.com/oinone/oinone-pamirs.gitFinal directory structure:
oinone-dev/
├── my-project/ # CLI-generated business project
└── oinone-pamirs/ # Oinone backend framework source2
3
3. Open the Parent Directory in IDEA
Open IntelliJ IDEA, select File → Open, choose the oinone-dev parent directory (not the my-project subproject), and click OK.
IDEA will automatically recognize both Maven projects under the parent directory. Framework dependencies will resolve to local module source code instead of JARs from remote Maven repositories.
4. Start Debugging
In IDEA, expand my-project > my-project-boot, locate the application class (e.g. MyProjectApplication.java), right-click and choose Run or Debug to start debugging with breakpoints in the framework source.
Note
- Allow time for IDEA to complete Maven indexing and dependency resolution on first import.
- Ensure your JDK and Maven versions meet the requirements for the selected Oinone version (see Environment Requirements).
- Changes to
oinone-pamirssource code take effect immediately without republishing to a Maven repository.