Use AdSync from the command line
Install it, sign in once, run any tool from your shell.
Same tools, access, guardrails and Activity log as the MCP servers. Scripts and cron jobs use a token.
Before you start
- Sign in to AdSync.
- Connect a platform.
- Turn on the ad accounts AdSync may use.
Connect CLI
- Install the adsync CLI
It needs Python 3.10 or later. With pipx:
pipx install adsync-cli.uv tool install adsync-cli
- Sign in
Your browser opens AdSync: choose Full access or Read-only, then Allow. On a remote machine, use
adsync login --pasteand paste a token instead.adsync login
- Teach Claude Code to use it
Adds two skills to
~/.claude/skills: how to call the CLI safely, and playbooks for audits, creative fatigue, search terms, pacing and reports.adsync skill install
- Try it
Or ask Claude Code: “Audit my main Meta account for the last 7 days.”
adsync tools meta adsync meta list_ad_accounts
- Scripts and cron
Skip the sign-in and pass a token in the environment instead. Make one in Settings, under Access tokens.
export ADSYNC_TOKEN=ads_YOUR_TOKEN
Tips
- adsync describe <platform> <tool> shows a tool's arguments.
- Output is JSON, ready for jq.
- Use a read-only token in ADSYNC_TOKEN for scheduled reports.
- Upgrade with uv tool upgrade adsync-cli.
First prompts to try
- “List my ad accounts and which ones spent in the last 7 days.”
- “Compare the last 7 days with the 7 before, by campaign.”