---
title: "Extbase on the command line"
manual: "TYPO3 Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3coreapi:extbase-no-frontend-command@main"
source: "ExtensionArchitecture/Extbase/NoFrontendContext/Command.rst"
rendered: "2026-09-26T10:15:30+00:00"
---

# Extbase on the command line {#extbase-no-frontend-command}

> [!NOTE]
> This page is a work in progress. Content will be added as part of the
> Extbase documentation overhaul.

Commands are how an extension does work on a schedule or on demand: importing
data, sending notifications, rebuilding derived records, cleaning up. Reusing
the domain models and repositories an extension already has keeps that work
expressed in the same terms as the rest of the extension.

The essentials:

-   A command runs without any request. None of the frontend TypoScript
    configuration Extbase normally reads has been built, and there is no site
    and no language.
-   The persistence layer is explicitly allowed to run without a request, so
    repositories can be used. Without configuration, though, Extbase has no
    storagePid to work with and queries fall back to searching page `0`
    alone. Ordinary records are stored on real pages, so a command typically
    finds nothing without explicit configuration.
-   The `recursive` setting that expands a storagePid down the page
    tree is applied while the configuration is resolved, which does not happen
    here. Setting a storagePid on the query settings therefore selects exactly
    the pages named, with no descendants. Expanding storagePids therefore is an
    explicit step as well. See [Overriding the storagePid for a single
    query](https://docs.typo3.org/permalink/t3coreapi:extbase-persistence-storagepid-override@main).
-   The rest of Extbase has a hard dependency on the request. Controllers,
    views and everything resolving `plugin.tx_<extension>`
    configuration cannot be used, and attempting it fails rather than
    degrading.
-   The language is not established either, and has to be chosen explicitly.
    See [Setting the language explicitly](https://docs.typo3.org/permalink/t3coreapi:extbase-localisation-no-frontend-explicit@main).
-   Where a command only needs to read or write database rows, the
    [database API](https://docs.typo3.org/permalink/t3coreapi:database@main) does that without Extbase, and without
    anything to establish first.

> [!NOTE]
> **See also**
>
> [Symfony commands in TYPO3](https://docs.typo3.org/permalink/t3coreapi:symfony-console-commands@main) for writing and
> registering the command itself.
