Skip to main content

When to use

  • Start a new use case from scratch
  • Create the initial folder structure for an n8n workflow project
  • Bootstrap a new automation with correct Codika patterns

Prerequisites

  • codika-helper CLI installed
  • For project creation: authenticated via codika-helper login (optional — scaffolding works without auth)

Command

codika-helper init <path> [options]

Options

OptionDescriptionDefault
--name <name>Use case display nameInteractive prompt
--description <desc>Use case descriptionAuto-generated
--icon <icon>Lucide icon nameWorkflow
--no-projectSkip platform project creation
--project-id <id>Use existing project ID
--no-installSkip npm install after scaffoldingRuns npm install
--jsonJSON output

Generated files

my-use-case/
  config.ts                    # 3 template workflows, full configuration
  version.json                 # Initialized to 1.0.0
  project.json                 # Project ID and org ID (if project created)
  package.json                 # Dependencies (@codika-io/helper-sdk)
  tsconfig.json                # TypeScript config for IDE type-checking
  .gitignore                   # Ignores node_modules/
  node_modules/                # Installed automatically (unless --no-install)
  workflows/
    main-workflow.json         # HTTP trigger, Codika Init, sub-workflow call
    scheduled-report.json      # Schedule trigger with manual webhook fallback
    text-processor.json        # Sub-workflow with Execute Workflow Trigger

Multiple use cases (shared workspace)

For managing several use cases in one repository, set up a shared workspace with a single package.json at the root:
mkdir my-automations && cd my-automations
npm init -y && npm install @codika-io/helper-sdk
echo 'node_modules/' > .gitignore
codika-helper init ./email-tool --name "Email Tool"
codika-helper init ./report-gen --name "Report Generator"
my-automations/
  package.json              # Shared dependencies
  node_modules/             # Single copy
  email-tool/
    config.ts
    workflows/
  report-gen/
    config.ts
    workflows/
The CLI detects the existing dependency and skips per-use-case dependency setup. Each use case remains independently deployable.

Template demonstrates

FeatureWhere
HTTP trigger with input validationmain-workflow.json
Schedule trigger (Monday 9 AM)scheduled-report.json
Manual webhook fallbackscheduled-report.json
Sub-workflow patterntext-processor.json
SUBWKFL placeholdermain-workflow.json calls text-processor
Codika Init (HTTP mode)main-workflow.json
Codika Init (schedule mode)scheduled-report.json
Submit Result / Report ErrorAll parent workflows
Placeholder usageAll workflows

Examples

# Interactive (prompts for name)
codika-helper init ./my-automation

# Named with project creation
codika-helper init ./email-tool --name "Email Tool"

# Without project (offline scaffolding)
codika-helper init ./local-test --name "Local Test" --no-project

# With existing project
codika-helper init ./my-tool --name "My Tool" --project-id abc123

Next steps after init

# Validate the scaffold
codika-helper verify use-case ./my-automation

# If --no-project was used, create a project
codika-helper project create --name "My Automation" --path ./my-automation

# Customize config.ts and workflows, then deploy
codika-helper deploy use-case ./my-automation

Exit codes

CodeMeaning
0Success
1Runtime error
2Validation error (directory exists, invalid path)