Skip to main content

Usage

codika-helper init <path> [options]

Arguments

ArgumentDescription
<path>Directory to create the use case in

Options

OptionDescriptionDefault
--name <name>Use case display nameInteractive prompt
--description <desc>Use case descriptionAuto-generated
--icon <icon>Lucide icon nameWorkflow
--no-projectSkip project creation on the platform
--project-id <id>Use existing project ID (no API call)
--api-url <url>Override API URL
--api-key <key>Override API key
--jsonOutput result as JSON

What it creates

my-use-case/
  config.ts                    # Deployment configuration with 3 template workflows
  version.json                 # Version tracking, initialized to 1.0.0
  project.json                 # Platform project ID and org ID (if project created)
  workflows/
    main-workflow.json         # HTTP-triggered parent workflow
    scheduled-report.json      # Schedule-triggered workflow (Monday 9 AM)
    text-processor.json        # Sub-workflow called by main workflow

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-processor sub-workflow via SUBWKFL placeholder
  • 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

  1. Creates the folder structure and generates all template files
  2. If authenticated and --no-project is not set:
    • Creates a project on the Codika platform via API
    • Writes projectId and organizationId to project.json
  3. If --project-id is provided:
    • Uses that ID without making an API call
    • Writes to project.json

Examples

# Interactive scaffold with auto project creation
codika-helper init ./email-automation --name "Email Automation"

# Scaffold without creating a platform project
codika-helper init ./local-test --name "Local Test" --no-project

# Scaffold with an existing project ID
codika-helper init ./my-tool --name "My Tool" --project-id abc123

# Non-interactive, full options
codika-helper init ./crm-sync \
  --name "CRM Sync" \
  --description "Syncs contacts between CRM and email" \
  --icon "RefreshCw"

Next steps after init

# Verify the scaffold is valid
codika-helper verify use-case ./my-use-case

# Deploy to the platform
codika-helper deploy use-case ./my-use-case
If you used --no-project, create a project before deploying:
codika-helper project create --name "My Automation" --path ./my-use-case

Exit codes

CodeMeaning
0Success
1Runtime error
2CLI validation error (e.g., directory already exists)