Inspect and verify
How gform learns a live Google Form and whether your local YAML still matches it.
Related: commands/inspect · commands/verify · schema · limitations
Inspect — what it fetches
gform inspect <form>
gform insp <form>
gform inspect 'https://docs.google.com/forms/d/e/…/viewform'
gform inspect <form> --json
gform inspect <form> --auth # or --profile <name>Reads public HTML / FB_PUBLIC_LOAD_DATA_ through the shared FormModel pipe (same pipe as init / run preflight):
| Captured | Notes |
|---|---|
| Title, questions, types | Including rating, title-only, grids as row radios |
| Options, required | Exact labels matter for YAML matching |
| File-upload presence | Often needs --auth to hydrate fully |
| collectEmail / mode | Verified Google email vs typed |
| Closed / login / already-responded | Risk flags |
| Invisible captcha attribute | When present in the page |
| Branches / go-to-section | Metadata; fill still follows your next steps |
Does not invent “limit to one response” from opaque internals. Org restriction usually surfaces as a login wall.
Public vs authenticated
| Mode | When |
|---|---|
| Default | Public fetch — enough for many open forms |
--auth / --profile | Login-gated or file-upload forms; uses a saved session |
gform run inspects before fill unless --skip-inspect / -si.
Risk flags (examples)
Inspect and list --policy surface flags such as:
login— sign-in or permission wallclosed— not accepting responsesalready/ already-respondedcaptcha/ invisible captchafile-upload- collect-email
Exact presentation depends on command and --json. Treat flags as warnings for planning, not a guarantee the run will succeed.
Verify — local contract
gform verify <form>
gform ver <form>
gform verify # entire global libraryRuns the same Zod schema as edit --ask Save and run load:
- required fields, discriminated
actions - unknown keys rejected
variantMode: zipwith unequal pool lengths fails here (and on run)- file
accept/maxBytesgates when data is local; Drive bytes are not downloaded offline
Verify --check — live sync
gform verify <form> --check
gform verify <form> --check --yes # apply without confirm
gform verify <form> --check --auth # file-upload / gated formsRe-inspects the live form and proposes safe YAML updates:
| Change kind | Meaning |
|---|---|
accept | Widen YAML accept categories from live hints |
maxBytes / maxFiles | Fill from hydrated live limits (per-file) |
add-step | Stub for a new question |
| orphan | Step left in YAML that no longer matches — review |
In sync means the local contract matches what this check considers safe/current for structure and accept hints — not that every answer will submit, that Google will never throttle, or that file content was downloaded.
--auth / --profile / --yes only work with --check. Offline verify never hits the network.
What verification does not guarantee
- Successful submit under headless
- CAPTCHA absence tomorrow
- Identical DOM selectors forever
- That
gdrive/ remote URLs still resolve - Authorization or form-owner permission
For runtime diagnosis, use artifacts and limitations.
Suggested loop
gform inspect <form>
gform edit <form> --ask
gform verify <form>
gform verify <form> --check
gform run <form> --policy demo