runCrashReportCli function
CLI adapter for fdb crash-report.
Output contract:
CRASH_REPORT_FOUND ENTRIES=N (success — header line)
--- (separator before each entry)
LABEL=iOS sim (per-entry label)
FILE=/path/to/crash.ips (per-entry file, if available)
(raw log text) (per-entry raw content)
CRASH_REPORT_NONE (no records found)
ERROR: --app-id is required ... (missing app id)
ERROR: tool not found. hint (missing tool)
ERROR: message (generic)
Implementation
Future<int> runCrashReportCli(List<String> args) => runCliAdapter(
ArgParser()
..addOption(
'app-id',
help: 'App bundle id (iOS/macOS) or package name (Android). '
'Auto-detected from .fdb/app_id.txt if omitted.',
)
..addOption(
'last',
defaultsTo: '1h',
help: 'Time window to search (e.g. 30s, 5m, 1h). Default: 1h',
)
..addFlag(
'all',
negatable: false,
help: 'Return all crash records (no time limit), not just the latest.',
),
args,
_execute,
);