meta-ads-cli is an early independent open source command-line tool for the Meta Ads API, published before Meta later introduced its official Ads AI Connectors. Use it when you want a lightweight, self-managed CLI you can inspect, fork, and run inside your own workflow.
View on GitHubAttainment published this open source CLI in February 2026. Meta later introduced official Ads AI Connectors, including its own Ads CLI and hosted ads MCP endpoint.
You want Meta-hosted OAuth, first-party support, and the official connector experience.
View Meta Ads CLI docsYou want a lightweight, forkable, self-managed CLI with review-first defaults and no hosted control plane.
Read the playbookEverything you do in Meta Business Manager, done from the command line. Script it, automate it, integrate it into your existing workflows.
0
browser tabs needed
5
commands to manage your entire ad account
100%
scriptable for CI/CD and automation
Create campaigns, check status, pause, activate, and list. Each command maps directly to the Meta Ads API.
Example usage
$ meta-ads create --budget 500 --audience "dentists, US" \
--image ./hero.jpg --headline "AI Receptionist" \
--cta "Learn More" --link https://attainmentlabs.com
Campaign created (PAUSED): 120215553456789
$ meta-ads status 120215553456789
Status: PAUSED | Budget: $500/day | Reach: -- | Spend: $0
$ meta-ads activate 120215553456789
Campaign 120215553456789 is now ACTIVEmeta-ads create
Create a campaign with budget, audience, and creatives.
meta-ads status
Check campaign performance and metrics.
meta-ads pause
Pause a live campaign.
meta-ads activate
Go live with a paused campaign.
meta-ads list
List all campaigns in your ad account.
Both tools use the same Meta Ads API. The CLI is for terminal workflows. The MCP is for Claude Code users who want natural language.
meta-ads-cli (this tool)
Install
git clone https://github.com/attainmentlabs/meta-ads-cli cd meta-ads-cli pip install . # Set your Meta credentials export META_ACCESS_TOKEN="your-token" export META_AD_ACCOUNT_ID="your-account-id" export META_PAGE_ID="your-page-id" # You're ready meta-ads list
Need your Meta credentials? Read the setup guide
The free tool gets you started. The full version is scoped to your ad strategy, connected to your systems, and built by our team.