ay get (Alias: g)
Liest Datensätze aus einer Collection mit Feld-Selektion und Paginierung. Im Gegensatz zu list ist get für Field-Projection und tabellarische Ausgabe optimiert.
Syntax
ay get <collectionOrModule> [collection] [flags]
Erstes Argument ist entweder die Collection (z.B. consumers) oder das Modul (z.B. crm); im zweiten Fall folgt die Collection als zweites Argument.
Flags
| Flag | Default | Zweck |
|---|---|---|
-p, --page <n> |
1 | Seite |
-l, --limit <n> |
20 | Einträge pro Seite |
-f, --from <date> |
— | Ab-Datum (ISO 8601 oder 2026-04-01) |
-i, --fields <fields...> |
alle | Whitelist von Feldern (Projection) |
Beispiele
# Standard-Felder einer Collection
ay get contacts
# Explizites Modul
ay get crm consumers
# Nur ausgewählte Felder, Seite 3
ay get products -i name price stock -p 3 -l 10
# Als CSV speichern
ay get orders -i _id total status createdAt -r csv --save