Skip to main content
adjar apply is the command that makes things real. It re-runs the diff computed by adjar plan, presents you with a final confirmation prompt, and then executes each change against the ad platform’s API in a safe, ordered sequence. When the API assigns new IDs to created resources, Adjar writes them back into your local TOML files automatically — keeping config and live account permanently in sync. Because every apply is a discrete, committable snapshot, rollback is as simple as git revert.
adjar apply modifies your live ad account. Always review the output of adjar plan before running apply.

Syntax

Flags

string
required
Path to the root TOML config file (e.g., config/google.toml). Adjar resolves all referenced subdirectory files relative to this root.
string
Path to the platform credentials JSON file (e.g. google.json). Alternatively set ADJAR_CREDENTIALS. See Authentication.
flag
Skip the interactive confirmation prompt and apply immediately. Use with care in automated scripts and CI pipelines — always ensure the plan output has been reviewed before passing this flag.
string
Execute a previously-reviewed plan file verbatim instead of computing a fresh diff. The plan file is rejected if your config has changed since it was generated.

The apply process

adjar apply follows a structured sequence to ensure changes are executed safely and your config stays accurate:
1

Re-compute the plan

Adjar fetches the current live account state and diffs it against your local config, exactly as adjar plan does. This ensures the plan reflects reality at the moment of apply, not at the moment you last ran plan. The identical plan output is printed.
2

Confirm

Adjar prompts Do you want to apply these changes? (yes/no): before making any API writes. Type yes to proceed. Pass --yes to skip this prompt in automated workflows.
3

Validate update and archive steps (Google Ads)

On Google Ads, before committing anything, Adjar validates each update/archive step server-side — confirming the targeted resources still exist and can be changed. If a validation fails, apply stops before any writes happen. (OpenAI Ads has no equivalent dry-run, so applies go straight to execution.)
4

Execute the steps

Adjar applies the steps in dependency order — parents before children (campaigns before ad groups, ad groups before their keywords and ads), with archives last, leaf-first. Each step is printed with a marker as it runs. If a step fails, Adjar halts and reports the error without rolling back already-completed steps.
5

Report completion

Adjar prints an # Apply complete summary with counts of what was created, updated, and archived. For every resource created during apply, Google Ads returns an assigned ID, which Adjar writes back into the relevant TOML files so your local config matches the live account exactly.

Example

adjar apply first prints the same plan that adjar plan produces (the fetch progress, headline, summary, and grouped changes), then prompts for confirmation. After you answer yes, it validates and applies the steps. The example below is from a Google Ads account; OpenAI Ads applies the same way over its own resource types:
The full workflow, from review to commit:

After apply: commit your config

After a successful apply, your TOML files will have been updated with any newly assigned IDs. Commit the entire config directory to keep your repository in sync:
Skipping this commit means your next adjar plan will detect the ID fields as local changes, which will cause noise in future diffs.

Rollback

Because Adjar encourages committing config after every apply, rollback is a standard Git operation. To undo the last apply:
This reverts the config to the previous commit and applies the inverse diff to your live account.

Apply is idempotent

Running adjar apply when your local config is already in sync with the live account is a safe no-op:
This makes it safe to include adjar apply in automated pipelines without guarding against accidental double-runs.

Next steps

  • Use adjar plan before every apply to review changes.
  • Re-run adjar import to reset local config to the live account state if your config and live account diverge unexpectedly.