meta
Meta Marketing CLI for Graph API automation, managing ad campaigns, insights reporting, and Instagram publishing with fail-closed security.
Introduction
The Meta Marketing CLI provides a robust command-line interface for interacting with the Meta Graph API. Designed for developers and marketing automation engineers, this skill streamlines complex workflows involving ad account management, campaign orchestration, and Instagram content scheduling. It is built to ensure high operational reliability by employing a fail-closed strategy, which halts execution immediately if required inputs are missing or if API requests encounter errors. This prevents accidental budget leakage or misconfigurations in live Meta environments.
-
Full lifecycle management for Meta ads, including creating, reading, updating, and auditing campaigns, ad sets, and individual ads.
-
Automated insights reporting with support for various aggregation levels, metrics, and date presets, outputting in machine-readable JSONL or table formats for downstream data analysis.
-
Instagram publishing capabilities, enabling developers to push media directly to feed with unique idempotency keys to prevent duplicate posting.
-
Schema-driven validation processes to ensure that all payload fields and parameter structures conform to Meta's current API specifications before submission.
-
Human-in-the-loop authentication bootstrapping, handling OAuth flows via configurable HTTPS callback endpoints for secure access token exchange.
-
Users must initialize authentication via the
meta auth setupcommand, ensuring the redirect URI matches the AI host callback exactly to finalize the token exchange. -
Always run
meta schema syncbefore performing mutation operations to ensure local definitions match the current Meta Graph API version. -
All budget-related operations require explicit confirmation flags to prevent unauthorized financial exposure.
-
Use machine-readable flags (
--output jsonor--format jsonl) when integrating with other scripts to maximize automation efficiency. -
Sensitive information like
APP_SECRETand access tokens are automatically redacted in command logs and outputs for enhanced security. -
Prioritize the use of dry-run modes (
--dry-run) when testing campaign creation or budget adjustments to verify logic without impacting live ad performance.
Repository Stats
- Stars
- 4,441
- Forks
- 1,205
- Open Issues
- 7
- Language
- Python
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- Apr 29, 2026, 02:42 PM