Meta Marketing CLI for Openclaw

A robust command-line interface for managing the Meta Marketing API, Instagram publishing, and advertising insights with strict fail-closed reliability.

bilalbayram
v1.0.0
Feb 27, 2026
0
1.2k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install metacli

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install metacli using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Meta Marketing CLI?

The Meta Marketing CLI skill provides a comprehensive toolkit for developers and marketing engineers to interact with the Meta Graph API. It handles the entire authentication lifecycle, from OAuth bootstrap to token validation, and enables seamless management of campaigns, ad sets, and ads directly through terminal commands. This skill is a vital component for those building automated marketing workflows using Openclaw Skills.

Designed for reliability, the tool implements a fail-closed architecture, ensuring that any missing inputs or API errors stop the execution immediately to prevent data corruption or budget waste. It also features built-in support for schema synchronization, allowing users to keep their local API definitions updated with Meta's evolving requirements.

Meta Marketing CLI Use Cases

  • Automating the creation and updates of Meta ad campaigns and budget allocations.
  • Generating and exporting marketing insights in machine-readable JSONL formats for data analysis.
  • Programmatically publishing media to Instagram feeds with idempotency controls.
  • Managing multi-profile authentication for different client accounts within a single environment.
  • Performing dry-run validations of campaign parameters before executing live writes.

How Meta Marketing CLI Works

  1. The user installs the CLI binary and initializes the environment with necessary Meta App credentials.
  2. An OAuth handshake is performed through a secure redirect URI to obtain and validate long-lived access tokens.
  3. Schema packs are synchronized to a local directory to provide the latest API field definitions and validation rules.
  4. Commands are executed for specific profiles, allowing for account discovery, data retrieval, or campaign mutation.
  5. The tool processes Graph API requests and returns structured output while maintaining strict security via secret redaction.

Meta Marketing CLI Setup

To get started with this skill, install the binary using Go and configure your authentication profile:

# Install the meta CLI
go install github.com/bilalbayram/metacli/cmd/meta@latest

# Sync the required schema packs
meta schema sync --schema-dir ~/.meta/schema-packs

# Run the auth setup (Requires APP_ID and APP_SECRET from Meta Developer Portal)
meta auth setup --profile <PROFILE> --app-id <APP_ID> --app-secret <APP_SECRET> --redirect-uri <REDIRECT_URI> --mode both --scope-pack solo_smb --listen 127.0.0.1:53682 --open-browser=false

Meta Marketing CLI Data Schema & Taxonomy

The skill manages marketing data and configuration through a structured directory and profile system:

Data Type Storage/Format Purpose
Profiles Local Config Stores credentials and tokens for different accounts.
Schema Packs ~/.meta/schema-packs Local cache of Meta API field definitions.
Insights JSONL / JSON Standardized output for automated data processing.
Reports Table / ASCII Human-readable summaries of accounts and campaigns.
Logs CLI Output Technical logs with automatic secret redaction.

Meta Marketing CLI Advanced Features

  • Support for dry-run mutations to validate campaign parameters without spending budget.
  • Idempotency key integration for Instagram publishing to prevent duplicate content delivery.
  • Advanced insights filtering with date presets and customizable metric packs.
  • Fail-closed execution logic that integrates perfectly with other Openclaw Skills for reliable automation.
  • Automated pagination handling for Graph API requests using the follow-next flag.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*