> ## Documentation Index
> Fetch the complete documentation index at: https://doc.codika.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Project

> Create a new project on the Codika platform and link it to a use case folder via project.json for org-aware deployment

## 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

```bash theme={null}
codika project create [options]
```

## Options

| Option                        | Required        | Description                                      | Default          |
| ----------------------------- | --------------- | ------------------------------------------------ | ---------------- |
| `--name <name>`               | Yes             | Project display name                             | —                |
| `--description <description>` | No              | Project description                              | —                |
| `--template-id <id>`          | No              | Template ID for project setup                    | Platform default |
| `--organization-id <id>`      | Admin keys only | Specify target organization                      | —                |
| `--path <dir>`                | Recommended     | Write `project.json` to this directory           | —                |
| `--project-file <path>`       | No              | Custom filename for project file                 | `project.json`   |
| `--api-url <url>`             | No              | Override API URL                                 | —                |
| `--api-key <key>`             | No              | Override API key                                 | —                |
| `--profile <name>`            | No              | Use a specific profile instead of the active one | —                |
| `--json`                      | No              | JSON 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`

## Recommended usage

Always use `--path .` when creating a project for a use case folder:

```bash theme={null}
cd my-use-case
codika project create --name "My Automation" --path .
```

This writes `project.json`:

```json theme={null}
{
  "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

```bash theme={null}
# 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

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