LinkedIn Ads from the command line.
Adwarp is an open-source CLI and MCP server for LinkedIn Ads that runs from your terminal with npx adwarp. Size audiences, launch drafts from a brief and pull reports you can pipe into scripts and cron.
$ npx adwarp$ npx adwarp launch --brief persona-by-competitor.json
5 campaign groups
35 ad groups, 50 USD/day each
35 single-image ads
3 ad groups under 300 members, skipped
All drafts. 0 USD spent.
01Set up
Set up in 3 steps.
Create your LinkedIn developer app
Add the Advertising API product. It's free, and approval usually takes a day or 2.
Sign in from your terminal
Adwarp opens your browser for LinkedIn's approval and stores the token locally.
npx -y adwarp auth loginRun your first command
A read-only check that lists the ad accounts your app can reach.
npx adwarp accounts list
Run it on a schedule?
1 cron line prints the account rollup every Monday at 9am.
0 9 * * 1 npx adwarp report summary -p last_7_days02Try these commands
5 commands to try first.
$ npx adwarp report summary -p last_7_days
Totals for the last 7 days, then top campaigns by spend
Flags: ad groups with spend and no conversions
03Results
Why running ads from the CLI gets better results.
Rules run every week
Cron runs the rollup and your checks on schedule instead of a calendar reminder.
Launches repeat exactly
A brief file is the whole launch, so the next test reuses it with 1 change instead of 20 clicks.
Output you can pipe
Rows print as tab-separated text, so they feed a spreadsheet, a script or the next command.
You know what worked
Every change lands in the same journal the MCP server writes, so lift gets measured instead of guessed.
Is there a LinkedIn Ads CLI?
LinkedIn doesn't ship one. Adwarp is an open-source CLI that runs LinkedIn Ads from your terminal through a developer app you create.
Do I need an AI client?
No. The CLI needs Node.js 20 or newer and your LinkedIn app. The same tools also run as an MCP server when you'd rather ask in plain words.
Can I run it on a schedule?
Yes. Put any command in cron, like the Monday rollup above. It runs on your machine with the credentials from npx -y adwarp auth login.
Does anything go live on its own?
No. launch and every create command make drafts. Going live is always an explicit request, from you, or a switch you flip in Campaign Manager.
Can I get JSON instead of text?
Yes, for changelog list, lift and competitor ads with --json. Report and list commands print 1 tab-separated row per entity, ready for sort, cut or a spreadsheet.
What are the LinkedIn commands?
Every one runs as npx adwarp followed by the command.
Periods for -p are last_7_days, last_30_days, last_90_days, month_to_date and last_month. Run any command with --help for every option.
| npx adwarp | What it does |
|---|---|
auth login | Sign in to LinkedIn. Tokens stay in ~/.adwarp. |
auth export | Print your login as settings for a self-hosted server, or with --mcp the hosted connect command. |
accounts list | The ad accounts your app can reach. |
targeting search <facet> <query> | Find titles, skills, companies and regions by name. |
targeting estimate <facet> <urns...> | Audience size for 1 facet's values. |
audience upload -n <name> -f <csv> | Clean and upload a CSV as a matched audience. --dry-run previews it. |
audience from-salesforce -n <name> -q "<SOQL>" | A Salesforce query to a matched audience. |
audience from-hubspot -n <name> --list <id> | A HubSpot list, or a search with --filter, to a matched audience. --dry-run previews it. |
audience status <segmentId> | Matching status and size. |
conversions list | The account's conversions, to pick 1 to track. |
campaigns list | Campaign groups and ad groups, drafts included. |
campaigns get <campaignId> | An ad group's status, name and current targeting. |
campaigns update <campaignId> | Change an ad group in place. Previews unless --apply. |
ad list <campaignId> | The ads in an ad group, drafts included. |
ad pause <creativeId> | Pause 1 ad so it stops serving. Previews unless --apply. |
ad resume <creativeId> | Set 1 ad ACTIVE again, which starts spend. Previews unless --apply. |
ad archive <creativeId> | Archive 1 ad. Previews unless --apply. |
ad delete <creativeId> | Delete 1 ad and its sponsored post. |
report summary | Account rollup with top performers and flags. |
report perf <level> | 1 row per campaign group, ad group or ad. |
report trend <level> <id> | Weekly or monthly trend with deltas. |
launch --brief <brief.json> | Campaign group, ad group and draft ads from a brief. |
competitor ads <advertiser> | Any company's ads from the public Ad Library. |
creative-status <ids> | Remote creative jobs for competitor ads, by ad id. |
changelog list | Recorded changes, newest first. |
changelog add | Log a change made elsewhere, such as in Campaign Manager. |
lift <level> <id> | Before and after performance for each recorded change. |