Skip to main content

deploy use-case

Deploy a use case folder to the Codika platform.
codika-helper deploy use-case <path> [options]

Arguments

ArgumentDescription
<path>Path to use case folder (must contain config.ts and workflows/)

Options

OptionDescriptionDefault
--api-url <url>Codika API URLCODIKA_API_URL env or profile
--api-key <key>Codika API keyCODIKA_API_KEY env or profile
--project-id <id>Override project IDproject.json or config.ts
--patchPatch version bumpDefault
--minorMinor version bump
--majorMajor version bump
--version <X.Y>Explicit API version
--additional-file <abs:rel>Add extra file (repeatable)
--jsonJSON output
--dry-runPreview without calling API

Version strategy

FlagLocal version changeAPI version strategy
--patch (default)1.0.0 → 1.0.1minor_bump
--minor1.0.1 → 1.1.0minor_bump
--major1.1.0 → 2.0.0major_bump
--version 3.0Unchangedexplicit (version 3.0)

What happens on deploy

  1. Read version.json for current version
  2. Validate the use case (same as verify use-case)
  3. Bump version based on flags
  4. Resolve project ID: --project-id > project.json > config.ts
  5. Resolve API key: --api-key > env > org-matching profile > active profile
  6. Package all workflow files
  7. Send to the Codika platform API
  8. On success:
    • Update version.json with new local version
    • Save devProcessInstanceId to project.json
    • Archive deployment in deployments/{projectId}/process/{apiVersion}/
    • Update project-info.json with version mapping

Dry-run mode

Preview the deployment without calling the API:
codika-helper deploy use-case ./my-use-case --dry-run
This validates the configuration, displays the deployment plan (versions, workflows, project ID, integrations), and exits with the validation status.

Additional files

Attach extra files to the deployment (e.g., documentation, data files):
codika-helper deploy use-case ./my-use-case \
  --additional-file "/absolute/path/to/readme.md:docs/readme.md" \
  --additional-file "/absolute/path/to/data.json:data/seed.json"
Format: absolutePath:relativePath — the relative path determines where the file is stored in the deployment archive.

Examples

# Default deployment (patch bump)
codika-helper deploy use-case ./email-automation

# Minor version bump
codika-helper deploy use-case ./email-automation --minor

# Major version bump
codika-helper deploy use-case ./email-automation --major

# Explicit API version
codika-helper deploy use-case ./email-automation --version 2.0

# Dry-run preview
codika-helper deploy use-case ./email-automation --dry-run

# Deploy with specific project ID
codika-helper deploy use-case ./email-automation --project-id abc123

# JSON output for CI
codika-helper deploy use-case ./email-automation --json

Output

✓ Deployed successfully
  Version:     1.2.4 (API: 1.3)
  Workflows:   3
  Project:     abc123
  Instance:    def456

deploy process-data-ingestion

Deploy a data ingestion configuration for RAG (document embedding) workflows.
codika-helper deploy process-data-ingestion <path> [options]

Arguments

ArgumentDescription
<path>Path to use case folder (config.ts must export getDataIngestionConfig())

Options

OptionDescriptionDefault
--api-url <url>Data Ingestion API URLCODIKA_DATA_INGESTION_API_URL env
--api-key <key>Codika API keyCODIKA_API_KEY env or profile
--project-id <id>Override project IDproject.json
--version-strategy <strategy>major_bump, minor_bump, or explicitminor_bump
--explicit-version <version>Required if strategy is explicit
--jsonJSON output

Output

✓ Data ingestion deployed
  ID:          di_abc123
  Version:     1.2
  Webhook URLs:
    embed:     https://.../{processId}/embed
    delete:    https://.../{processId}/embed-delete
Data ingestion deployments are independent from use case deployments — they do not trigger “update available” notifications.

Exit codes

CodeMeaning
0Deployment successful
1API error or validation failure