Overview
This reference covers every operation available on the Codika platform. Each page documents the what, when, how (CLI command + all flags), and why for a single capability. Operations are grouped by lifecycle phase. Thecodika CLI (npm install -g codika) is the primary interface for all operations. Requires Node.js 22+.
Operations by lifecycle phase
Setup
| Operation | CLI command | What it does |
|---|---|---|
| Authentication | login, whoami, use, logout, config | Install CLI, authenticate, manage profiles, switch organizations |
| Create Project | project create | Create a platform project and link it to a use case folder |
| Create Organization | organization create | Create a new organization |
| Create Organization Key | organization create-key | Create an API key for an organization |
| Update Organization Key | organization update-key | Update scopes, name, or description of an API key |
Build
| Operation | CLI command | What it does |
|---|---|---|
| Initialize Use Case | init <path> | Scaffold a new use case folder with template workflows and agent skills |
| Verify Use Case | verify use-case, verify workflow | Validate use cases against structural and semantic rules |
Deploy
| Operation | CLI command | What it does |
|---|---|---|
| Deploy Use Case | deploy use-case <path> | Deploy workflows to the platform with version management |
| Deploy Data Ingestion | deploy process-data-ingestion <path> | Deploy RAG/embedding pipeline configuration |
| Deploy Documents | deploy documents <path> | Upload stage documentation to the platform |
| Publish Use Case | publish <templateId> | Promote a deployment from dev to production |
| Redeploy Use Case | redeploy | Update parameters on an existing instance without a new version |
Operate
| Operation | CLI command | What it does |
|---|---|---|
| Trigger Workflow | trigger <workflowId> | Execute a deployed workflow via HTTP |
| Fetch Use Case | get use-case <projectId> | Download a deployed use case from the platform |
| Get Execution | get execution <executionId> | Debug executions with node-level details |
| Get Instance | get instance [instanceId] | Inspect a live instance — parameters, status, version, workflows |
| Activate / Deactivate Instance | instance activate/deactivate [instanceId] | Activate or deactivate a process instance |
| List Executions | list executions <instanceId> | List recent executions for a process instance |
| List Instances | list instances | List all process instances for an organization |
| List Projects | list projects | List all projects for an organization |
| Get Project | get project <projectId> | Inspect project details — status, deployment, stages |
| Get Skills | get skills [instanceId] | Download agent skill documents from a deployed process |
| Manage Integrations | integration set/list/delete | Configure API keys and credentials for organizations |
| Status | status [path] | Check identity, context, and deployment readiness |
CLI global configuration
Configuration is stored at~/.config/codika/config.json (XDG-compliant, permissions 0o600).
The CLI supports multiple named profiles, each containing:
| Field | Description |
|---|---|
apiKey | The Codika API key (prefix cko_) |
baseUrl | Platform API URL |
orgId | Organization ID |
orgName | Organization display name |
keyName | API key display name |
scopes | Permission scopes (e.g., deploy:use-case, workflows:trigger) |
createdAt | When the key was created |
expiresAt | When the key expires |
Resolution chains
The CLI resolves values in a predictable priority order. Higher-priority sources override lower ones.API key resolution
--api-keyflag (highest priority)CODIKA_API_KEYenvironment variable- Active profile in config file
- Error if none found
Base URL resolution
--api-urlflagCODIKA_API_URLenvironment variable (or per-endpoint vars likeCODIKA_DEPLOY_API_URL)- Active profile base URL
- Production default
Project ID resolution
--project-idflagproject.jsonat--project-filepath (if provided)project.jsonin use case folderPROJECT_IDexport inconfig.ts
Organization-aware profile selection
Whenproject.json contains an organizationId, the CLI automatically selects the profile that matches that organization — even if a different profile is currently active. This is especially important for deployment commands.
The selection order:
--api-keyflag (always wins)CODIKA_API_KEYenvironment variable- Profile matching
organizationIdfromproject.json - Active profile
Global options
These options work across most commands:| Option | Description |
|---|---|
--json | Output as machine-readable JSON |
--api-key <key> | Override API key |
--api-url <url> | Override API base URL |
--project-file <path> | Path to custom project file (default: project.json) |
--profile <name> | Use a specific profile instead of the active one |
Global exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Runtime error (API failure, missing files, etc.) |
2 | CLI validation error (invalid arguments, missing required options) |
Profile expiry warnings
On every command, the CLI checks the active profile’s key expiry:- < 7 days until expiry: Displays a warning
- Expired: Displays an error
- No expiry data: No warning