@oinone/pamirs-cli
v7.2.0
Published
CLI tool to generate Oinone Backend Template
Downloads
129
Readme
Oinone Backend CLI
CLI scaffolding tool to generate Oinone backend projects.
- Package:
@oinone/pamirs-cli - Binary:
oinone-backend - 中文文档: README_zh-CN.md
Features
- Interactive project scaffolding with sensible defaults
- Non-interactive (CI-friendly) mode via CLI options
- Optional enterprise repository credential file generation
- Environment check via
doctor
Requirements
- Node.js to run the CLI
- Java + Maven for building the generated project (validated by
doctor)- Oinone
6.4.*: Java 8 (1.8.0_221+) recommended - Oinone
7.2+: Java 17 and Maven 3.6.3+ recommended
- Oinone
Version and feature list
Supported Oinone versions
| Oinone version | Template directory | Notes |
| --- | --- | --- |
| 6.4.* | template-6.4.0 | Java 8 (1.8.0_221+) recommended |
| 7.2+ | template-7.2.0 | Java 17 and Maven 3.6.3+ recommended |
--features
| Edition | Defaults (silent mode) | Available values |
| --- | --- | --- |
| community | None | None |
| seed | TURBO,SYS_SETTING_CORPORATE | TURBO,SYS_SETTING_CORPORATE |
| standard | TURBO,SYS_SETTING_CORPORATE,PERMISSION,NO_CODE_APP_CREATION,METADATA_MANAGER | 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 | 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 | TURBO,SYS_SETTING_CORPORATE,PERMISSION,NO_CODE_APP_CREATION,METADATA_MANAGER,DATA_AUDIT,VIRTUAL_FIELDS,LOW_CODE_GENERATION,SSO |
--middlewares
| Default (silent mode) | Available values |
| --- | --- |
| rocketmq | rocketmq,kafka,rabbitmq |
--modules
| Available values |
| --- |
| print,sql_record,channel,international,my_center |
--dependencies
| Available values |
| --- |
| timezone |
Installation
npm install -g @oinone/pamirs-cliOr run with npx:
npx @oinone/pamirs-cli create my-projectUsage
Quick create (recommended)
oinone-backend create my-project --group-id pro.shushi.demo --oinone-version 7.2.2 --edition communityoinone-backend create my-project-enterprise --group-id pro.shushi.demo --oinone-version 7.2.2 --edition enterprise --username <username> --password <password> --write-project-credentialMore examples (Oinone 7.2+)
Create project (interactive):
oinone-backend create my-projectCreate project (non-interactive):
oinone-backend create my-project --group-id pro.shushi.demo --oinone-version 7.2.2 --edition enterprise --username <username> --password <password> --write-project-credentialDry-run (no files written):
oinone-backend create my-project --group-id pro.shushi.demo --oinone-version 7.2.2 --edition community --dry-runCreate with explicit feature/middleware/module selection:
oinone-backend create my-project --group-id pro.shushi.demo --oinone-version 7.2.2 --edition standard --features TURBO,PERMISSION --middlewares rocketmq --modules sql_record --dependencies timezoneMore examples (Oinone 6.4.*)
Community edition:
oinone-backend create my-project-64 --group-id pro.shushi.demo --oinone-version 6.4.0 --edition communityEnterprise edition:
oinone-backend create my-project-64-enterprise --group-id pro.shushi.demo --oinone-version 6.4.0 --edition enterprise --username <username> --password <password> --write-project-credentialCheck environment
oinone-backend doctor --oinone-version 7.2.2Command reference
Global options
| Option | Description |
| --- | --- |
| -l, --lang <lang> | Language (zh-CN or en-US) |
| -v, --version | Print version |
| -h, --help | Show help |
oinone-backend create [artifactId]
| Option | Description |
| --- | --- |
| -g, --group-id <groupId> | Project groupId (e.g. pro.shushi.demo) |
| -o, --oinone-version <version> | Oinone version (e.g. 7.2.2) |
| -p, --package <package> | Base package name (defaults to groupId) |
| -e, --edition <edition> | Edition (community, seed, standard, professional, enterprise) |
| --features <features> | Features, comma-separated (or none) |
| --middlewares <middlewares> | Middlewares, comma-separated (or none) |
| --modules <modules> | Modules/apps, comma-separated (or none) |
| --dependencies <dependencies> | Extra dependencies, comma-separated (or none) |
| -u, --username <username> | Enterprise repo username (optional) |
| -P, --password <password> | Enterprise repo password (optional) |
| --write-project-credential | Write settings.xml into the project and auto-add to .gitignore |
| -f, --force | Overwrite/merge into existing directory |
| -d, --dry-run | Dry-run (no files written) |
oinone-backend doctor
| Option | Description |
| --- | --- |
| -o, --oinone-version <version> | Oinone version to validate against (6.4.* or 7.2+) |
Enterprise credentials
When --write-project-credential is enabled for enterprise edition, the CLI generates a settings.xml in the project directory and appends it to .gitignore.
cd my-project
mvn clean install -s settings.xmlTemplate mapping
6.4.*→template-6.4.07.2+→template-7.2.0
Unsupported versions fail fast.
Development
npm test