
|
Getting your Trinity Audio player ready...
|
Meta just changed how marketers interact with ad campaigns. On April 29, 2026, the company launched “Meta Ads AI Connectors” in open beta, and the centerpiece is a Meta Ads CLI that lets you create, edit, and manage Facebook and Instagram ad campaigns directly from the command line.
No more clicking through Business Manager. No more complex API setup. If you can type commands in a terminal, you can now run your Meta ad campaigns from it.
Here’s what this means for you, how the Meta Ads CLI works, and how to pair it with Simplified to build a fully automated marketing pipeline from your terminal.
What Is the Meta Ads CLI?
The Meta Ads CLI is a command-line interface from Meta that lets you create, edit, and manage Facebook and Instagram ad campaigns directly from your terminal. It launched as part of Meta Ads AI Connectors, a suite of developer-facing tools that opens the Meta advertising ecosystem to third-party AI, as reported by The Verge. The release includes two main pieces:
- Meta Ads CLI: A command-line interface that runs locally on your machine and talks directly to the Meta Ads API
- MCP Server: A protocol server that lets AI coding assistants like Claude Code and Codex interact with your Meta Ads account programmatically (we cover this in depth in our guide to Meta Ads MCP for AI-powered ad management)
This matters because it removes one of the biggest friction points in paid advertising: the Ads Manager UI. For anyone managing multiple campaigns, the ability to script and automate ad operations from the command line is a significant time saver.
Who the Meta Ads CLI Is Built For
Not everyone needs to manage Facebook ads from a terminal. But for three specific groups, this changes everything.
Developers and Technical Marketers
If you’re already comfortable in a terminal, the Meta Ads CLI fits naturally into your workflow. You can write shell scripts that create campaigns, adjust budgets based on performance thresholds, and pull daily reports without opening a browser. Previously, this required setting up the full Meta Marketing API with OAuth tokens, app reviews, and custom code. The CLI handles authentication through Meta’s standard auth flow. No complex API setup required.
AI-Native Marketers Using Coding Tools
This is where things get interesting. The Meta Ads CLI works with AI coding assistants like Claude Code and Codex. That means you can describe what you want in plain English, and the AI translates it into CLI commands. “Create a conversion campaign targeting women 25-44 in the US with a $50 daily budget” becomes an actual campaign in your account. You can build AI agents that operate within your Meta Ads account, monitoring performance, making optimization decisions, and executing changes automatically with human-in-the-loop approvals.
Automation Scripts and Workflow Builders
For teams running large-scale ad operations, the CLI is a gateway to full automation. Build scripts that pause underperforming ads at midnight, scale budgets on top performers every morning, and email you a summary report. Connect it to cron jobs, CI/CD pipelines, or no-code workflow automation tools to create hands-off ad management systems. If you’re managing ads alongside organic social content, pairing the CLI with a social media scheduler keeps everything running from one workflow.
Getting Started With Meta Ads CLI
Setting up the Meta Ads CLI is straightforward. Here’s what you need.
Prerequisites
- A Meta Business account with an active ad account
- A terminal (macOS Terminal, Windows PowerShell, or any Linux shell)
- Node.js installed (for the CLI runtime)
- Your Meta ad account ID (found in Business Settings)
Installation
Install the Meta Ads CLI globally using npm:
npm install -g @meta/ads-cli
Authentication
Run the auth command to connect your Meta account:
meta-ads auth login
This opens a browser window for Meta’s standard OAuth flow. Grant the requested permissions, and the CLI stores your credentials locally. No need to create a Meta app, request API access, or go through app review. The standard auth flow handles everything.
Verify Your Setup
Confirm the connection works:
meta-ads account list
This returns a list of ad accounts you have access to. If you see your accounts, you’re ready to start managing Facebook ads from your terminal.
Essential Meta Ads CLI Commands
Here are the commands you’ll use most often when managing campaigns from the command line.
Creating a Campaign
meta-ads campaign create \
--account-id "act_123456789" \
--name "Spring Sale 2026" \
--objective "CONVERSIONS" \
--budget-type "DAILY" \
--budget "5000" \
--status "PAUSED"
This creates a conversion campaign with a $50 daily budget (budget values are in cents) in paused status so you can review before going live.
Listing Active Campaigns
meta-ads campaign list --account-id "act_123456789" --status "ACTIVE"
Pulling Performance Reports
meta-ads report get \
--account-id "act_123456789" \
--date-range "last_7d" \
--metrics "spend,impressions,clicks,ctr,cpc,conversions" \
--breakdown "campaign"
This pulls a seven-day performance breakdown by campaign, including spend, impressions, clicks, CTR, CPC, and conversions. Output comes as structured data you can pipe to other tools or scripts.
Updating Campaign Budgets
meta-ads campaign update \
--campaign-id "123456789" \
--budget "7500"
Pausing and Enabling Ads
meta-ads adset update --adset-id "123456789" --status "PAUSED"
meta-ads adset update --adset-id "123456789" --status "ACTIVE"
Building Automated Ad Workflows From the Command Line
The real power of the Meta Ads command line tool is automation. Here are practical workflows you can build.
Daily Performance Check Script
Create a script that runs every morning, checks campaign performance, and flags anything unusual:
#!/bin/bash
# daily-ads-check.sh
ACCOUNT="act_123456789"
REPORT=$(meta-ads report get \
--account-id "$ACCOUNT" \
--date-range "yesterday" \
--metrics "spend,ctr,cpc,conversions" \
--format "json")
# Parse and alert on low-performing campaigns
echo "$REPORT" | jq '.[] | select(.ctr < 0.01)' > low_performers.json
if [ -s low_performers.json ]; then
echo "Low CTR campaigns found:" | cat - low_performers.json
fi
Schedule this with cron, and you start every day knowing which campaigns need attention without opening Ads Manager.
Budget Scaling Automation
#!/bin/bash
# scale-winners.sh
# Get campaigns with ROAS above threshold
meta-ads report get \
--account-id "act_123456789" \
--date-range "last_3d" \
--metrics "spend,purchase_roas" \
--format "json" | \
jq -r '.[] | select(.purchase_roas > 3.0) | .campaign_id' | \
while read campaign_id; do
# Increase budget by 20%
current=$(meta-ads campaign get --campaign-id "$campaign_id" --fields "daily_budget" | jq -r '.daily_budget')
new_budget=$(echo "$current * 1.20" | bc | cut -d. -f1)
meta-ads campaign update --campaign-id "$campaign_id" --budget "$new_budget"
echo "Scaled campaign $campaign_id budget to $new_budget"
done
AI Agent Integration
When paired with AI coding tools, the Meta Ads CLI enables conversational ad management. In Claude Code, you might say:
“Check my Meta ad campaigns from the last 7 days. Pause anything with a CPC above $5 and a CTR below 1%. Then increase the budget by 15% on any campaign with a ROAS above 4x.”
The AI agent translates this into the appropriate CLI commands, executes them, and reports back the results. This is the kind of workflow that used to require a custom-built dashboard and weeks of development. Now it takes a conversation.
How Meta Ads CLI Fits With AI Coding Tools

Meta designed the Ads AI Connectors specifically to work with the growing ecosystem of AI coding tools. Here’s how the integration works in practice.
Claude Code
Claude Code can call Meta Ads CLI commands directly from within your coding environment. You describe what you want, Claude generates the commands, and you approve execution. This creates a feedback loop: pull data, analyze it, make decisions, and execute, all within the same conversation.
Codex
OpenAI’s Codex integration works similarly. The MCP server acts as a bridge between the AI model and your Meta Ads account, letting the model read campaign data and issue commands through the CLI.
Custom AI Agents
The most powerful use case is building custom AI agents that operate within your Meta Ads account. These agents can:
- Monitor campaign performance on a schedule
- Apply optimization rules you define in plain language
- Generate performance reports and send them to Slack or email
- Create new ad variations based on top-performing creative
- Pause campaigns that hit spending thresholds
The key distinction: these agents run locally on your machine, not on Meta’s servers. You maintain full control over what actions they can take and when.
Does Using the Meta Ads CLI Risk Account Bans?
No. The Meta Ads CLI is an official Meta product that uses the same API endpoints as Ads Manager, just through a different interface. Meta built and maintains it. Using the CLI is no different from using the web interface or the official Meta Marketing API, as far as account compliance is concerned.
That said, the same Meta advertising policies apply. The CLI won’t protect you from policy violations in your ad content, targeting, or landing pages. It changes how you submit and manage those ads, not what rules govern them.
Simplified + Meta Ads CLI: A Complete Terminal Workflow
Here’s where this gets practical for marketers who already use Simplified. Simplified’s all-in-one marketing platform includes tools for design, writing, video, and social media management. Combined with the Meta Ads CLI, you can manage your entire marketing operation from the terminal.
The Workflow
- Create content with Simplified: Use Simplified’s AI Ads Generator to create ad visuals and copy. Generate multiple variations for testing.
- Push organic content with Simplified: Schedule social media posts across Facebook, Instagram, LinkedIn, TikTok, and more.
- Launch paid campaigns with Meta Ads CLI: Take your best-performing organic content and promote it through Meta Ads CLI. Create campaigns, set targeting, and manage budgets without leaving the terminal.
- Automate both through AI Workflows: Connect everything using Simplified’s AI Workflows to build end-to-end automation. When organic posts hit engagement thresholds, automatically create paid campaigns to amplify them.
Why This Combination Works
Most marketing teams toggle between five or six different tools and browser tabs to manage organic and paid content. The terminal-based approach eliminates that context-switching. Create the content in Simplified, post it organically, then promote it with paid ads. One workflow, two command-line tools, zero tabs to manage.
For small teams especially, this is a meaningful time saver. Instead of spending 30 minutes navigating Ads Manager to set up a campaign, you spend 30 seconds typing a command. Scale that across dozens of campaigns, and you’re saving hours every week.
What This Means for the Future of Ad Management
Meta’s decision to release these tools signals a bigger shift. The company is actively opening its ad ecosystem to third-party AI. This isn’t a side project or an experiment. It’s a strategic bet that the next generation of marketers will manage campaigns through AI agents and command-line tools, not graphical interfaces.
For developers, this is familiar territory. For marketers, it’s a learning curve worth climbing. The Meta Ads CLI isn’t going to replace Ads Manager overnight. But for anyone who values speed, automation, and the ability to manage campaigns at scale, it’s the most significant change to Meta’s advertising toolkit in years.
The marketers who learn to use the Meta Ads CLI today will have a significant advantage as AI-driven ad management becomes the norm. The tools to do it—from Meta’s CLI to marketing automation platforms—are available right now.
Getting Started With Meta Ads CLI Today
Here’s your action plan:
- Install the Meta Ads CLI: Run
npm install -g @meta/ads-cliand authenticate with your Meta account. - Start with reports: Pull your first performance report from the terminal to get comfortable with the interface.
- Build your first script: Create a simple daily check script that alerts you to underperforming campaigns.
- Add AI assistance: Connect Claude Code or another AI coding tool to help generate and execute CLI commands. Or skip the terminal entirely and manage Meta Ads through MCP with AI agents.
- Create ad creative with Simplified: Use Simplified’s AI Ads Generator to create visuals and copy, then deploy through Meta Ads CLI.
The Meta Ads CLI puts full campaign management in your terminal. Combined with Simplified’s marketing platform, you can create ad creative, schedule organic posts, and manage paid campaigns from one workflow. Start free with Simplified and see how much time you save.























