Skip to content

gplay compliance datasafety validate

Structurally check the canonical Data Safety CSV (--file, default ./compliance/data-safety.csv) without contacting Google Play: it verifies the file is non-empty, valid UTF-8 (a leading byte-order mark is stripped), parses as a well-formed, rectangular CSV, and has a header row. A header that diverges from gplay's bundled reference template is reported as a NON-FATAL hint (Google's template evolves), never a failure.

This command is OFFLINE — it needs no credentials and makes no network call, so it is safe in a pre-commit hook or a CI gate. It is also STRUCTURAL ONLY: gplay cannot read your live Data Safety declaration back (the API is write-only), so a CSV that passes here can still be rejected by Google. "Valid" means "well-formed", NOT "Google will accept it" — only the live gplay compliance datasafety set POST arbitrates that.

Any structural failure exits 20.

gplay compliance datasafety validate [flags]
FlagDescription
--file stringpath to the canonical Data Safety CSV to validate (default "./compliance/data-safety.csv")
--output stringoutput format: table, json, or markdown (default: auto — table on TTY, json in pipes/CI)
FlagDescription
--account stringname of a stored Account to use (overrides env and active Account)
--retry intretry transient failures (transport errors, 5xx, 429) up to N times with exponential backoff (default: 0, no retry)
--service-account stringpath to a service-account JSON, or inline JSON content (overrides --account, env, and active Account)
--timeout durationper-request API timeout, e.g. 30s or 2m (default: 60s for control-plane calls, none for uploads)
-v, --verboselog flow steps to stderr (info level)