Files
breadcrumb-the-shire/docs/reference-cli-commands.md
fs 545bcc789b docs: replace ASCII umlaut fallbacks with proper äöüß across all .md
Most German docs were written with `ue`/`ae`/`oe`/`ss` ASCII fallbacks
(`fuer`, `aenderung`, `koennen`, `gemaess`) — relic from older toolchain
constraints. Replaced 237 occurrences across 38 .md files with proper
umlauts and ß so the docs read naturally.

Substitutions are constrained to plain prose: fenced code blocks
(```...```), inline code spans (`...`), markdown link targets `[..](..)`,
and HTML comments are preserved verbatim. Path references like
`docs/howto-erste-aenderung.md` keep their original (umlaut-replaced)
filenames — only the surrounding prose is normalised.

Tool: bin/fix-md-umlauts.py (idempotent — no-op on already-clean files).
Re-runnable if ASCII fallbacks creep back in via copy-paste.

Doc-link-check + doc-drift-check stay green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 09:57:22 +02:00

5.4 KiB

CLI-Kommandoreferenz

Letzte Aktualisierung: 2026-04-01

Einstiegspunkt

Alle CLI-Kommandos laufen über einen einzigen Einstiegspunkt:

php bin/console <command> [argumente] [optionen]

Übersicht aller verfügbaren Kommandos:

php bin/console list

Hilfe zu einem einzelnen Kommando:

php bin/console <command> --help

Kommandos

module:sync

Fuehrt den vollstaendigen Runtime-Sync aus: db-migratemigratepermissions-syncbuildassets-sync.

docker compose exec php php bin/console module:sync

Nötig nach jeder Änderung an Modulen, Manifesten, Routen oder APP_ENABLED_MODULES — und nach jedem git pull, der Schema-Updates unter db/updates/*.sql mitbringt.

Falls web/index.php den Fehler "Module runtime is stale" wirft, ist dieser Befehl die Lösung.

Maschinenlesbar:

docker compose exec php php bin/console module:sync --format=json

db:migrate

Wendet idempotente Core-Schema-Updates aus db/updates/*.sql an. Angewendete Files werden in der Tabelle core_migrations getrackt; jeder Lauf wendet nur neu hinzugekommene Files an.

Jede db/updates/*.sql MUSS idempotent sein (CREATE TABLE IF NOT EXISTS, INSERT … ON DUPLICATE KEY UPDATE, etc.) — Erstlauf gegen ein bereits bestehendes Schema ist damit ein No-op.

docker compose exec php php bin/console db:migrate

module:sync ruft den Befehl als ersten Schritt automatisch auf. Direktaufruf nützlich, wenn nur DB-Updates gewuenscht sind ohne Module-Build.

Status-Anzeige (kein Schreibzugriff):

docker compose exec php php bin/console db:migrate --status

Listet applied: und pending: separat — nützlich beim Debugging veralteter Schemata.

module:migrate

Wendet ausstehende SQL-Migrationen aus aktiven Modulen an.

docker compose exec php php bin/console module:migrate

module:permissions-sync

Synchronisiert Modul-Permissions in die DB. Deaktiviert verwaiste System-Permissions (is_system=1), die kein aktives Modul mehr beansprucht.

docker compose exec php php bin/console module:permissions-sync

module:build

Baut die Runtime-Seitenstruktur (storage/runtime/pages/) mit Symlinks zu Modul-Pages.

docker compose exec php php bin/console module:build

module:assets-sync

Publiziert Modul-Assets nach web/modules/<id>/.

docker compose exec php php bin/console module:assets-sync

module:deactivate

Fuehrt den optionalen Deactivation-Handler eines Moduls aus.

docker compose exec php php bin/console module:deactivate <module-id> --confirm
docker compose exec php php bin/console module:deactivate <module-id> --dry-run

Das Modul muss nicht in der Aktivliste stehen. --dry-run validiert den Handler ohne Ausführung.

scheduler:run

Fuehrt faellige Scheduler-Jobs aus.

docker compose exec php php bin/console scheduler:run

Der Docker-Scheduler-Service ruft dieses Kommando automatisch alle 60 Sekunden auf.

module:validate

Validiert Manifest, Klassen und Struktur eines Moduls. Prüft JSON-Schema-Compliance des module.php, Namespace-Konventionen, Interface-Implementierungen, Permission-Key-Formate und Verzeichnisstruktur.

docker compose exec php php bin/console module:validate <module-id>
docker compose exec php php bin/console module:validate --all

--all validiert alle Module auf Disk (modules/*/module.php) auf einmal.

make:module

Erzeugt die vollstaendige Verzeichnisstruktur für ein neues Modul inkl. Manifest, ContainerRegistrar-Stub, AuthorizationPolicy-Stub und leeren Verzeichnissen.

docker compose exec php php bin/console make:module <module-id>

Argument module-id muss dem Pattern [a-z][a-z0-9-]* entsprechen.

doctor

Fuehrt System-Gesundheitschecks aus (ENV, DB, RBAC, Scheduler-Heartbeat).

docker compose exec php php bin/console doctor

Siehe /docs/howto-betriebscheck-doctor.md für Details.

Maschinenlesbar:

docker compose exec php php bin/console doctor --format=json

Developer-Orchestrator (bin/dev)

Fuer lokalen Workflow gibt es zusaetzlich den Dev-Orchestrator:

bin/dev init
bin/dev up
bin/dev down
bin/dev logs [service]
bin/dev console module:sync
bin/dev qa
bin/dev qa-required
bin/dev qa-extended

bin/dev console ... delegiert intern auf docker compose exec -T php php bin/console .... bin/dev qa ist ein Alias für bin/dev qa-required.

Neue Kommandos anlegen

  1. Klasse in core/Console/Commands/ erstellen, die MintyPHP\Console\Command erweitert.
  2. name(), description() und execute() implementieren.
  3. Optional: usage() für --help-Ausgabe überschreiben.

Das Kommando wird automatisch erkannt — kein manuelles Registrieren nötig.

Beispiel:

namespace MintyPHP\Console\Commands\Make;

use MintyPHP\Console\Command;

final class ModuleCommand extends Command
{
    public function name(): string { return 'make:module'; }
    public function description(): string { return 'Scaffold a new module'; }

    public function execute(array $args, array $options): int
    {
        // ...
        return 0;
    }
}

Bootstrap-Helfer

Die Command-Basisklasse stellt Helfer bereit:

Methode Zweck
$this->bootstrapApp($channel) App-Bootstrap für Nicht-Modul-Kommandos
$this->projectRoot() Gibt den absoluten Projekt-Root-Pfad zurueck