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 doctor command for environment checks

II. Environment Requirements

PhaseRequirement
Run CLINode.js
Build generated backend projectJava + Maven (can be verified with doctor)

Java and Maven requirements by Oinone version:

Oinone VersionJDKMavenSpring Boot
6.4.*Java 8 (1.8.0_221+)2.3.8
7.2+Java 17Maven 3.6.3+3.3.13

III. Installation

bash
npm install -g @oinone/pamirs-cli

Verify installation:

bash
oinone-backend --version

You can also use npx without global installation:

bash
npx @oinone/pamirs-cli create my-project

IV. Creating a Project

(I) Interactive Creation

Run the create command and follow the prompts:

bash
oinone-backend create my-project

Note

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:

bash
oinone-backend create my-project \
  --group-id pro.shushi.demo \
  --oinone-version 7.2.9 \
  --edition community

Enterprise edition:

bash
oinone-backend create my-project-enterprise \
  --group-id pro.shushi.demo \
  --oinone-version 7.2.9 \
  --edition enterprise \
  --username <username> \
  --password <password> \
  --write-project-credential

(III) Dry-Run Mode

Use --dry-run to validate parameters without writing to disk:

bash
oinone-backend create my-project \
  --group-id pro.shushi.demo \
  --oinone-version 7.2.9 \
  --edition community \
  --dry-run

(IV) Specifying Features / Middleware / Modules

bash
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,timezone

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:

bash
oinone-backend create my-project-64 \
  --group-id pro.shushi.demo \
  --oinone-version 6.4.12 \
  --edition community

Enterprise edition:

bash
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-credential

V. Generated Project Structure

The generated backend project has a Maven multi-module structure:

shell
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 configuration

Build the project:

bash
cd my-project
mvn clean install

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

ParameterDescription
-l, --lang <lang>Language (zh-CN / en-US)
-v, --versionOutput version number
-h, --helpOutput help

(II) oinone-backend create [artifactId]

ParameterDescription
-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-credentialWrite settings.xml to the project directory and append to .gitignore
-f, --forceOverwrite/merge if target directory exists
-d, --dry-runDry-run mode: do not write to disk

(III) oinone-backend doctor

ParameterDescription
-o, --oinone-version <version>Oinone version to validate (only 6.4.* and 7.2+ are supported)
bash
oinone-backend doctor --oinone-version 7.2.9

(IV) --features (Optional Features)

Default features by edition:

EditionDefault Features
communityNone
seedTURBO,SYS_SETTING_CORPORATE
standardTURBO,SYS_SETTING_CORPORATE,PERMISSION,NO_CODE_APP_CREATION,METADATA_MANAGER
professionalTURBO,SYS_SETTING_CORPORATE,PERMISSION,NO_CODE_APP_CREATION,METADATA_MANAGER,DATA_AUDIT,VIRTUAL_FIELDS
enterpriseTURBO,SYS_SETTING_CORPORATE,PERMISSION,NO_CODE_APP_CREATION,METADATA_MANAGER,DATA_AUDIT,VIRTUAL_FIELDS,LOW_CODE_GENERATION,SSO

(V) --middlewares (Middleware)

DefaultOptions
rocketmqrocketmq,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:

bash
cd my-project
mvn clean install -s settings.xml

Tip

  • settings.xml contains Maven repository credentials. Do not commit it to version control (the CLI automatically adds it to .gitignore).

VIII. Version and Template Mapping

Oinone VersionTemplate DirectoryDescription
6.4.*template-6.4.0Java 8 + Spring Boot 2.3.8
7.2+template-7.2.0Java 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

bash
mkdir oinone-dev && cd oinone-dev

2. Generate the Project and Clone the Framework Source

In the parent directory, generate the project using the CLI:

bash
oinone-backend create my-project \
  --group-id pro.shushi.demo \
  --oinone-version 7.2.9 \
  --edition community

In the same parent directory, clone the Oinone backend framework source:

bash
git clone https://github.com/oinone/oinone-pamirs.git

Final directory structure:

shell
oinone-dev/
├── my-project/        # CLI-generated business project
└── oinone-pamirs/     # Oinone backend framework source

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-pamirs source code take effect immediately without republishing to a Maven repository.