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

# Status

> Check identity, use case context detection, profile match status, and deployment readiness

## When to use

* Quick health check before deploying
* Verify you're authenticated to the right organization
* Check if a use case folder is ready to deploy
* Diagnose profile mismatches between your active profile and the project's org

## Prerequisites

* `codika` CLI installed (authentication is checked but not required)

## Command

```bash theme={null}
codika status [path] [options]
```

## Arguments

| Argument | Description                                   |
| -------- | --------------------------------------------- |
| `[path]` | Path to check (defaults to current directory) |

## Options

| Option                  | Description                                           |
| ----------------------- | ----------------------------------------------------- |
| `--json`                | Output as JSON                                        |
| `--project-file <path>` | Path to custom project file (default: `project.json`) |
| `--verify`              | Run quick validation on the detected use case         |

## Output sections

### Identity

Shows the current authenticated state:

```
Identity:
  Status:       Logged in
  Organization: Acme Corp
  Profile:      acme-corp
  Key:          cko_abc...xyz
```

### Use case context

If a use case folder is detected at the path:

```
Use Case:
  Detected:     ✓
  Title:        Email Automation
  Version:      1.2.3
  Workflows:    3
  Project ID:   abc123
  Profile:      ✓ match (acme-corp)
```

### Profile match status

| Status              | Meaning                                                           |
| ------------------- | ----------------------------------------------------------------- |
| `match`             | Active profile's org matches `project.json` org — ready to deploy |
| `mismatch`          | Different org — shows suggested profile to switch to              |
| `no-org-in-project` | No `organizationId` in `project.json`                             |
| `no-profile`        | Not logged in                                                     |

### Readiness

Shows whether the use case is ready to deploy:

```
Readiness:
  ✓ Ready to deploy
```

Or with issues:

```
Readiness:
  ✗ Not ready to deploy
    - No project.json found
    - Profile org does not match project org (try: codika use staging)
```

### Warnings

* **Profile mismatch**: "Active profile 'acme-corp' does not match project org. Suggested: 'staging'"
* **Key expiry \< 7 days**: "API key expires in 3 days"
* **Key expired**: "API key has expired"

## Examples

```bash theme={null}
# Check status in current directory
codika status

# Check a specific directory
codika status ./email-automation

# Check with validation
codika status ./email-automation --verify

# Machine-readable output
codika status --json
```

## Exit codes

| Code | Meaning                  |
| ---- | ------------------------ |
| `0`  | Ready to deploy          |
| `1`  | Not ready (issues found) |
