---
title: "CLI commands"
manual: "Ai3 Core"
version: "main"
permalink: "https://docs.typo3.org/permalink/wegewerk/ai3_core:usage-cli@main"
source: "Usage/CliCommands.rst"
rendered: "2026-10-23T16:30:49+00:00"
---

# CLI commands {#usage-cli}

Ai3 Core ships two Symfony console commands registered with
TYPO3's CLI dispatcher.

## ai3_core:credits {#usage-cli-credits}

Queries the Zak_ai credits endpoint and dumps the raw response.

**Query available credits**

```bash
vendor/bin/typo3 ai3_core:credits
```

**Output:** A `var_dump()` of the decoded JSON response from
`GET /credits`. Useful for verifying that `ZAKAI_API_KEY` is set
correctly and the API is reachable.

## ai3_core:process_tasks {#usage-cli-process-tasks}

Fetches up to 100 pending `GenerationTask` records (ordered by UID
ascending) and processes each one by calling the registered capability
endpoint.

**Process all pending generation tasks**

```bash
vendor/bin/typo3 ai3_core:process_tasks
```

**Processing logic per task:**

1.  Look up the capability identified by `task.capability` in the
    [CapabilityRegistry](https://docs.typo3.org/permalink/wegewerk/ai3_core:developer-capability-registry@main).
1.  Call `capability->endpoint->generate(['image' => image, 'caption' => prompt, 'language' => language])`.
1.  If a result is returned, set `task.result`, mark the task as
    *Done*, and store `task.generated_timestamp`.
1.  Persist all changes.

> [!TIP]
> Run this command periodically via a TYPO3 scheduler task or a
> system cron job to keep the task queue drained.
