create-o2s-app
v4.1.8
Published
CLI tool to scaffold new O2S applications with Next.js and NestJS setup.
Maintainers
Readme
create-o2s-app
CLI tool to scaffold new O2S applications with an interactive setup wizard.
Usage
npx create-o2s-app my-appInteractive Wizard
When you run create-o2s-app, it launches an interactive wizard that guides you through the setup:
- Project name — Name of the directory to create (can also be passed as a CLI argument)
- Template — Choose between
o2s,dxp, orcustom - Blocks — Select which UI blocks to include in your project
- Integrations — Select backend integrations (e.g. Strapi, Zendesk, Medusa)
- Environment variables — Configure required env vars for selected integrations
At the end, the wizard scaffolds your project and installs dependencies.
Templates
| Template | Description |
| -------- | -------------------------------------------------------------------------------------- |
| o2s | Full O2S Customer Portal — ticket management, invoices, notifications, orders and more |
| dxp | DXP Frontend Starter — knowledge base, marketing portal, Digital Experience Platform |
| custom | Start from scratch — choose only the blocks and integrations you need |
Options
| Option | Description |
| ------------------------------- | ------------------------------------------------------------------------------ |
| --template <template> | Template to use: o2s, dxp, or custom |
| --blocks <blocks> | Comma-separated list of block names (skips block selection prompt) |
| --integrations <integrations> | Comma-separated list of integration names (skips integration selection prompt) |
| --skip-install | Skip the npm install step |
| --directory <dir> | Destination directory (defaults to project name) |
Non-Interactive Mode
Pass all required options as CLI flags to skip the interactive prompts:
# Create an O2S portal with specific blocks and integrations
npx create-o2s-app my-portal \
--template o2s \
--blocks ticket-list,invoice-list \
--integrations zendesk,strapi-cms
# Create a DXP starter, skip install
npx create-o2s-app my-dxp \
--template dxp \
--skip-install
# Custom setup with only selected blocks
npx create-o2s-app my-custom \
--template custom \
--blocks article-list,article-details \
--integrations strapi-cmsWhat It Creates
my-app/
├── apps/
│ ├── frontend/ # Next.js application
│ └── api-harmonization/ # NestJS API harmonization server
├── packages/
│ ├── blocks/ # Selected UI blocks
│ └── integrations/ # Selected backend integrations
├── package.json # Workspace root with Turborepo
├── turbo.json
├── tsconfig.json # TypeScript configuration
├── .eslintrc.js # ESLint configuration
├── .prettierrc # Prettier configuration
├── .env.local # Pre-configured env vars for selected integrations
└── README.mdThe .env.local file is generated automatically with all required environment variables for your selected integrations. Fill in the values before starting development.
Note: The scaffolded project does not have a git repository initialized. Run
git initin the project directory to start tracking changes.
Related
- O2S Documentation
@o2s/framework— Core framework types and services@o2s/telemetry— Anonymous usage telemetry
Scaffolded apps should keep @o2s/utils.frontend and @o2s/utils.api-harmonization as direct dependencies in apps/frontend and apps/api-harmonization. Blocks expect these from the app (peer dependencies), not from nested installs under each block.
