Skip to content

bidsmith refresh

refresh pulls the live Google Ads account and writes its current state as fmt-canonical .bid files. It’s how you adopt bidsmith without rewriting your existing account by hand, and how you re-sync after somebody edits the UI directly.

Today’s refresh is bootstrap-mode — it writes a clean snapshot of the live account. The future “reconcile-mode” (update specific fields in an existing .bid without overwriting unrelated blocks) is on the roadmap.

Synopsis

Terminal window
bidsmith refresh [--output FILE | --dir DIR] [--include-removed] [--verbose]

Flags

FlagDescription
-o, --output FILEWrite everything to a single .bid file. Mutually exclusive with --dir.
-d, --dir DIRSplit the output: <DIR>/account.bid for account-scoped resources, <DIR>/campaigns.bid for everything campaign-scoped. Mutually exclusive with --output.
--include-removedInclude resources whose status is REMOVED. Default: drop them.
--verbosePrint the outgoing API request envelope and raw response.

If neither -o nor -d is given, output goes to stdout.

Environment variables

Same as bidsmith plan.

Exit codes

CodeMeaning
0Successful refresh.
1Authentication failure, API error, file write error, or other.

Examples

Terminal window
bidsmith refresh

Dumps the current state as a single block of .bid text. Useful for piping into another tool or eyeballing what’s there.

Write to one file

Terminal window
bidsmith refresh -o reality.bid

Single file with everything. Works well for small accounts.

Split into account- and campaign-scoped files

Terminal window
bidsmith refresh -d ads-bid/

Creates two files:

  • ads-bid/account.bid — the provider block, conversion actions, shared sets, call assets, customer assets.
  • ads-bid/campaigns.bid — campaigns, budgets, ad groups, ads, ad-group and campaign criteria.

This is the recommended pattern for accounts with more than a handful of campaigns.

Capture drift before fixing it

Terminal window
bidsmith refresh -o reality.bid
git diff reality.bid summer-2026.bid

git diff shows you exactly what’s different between the live account and your .bid files. The output of refresh is the same canonical form fmt produces, so the diff is meaningful and minimal.

What gets pulled

Every resource type bidsmith currently understands (see the Resource reference for the full list). Internally, refresh uses the same SearchStream queries plan does — so anything plan sees as live state, refresh can capture.

What doesn’t get pulled

  • Performance data — bidsmith manages configuration only.
  • Resources outside the supported schema — types not yet modeled in src/schema.rs are silently ignored. The roadmap tracks resource-type coverage.

See also