Skip to main content

When to use

  • User wants to create a new project for deploying use cases
  • Before deploying if no project exists for the use case folder
  • When project.json is missing and deployment requires a project ID

Prerequisites

  • codika CLI installed and authenticated
  • Valid API key with appropriate scopes

Command

codika project create [options]

Options

OptionRequiredDescriptionDefault
--name <name>YesProject display name
--description <description>NoProject description
--template-id <id>NoTemplate ID for project setupPlatform default
--organization-id <id>Admin keys onlySpecify target organization
--path <dir>RecommendedWrite project.json to this directory
--project-file <path>NoCustom filename for project fileproject.json
--api-url <url>NoOverride API URL
--api-key <key>NoOverride API key
--profile <name>NoUse a specific profile instead of the active one
--jsonNoJSON output

Behavior

  1. Calls the Codika platform API to create the project
  2. Creates a project in the specified (or inferred) organization
  3. If --path is provided, writes project.json containing projectId and organizationId
Always use --path . when creating a project for a use case folder:
cd my-use-case
codika project create --name "My Automation" --path .
This writes project.json:
{
  "projectId": "abc123",
  "organizationId": "org_def456"
}
Benefits of project.json:
  • Enables org-aware profile selection during deployment
  • Auto-resolves processInstanceId for trigger and get commands
  • Stores devProcessInstanceId after first deploy
  • Stores prodProcessInstanceId after first publish

Examples

# Create and link to current directory
codika project create --name "Email Automation" --path .

# Create with description
codika project create \
  --name "CRM Reporter" \
  --description "Weekly pipeline reports to Slack" \
  --path ./crm-reporter

# Create without saving locally
codika project create --name "Quick Test"

# For admin keys targeting a specific org
codika project create \
  --name "Team Tool" \
  --organization-id org_abc123 \
  --path .

# JSON output
codika project create --name "My Project" --json

Output

✓ Project created
  Project ID: abc123
  Written:    ./email-automation/project.json

Exit codes

CodeMeaning
0Success
1API error (auth, network, server)
2CLI validation error (e.g., missing --name)