Manage Meta ad campaigns from your terminal.
meta-ads-cli is a standalone command-line tool for the Meta Ads API. No AI, no Claude, no MCP. Just terminal commands for creating, managing, and monitoring Facebook and Instagram ad campaigns. For teams that prefer a CLI workflow.
View on GitHubSame API. No browser required.
Everything 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
5 commands. Full campaign lifecycle.
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 ACTIVE5 commands included
meta-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.
CLI or MCP? Pick your workflow.
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)
- Terminal commands, no AI required
- Scriptable for automation and CI/CD
- Direct API access, full control
- Familiar CLI workflow for developers
- git clone to install
- Natural language via Claude Code
- Claude handles API complexity
- dry_run mode for safe testing
- Best for non-technical marketers
- uvx install, auto-configured
Get started in 60 seconds.
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
Want this deployed for your business?
The free tool gets you started. The full version is scoped to your ad strategy, connected to your systems, and built by our team.