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

# ankra application

> Manage applications

## ankra application

Connect application source repositories to Ankra for analysis, packaging, and deployment.

## ankra application add

Add an application by reading a local Git checkout.

The command detects the GitHub repository from the selected remote, uses the
remote's default branch when available, and falls back to the current branch.
It selects an available GitHub credential automatically when the choice is
unambiguous.

Pass --registry-url to have the application publish to a container image
registry you already operate instead of the organisation's own Ankra registry
project. Declare it here rather than afterwards: the setup job generates the
build workflow from the declaration the application is created with, so a
registry added later leaves a workflow that logs in with the wrong one.

```bash theme={null}
ankra application add <path> [flags]
```

**Examples**

```bash theme={null}
ankra application add .
  ankra application add ./services/payments --name payments
  ankra application add . --credential github-acme --branch main
  ankra application add . --registry-url oci://artifact.example.com/commerce \
    --registry-credential example-harbor
```

**Flags**

| Flag                                | Default  | Description                                                                |
| ----------------------------------- | -------- | -------------------------------------------------------------------------- |
| `--branch`                          |          | Repository branch (auto-detected when omitted)                             |
| `--credential`                      |          | GitHub credential name or ID (auto-detected when omitted)                  |
| `--name`                            |          | Application name (defaults to the repository name)                         |
| `-o`, `--output`                    |          | Output format: json or yaml (default: human-readable)                      |
| `--registry-api-url`                |          | Registry management API base (defaults to https\://\<host>)                |
| `--registry-credential`             |          | Registry credential of this organisation that authenticates to it          |
| `--registry-manage-actions-secrets` | `false`  | Let Ankra write the named credential into the repository's Actions secrets |
| `--registry-password-secret`        |          | Repository Actions secret holding the registry password                    |
| `--registry-pull-secret`            |          | Name of the dockerconfigjson Secret generated manifests reference          |
| `--registry-url`                    |          | Registry project the application publishes to, as oci://\<host>/\<project> |
| `--registry-username-secret`        |          | Repository Actions secret the build workflow logs in with                  |
| `--remote`                          | `origin` | Git remote used to identify the GitHub repository                          |

## ankra application branch-files

List the tracked files on the setup branch

```bash theme={null}
ankra application branch-files <application-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application branches

List the application repository branches

```bash theme={null}
ankra application branches <application-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application chart-versions

List an application's published chart versions

```bash theme={null}
ankra application chart-versions <application-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application code-security

Show source code security findings

```bash theme={null}
ankra application code-security <application-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application container-security

Show container image vulnerability findings

```bash theme={null}
ankra application container-security <application-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application delete

Delete an application

```bash theme={null}
ankra application delete <application-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |
| `--yes`          | `false` | Skip the confirmation prompt                          |

## ankra application demo

Deploy, inspect, and stop short-lived demo workspaces for a branch or pull request of an application.

## ankra application demo build

Check whether a branch has a demo-ready container image

```bash theme={null}
ankra application demo build <application-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `--branch`       |         | Repository branch to inspect (required)               |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application demo config

Read or update the application's saved demo defaults

## ankra application demo config get

Show the saved demo defaults (env, database, migration command, extensions)

```bash theme={null}
ankra application demo config get <application-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application demo config set

Update the application's saved demo defaults. The command fetches the
current configuration first and applies only the flags you set: --env
entries override by name, everything else is carried forward.

```bash theme={null}
ankra application demo config set <application-id> [flags]
```

**Examples**

```bash theme={null}
ankra application demo config set <app-id> --database=true --env DATABASE_URL='${{ ankra.demo_database.url }}'
  ankra application demo config set <app-id> --migrate-command 'pnpm run db:migrate' --database-extension vector
```

**Flags**

| Flag                   | Default | Description                                                                                  |
| ---------------------- | ------- | -------------------------------------------------------------------------------------------- |
| `--database`           | `false` | Provision the throwaway per-demo Postgres                                                    |
| `--database-extension` | `[]`    | Postgres extension the demo database creates at initdb (repeatable; replaces the saved list) |
| `--env`                | `[]`    | Set an env entry as NAME=VALUE (repeatable; overrides by name)                               |
| `--migrate-command`    |         | Command that provisions a fresh demo database's schema (empty clears)                        |
| `-o`, `--output`       |         | Output format: json or yaml (default: human-readable)                                        |
| `--remove-env`         | `[]`    | Remove an env entry by name (repeatable)                                                     |

## ankra application demo deploy

Deploy a short-lived demo workspace for a branch or pull request.

All flags are optional; only the flags you set are sent, so the backend
applies its own defaults for the rest.

A monorepo demo runs every recorded component as its own pod by default.
\--component narrows that to the components you name, and the per-component
override flags (--component-tag, --component-port, --component-path) tune
one component each. Because selection and overrides ride the same request
field, an override may only name a component that --component selects: to
tune one component of a full launch, list them all.

```bash theme={null}
ankra application demo deploy <application-id> [flags]
```

**Examples**

```bash theme={null}
ankra application demo deploy <app-id> --branch feature/login
  ankra application demo deploy <app-id> --pr-number 42 --ttl-hours 8
  ankra application demo deploy <app-id> --branch main \
    --component crm-frontend --component crm-api \
    --component-port crm-api=8090 --component-path crm-api=/api \
    --entry-component crm-frontend
```

**Flags**

| Flag                | Default | Description                                                                                                 |
| ------------------- | ------- | ----------------------------------------------------------------------------------------------------------- |
| `--branch`          |         | Repository branch to deploy                                                                                 |
| `--component`       | `[]`    | Component of a monorepo to deploy (repeatable; omitted deploys every component)                             |
| `--component-path`  | `[]`    | Ingress path prefix for one selected component as NAME=/prefix (repeatable; empty keeps it in-cluster only) |
| `--component-port`  | `[]`    | Container port for one selected component as NAME=PORT (repeatable)                                         |
| `--component-tag`   | `[]`    | Image tag for one selected component as NAME=TAG (repeatable)                                               |
| `--container-port`  | `0`     | Container port to expose                                                                                    |
| `--entry-component` |         | Component that owns the demo host's root path (default: the backend's entry heuristic)                      |
| `--image-tag`       |         | Explicit container image tag to deploy                                                                      |
| `-o`, `--output`    |         | Output format: json or yaml (default: human-readable)                                                       |
| `--pr-number`       | `0`     | Pull request number to deploy                                                                               |
| `--ttl-hours`       | `0`     | Lifetime of the demo workspace in hours                                                                     |

## ankra application demo detail

Show a demo workspace's record, its components, provisioning steps, and
failure detail. The default rendering summarises the demo; -o json or
-o yaml emit the full payload, including the resource inventory and the
Kubernetes events behind a stalled step.

```bash theme={null}
ankra application demo detail <application-id> <workspace-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application demo fix

Dispatch the AI pre-setup mission for a failed demo

```bash theme={null}
ankra application demo fix <application-id> <workspace-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application demo list

List the application's active demo workspaces, one row each, with the
components every demo runs. -o json or -o yaml emit the full payload,
including the TTL policy and the staging cluster's status.

```bash theme={null}
ankra application demo list <application-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application demo logs

Fetch a bounded tail of the demo container's logs. One-shot: the command
returns after the fetch instead of following the stream.

A multi-component demo runs one pod per component, and without a selector
the backend reads whichever pod it finds first. --component picks the pod
belonging to that component; --pod addresses one by name (from
`ankra application demo detail`) when a component has more than one.

```bash theme={null}
ankra application demo logs <application-id> <workspace-id> [flags]
```

**Examples**

```bash theme={null}
ankra application demo logs <app-id> <workspace-id> --tail 500
  ankra application demo logs <app-id> <workspace-id> --component crm-api
```

**Flags**

| Flag             | Default | Description                                                        |
| ---------------- | ------- | ------------------------------------------------------------------ |
| `--component`    |         | Read the pod belonging to this component of a multi-component demo |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable)              |
| `--pod`          |         | Read this pod by name (default: the demo's own pod)                |
| `--tail`         | `200`   | Number of log lines from the end                                   |

## ankra application demo stop

Stop and tear down a demo workspace

```bash theme={null}
ankra application demo stop <application-id> <workspace-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application deploy

Deploy a packaged application to a target cluster.

The cluster is identified by ID. Use --set key=value (repeatable) to pass
deploy inputs declared by the application's chart.

```bash theme={null}
ankra application deploy <application-id> [flags]
```

**Examples**

```bash theme={null}
ankra application deploy <app-id> --cluster <cluster-id>
  ankra application deploy <app-id> --cluster <cluster-id> --namespace prod --set replicas=3
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `--cluster`      |         | Target cluster ID (required)                          |
| `--mode`         |         | Deploy mode: quick or high\_availability              |
| `--namespace`    |         | Target namespace (defaults to the platform default)   |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |
| `--set`          | `[]`    | Deploy input as key=value (repeatable)                |

## ankra application deployments

List an application's cluster deployments

```bash theme={null}
ankra application deployments <application-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application files

Commit changes to the application's setup pull request.

Each --file maps a repository path to a local file whose contents are
uploaded. Use --delete to remove a tracked path.

```bash theme={null}
ankra application files <application-id> [flags]
```

**Examples**

```bash theme={null}
ankra application files <app-id> --file Dockerfile=./Dockerfile --message "Update image"
  ankra application files <app-id> --delete .ankra/manifests/app.yaml
```

**Flags**

| Flag             | Default | Description                                                            |
| ---------------- | ------- | ---------------------------------------------------------------------- |
| `--delete`       | `[]`    | Repository path to delete (repeatable)                                 |
| `--file`         | `[]`    | Repository path mapped to a local file as path=local-file (repeatable) |
| `--message`      |         | Commit message                                                         |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable)                  |

## ankra application get

Show an application's detail

```bash theme={null}
ankra application get <application-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application installations

List an application's installation intents

```bash theme={null}
ankra application installations <application-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application jobs

List an application's platform jobs

```bash theme={null}
ankra application jobs <application-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |
| `--page`         | `0`     | Page number (1-based)                                 |
| `--page-size`    | `0`     | Page size (1-100)                                     |

## ankra application list

List applications

```bash theme={null}
ankra application list [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |
| `--page`         | `0`     | Page number (1-based)                                 |
| `--page-size`    | `0`     | Page size (1-100)                                     |
| `--search`       |         | Filter applications by name                           |

## ankra application platform

Detect platform operators already present on a target cluster

```bash theme={null}
ankra application platform <application-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `--cluster`      |         | Target cluster ID (required)                          |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application publish-readiness

Report whether the repository can publish to the private Ankra registry

```bash theme={null}
ankra application publish-readiness <application-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application pull-request-reviews

Show the AI reviews of the application's pull requests

```bash theme={null}
ankra application pull-request-reviews <application-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `--limit`        | `0`     | Maximum number of reviews (1-20)                      |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application reconcile

Request an application refresh

```bash theme={null}
ankra application reconcile <application-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application registry

Inspect and set the container image registry an application publishes to.

An application with no declaration publishes into the organisation's own Ankra
registry project. Declare a registry you already operate to have Ankra read
image tags, verify builds, and pull demo images from there instead.

## ankra application registry clear

Return an application to the organisation's own Ankra registry.

Clears the declaration, so the application publishes into - and is read back
from - the organisation's provisioned registry project again.

```bash theme={null}
ankra application registry clear <application-id> [flags]
```

**Examples**

```bash theme={null}
ankra application registry clear 23298741-6a5a-401a-a681-66f31fbdebe1
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |
| `--yes`          | `false` | Skip the confirmation prompt                          |

## ankra application registry get

Show the image registry an application publishes to.

Reports the stored declaration, whether it is one at all, the host and project
it resolves to, and the image repository each component is expected to publish
to - so you can compare them against where your builds actually push.

```bash theme={null}
ankra application registry get <application-id> [flags]
```

**Examples**

```bash theme={null}
ankra application registry get 23298741-6a5a-401a-a681-66f31fbdebe1
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application registry set

Point an application at a container image registry you operate.

\--url is the registry project, as oci://\<host>/\<project> (the scheme is
optional). --credential names an existing registry credential of this
organisation; without one Ankra can describe where the images live but cannot
read or pull them, so builds keep reporting as never published.

Ankra never mints robots for a registry it does not administer, so it will not
write your repository's Actions secrets unless you ask it to with
\--manage-actions-secrets.

```bash theme={null}
ankra application registry set <application-id> [flags]
```

**Examples**

```bash theme={null}
ankra application registry set 23298741-6a5a-401a-a681-66f31fbdebe1 \
    --url oci://artifact.example.com/commerce --credential example-harbor

  ankra application registry set <application-id> \
    --url artifact.example.com/commerce --credential example-harbor \
    --username-secret HARBOR_USERNAME --password-secret HARBOR_PASSWORD
```

**Flags**

| Flag                       | Default | Description                                                                |
| -------------------------- | ------- | -------------------------------------------------------------------------- |
| `--api-url`                |         | Registry management API base (defaults to https\://\<host>)                |
| `--credential`             |         | Registry credential of this organisation that authenticates to it          |
| `--manage-actions-secrets` | `false` | Let Ankra write the named credential into the repository's Actions secrets |
| `-o`, `--output`           |         | Output format: json or yaml (default: human-readable)                      |
| `--password-secret`        |         | Repository Actions secret holding the registry password                    |
| `--pull-secret`            |         | Name of the dockerconfigjson Secret generated manifests reference          |
| `--url`                    |         | Registry project as oci://\<host>/\<project> (required)                    |
| `--username-secret`        |         | Repository Actions secret the build workflow logs in with                  |

## ankra application rerun-workflow

Re-trigger a failed workflow run

```bash theme={null}
ankra application rerun-workflow <application-id> <run-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application retry

Re-trigger a failed application's setup

```bash theme={null}
ankra application retry <application-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application upgrade-workflow

Add security scanning steps to the build workflow

```bash theme={null}
ankra application upgrade-workflow <application-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application workflow-run-jobs

List the jobs of a workflow run

```bash theme={null}
ankra application workflow-run-jobs <application-id> <run-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |

## ankra application workflow-runs

List the application's GitHub Actions workflow runs

```bash theme={null}
ankra application workflow-runs <application-id> [flags]
```

**Flags**

| Flag             | Default | Description                                           |
| ---------------- | ------- | ----------------------------------------------------- |
| `-o`, `--output` |         | Output format: json or yaml (default: human-readable) |
| `--page`         | `0`     | Page number (1-based)                                 |
| `--page-size`    | `0`     | Page size (1-50)                                      |
| `--status`       |         | Filter by GitHub run status                           |
