Logo
Search
API Docs

CLI: Project Setup Wizard

Developer Tooling

CLI: Project Setup Wizard (core-system init)

Overview

core-system init is a project setup wizard built into the Sulus CLI that intelligently integrates Sulus into an existing codebase: it detects your framework, installs the appropriate SDK, and generates working example code and configuration — all from a single command. This page covers the wizard itself. For the underlying CLI authentication it relies on, see CLI & API Key Auth and CLI Key Rotation & Multi-Account.

Run it from your project root:

cd my-project
core-system init

The wizard will:

  1. Detect your project type and framework
  2. Install the appropriate Sulus SDK
  3. Generate example components and API routes
  4. Create environment configuration templates
  5. Provide next steps specific to your setup

Framework Detection

The wizard analyzes your project structure to identify the right framework and SDK to install, looking at:

  • Package filespackage.json, requirements.txt, go.mod, and similar
  • Configuration files — framework-specific config files already present in the project
  • Project structure — directory patterns and file extensions
  • Dependencies — packages and libraries already installed

If detection doesn't land on the framework you're actually using, override it directly with the --framework flag rather than restructuring your project to be more detectable (see Advanced Flags below).


What Gets Generated

The exact files and packages generated depend on the detected framework:

FrameworkGenerated FilesInstalled Packages
React / Next.jsSulusButton.tsx, webhook.ts, sulus-client.ts, .env.example@core-system/web-sdk, @core-system/server-sdk
Pythonsulus_example.py, webhook_handler.py, requirements.txt, .env.examplesulus-server-sdk
Node.jssulus-example.js, webhook-server.js, .env.example@core-system/server-sdk

Supported Frameworks

The wizard covers frontend, mobile, and backend targets:

  • Frontend: React, Vue.js, Angular, Next.js, Svelte, Vanilla JS
  • Mobile: React Native (Expo and bare workflow), Flutter (iOS, Android, and Web)
  • Backend: Node.js, Python, Go, Ruby, Java, C#/.NET

Advanced CLI Flags

FlagEffect
core-system init /path/to/projectInitializes a specific directory instead of the current one
--skip-installGenerates files only, without installing the SDK packages
--framework <name>Overrides auto-detection and forces a specific framework (e.g. --framework react, --framework python)
--template <name>Uses a custom template instead of the default generated example
--forceSkips confirmation prompts and overwrites existing files

Post-Init Environment Setup

After running core-system init, finish wiring up your environment:

# Copy the generated template
cp .env.example .env

# Add your API key
CORE_SYSTEM_API_KEY=your-api-key-here

# Optionally configure a webhook URL for local development
CORE_SYSTEM_WEBHOOK_URL=https://your-domain.com/api/sulus/webhook

Find your API key on the dashboard at dashboard.sulus.ai.


Common Patterns

Monorepos

In a monorepo, run core-system init separately inside each package that needs it, rather than once at the repository root — framework detection works per-directory:

cd packages/web-app && core-system init --framework react
cd ../api-server && core-system init --framework node

CI/CD

For automated environments, skip installation during the pipeline build step and rely on your existing dependency install step, authenticating with an API key rather than an interactive login (see CLI & API Key Auth):

# GitHub Actions example
env:
  CORE_SYSTEM_API_KEY: ${{ secrets.SULUS_PROD_KEY }}

steps:
  - name: Initialize Sulus integration
    run: |
      core-system init --skip-install --force

Docker

Run the wizard as part of your image build, then rely on the environment variable at container runtime rather than an interactive login:

FROM node:20
WORKDIR /app
COPY . .
RUN npm install && core-system init --skip-install --force
ENV CORE_SYSTEM_API_KEY=your-api-key-here
CMD ["node", "sulus-example.js"]

Troubleshooting

  • Framework not detected: confirm you're running the command from the project root, check that the expected config/package files are present, or bypass detection entirely with --framework <name>.
  • Permission errors during install: for npm-based projects, retry the install step with elevated permissions; for Python projects, install with a user-level flag instead of a system-wide install.
  • Existing-file conflicts: by default the wizard asks for confirmation before overwriting a file it finds already in place. Use --force to skip that confirmation and overwrite existing files outright.

For CLI authentication itself — environment variables, flags, config file, OAuth login, key rotation, and multi-account switching — see CLI & API Key Auth and CLI Key Rotation & Multi-Account.