Usage
Arguments
| Argument | Description |
|---|---|
<path> | Directory to create the use case in |
Options
| Option | Description | Default |
|---|---|---|
--name <name> | Use case display name | Interactive prompt |
--description <desc> | Use case description | Auto-generated |
--icon <icon> | Lucide icon name | Workflow |
--no-project | Skip project creation on the platform | — |
--project-id <id> | Use existing project ID (no API call) | — |
--no-install | Skip npm install after scaffolding | Runs npm install |
--api-url <url> | Override API URL | — |
--api-key <key> | Override API key | — |
--json | Output result as JSON | — |
What it creates
Template workflows
The scaffold generates three workflows that demonstrate different patterns:main-workflow.json (HTTP trigger)
- Webhook trigger with input validation
- Codika Init (HTTP mode — extracts metadata)
- Calls
text-processorsub-workflow viaSUBWKFLplaceholder - Codika Submit Result / Report Error
scheduled-report.json (Schedule trigger)
- Schedule Trigger (cron) + manual Webhook
- Codika Init (schedule mode — creates execution via API)
- Business logic placeholder
- Codika Submit Result / Report Error
text-processor.json (Sub-workflow)
- Execute Workflow Trigger (receives data from parent)
- No Codika Init node
- Processes data and returns result to parent
Behavior
- Creates the folder structure and generates all template files
- If authenticated and
--no-projectis not set:- Creates a project on the Codika platform via API
- Writes
projectIdandorganizationIdtoproject.json
- If
--project-idis provided:- Uses that ID without making an API call
- Writes to
project.json
- Checks if a parent directory already has
@codika-io/helper-sdkin itspackage.json:- If found (e.g., inside a monorepo): reuses the existing workspace, skips dependency setup
- If not found: creates
package.json,tsconfig.json,.gitignore, and runsnpm install
- If
--no-installis set: creates the dependency files but skipsnpm install
Project organization
Single use case (default)
When you scaffold a use case in a standalone directory, the CLI creates a self-contained project with its ownpackage.json and dependencies:
Multiple use cases (shared workspace)
If you plan to manage multiple use cases in a single repository, create a shared workspace with onepackage.json at the root. All use cases share the same dependencies:
package.json and skips creating per-use-case dependency files. Each use case is still independently deployable — codika-helper deploy use-case ./email-automation works regardless of the project structure.
This is the recommended approach when you have multiple use cases, since it avoids duplicating node_modules and keeps everything in one place.
Examples
Next steps after init
--no-project, create a project before deploying:
Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Runtime error |
2 | CLI validation error (e.g., directory already exists) |