Cogny CLI · Paid Social

    X Ads from your shell.

    Pull X (Twitter) Ads analytics for campaigns, line items, and promoted tweets, walk the campaign tree, manage tailored audiences and targeting, and flip status — all from Bash over the X Ads MCP. No Ads API client, no OAuth 1.0a signing.

    # 1. sign up (free for 15 calls) — uses your git email
    $ npx @cogny/cli init --agent claude-code
    
    # 2. see every X Ads tool
    $ cogny tools list
    
    # 3. call any tool from Bash — no MCP wiring
    $ cogny tools call mcp__X_Ads__tool_get_analytics --input '{…}'
    ❯ start Cogny Solo — $9/mo@cogny/cli on npm →

    cogny --who

    TWO PATHS
    You're a human

    X Ads Manager hides budget and objective on the line item and rejects analytics windows over 7 days or off-midnight. The CLI auto-fixes those time-window errors and returns clean JSON in one call. Connect X Ads once in Cogny Solo and let your coding agent — or scheduled reports — do the querying for you.

    ❯ start Solo
    You're an agent

    Self-onboard with one command. The CLI issues a key, wires nothing, and exposes every X Ads tool over JSON-RPC. First 15 calls are free.

    $ npx @cogny/cli init --agent claude-code

    cogny tools call

    3 EXAMPLES

    Real tool names from the X Ads MCP. Send --input JSON, get JSON back.

    mcp__X_Ads__tool_get_analyticsPerformance metrics for campaigns, line items, or promoted tweets.
    $ cogny tools call mcp__X_Ads__tool_get_analytics \
      --input '{"account_id":"18ce54abc12","entity":"CAMPAIGN","entity_ids":["8u3a1","8u3a2"],"start_time":"2026-05-01T00:00:00Z","end_time":"2026-05-08T00:00:00Z","granularity":"TOTAL"}'
    example response
    [
      {
        "id": "8u3a1",
        "impressions": 482044,
        "engagements": 9123,
        "clicks": 4120,
        "billed_charge_local_micro": 2310000000
      },
      {
        "id": "8u3a2",
        "impressions": 104113,
        "engagements": 6201,
        "clicks": 1880,
        "billed_charge_local_micro": 880000000
      }
    ]
    mcp__X_Ads__tool_get_campaignsList campaigns with effective status, currency, and funding instrument.
    $ cogny tools call mcp__X_Ads__tool_get_campaigns \
      --input '{"account_id":"18ce54abc12","limit":2}'
    example response
    [
      {
        "id": "8u3a1",
        "name": "Website Traffic — Q2",
        "effective_status": "RUNNING",
        "currency": "USD",
        "budget_optimization": "LINE_ITEM"
      },
      {
        "id": "8u3a2",
        "name": "Reach — Launch",
        "effective_status": "PAUSED",
        "currency": "USD",
        "budget_optimization": "LINE_ITEM"
      }
    ]
    mcp__X_Ads__tool_update_campaign_statusPause, activate, or draft a campaign.
    $ cogny tools call mcp__X_Ads__tool_update_campaign_status \
      --input '{"account_id":"18ce54abc12","campaign_id":"8u3a1","entity_status":"PAUSED"}'
    example response
    {
      "id": "8u3a1",
      "entity_status": "PAUSED",
      "effective_status": "PAUSED"
    }

    cogny tools list

    MORE

    A sample of the rest of the X Ads surface. Run cogny tools list --json for every tool and its input schema.

    mcp__X_Ads__tool_list_ad_accountsmcp__X_Ads__tool_get_line_itemsmcp__X_Ads__tool_get_promoted_tweetsmcp__X_Ads__tool_get_tailored_audiencesmcp__X_Ads__tool_get_targeting_criteriamcp__X_Ads__tool_add_targeting_criteriamcp__X_Ads__tool_update_line_itemmcp__X_Ads__tool_search_conversationsmcp__X_Ads__tool_get_web_event_tags

    cogny --faq

    Is this an official X Ads CLI?

    No — it is the Cogny CLI calling the X Ads MCP over the cogny-mcp-proxy. You authenticate once via Cogny (OAuth handled for you) and then call every tool from Bash. No Ads API app or OAuth 1.0a request signing to manage.

    Where do budget and objective live on X campaigns?

    On the line item, not the campaign — the UI objective is the line item `goal` and budget lives there when budget_optimization is LINE_ITEM. Call tool_get_line_items to resolve both.

    Can my coding agent use this without MCP setup?

    Yes — that is the point. `npx @cogny/cli init --agent claude-code` issues a key, then `cogny tools call mcp__X_Ads__tool_get_analytics --input ...` works from any shell. No /mcp wiring or restart needed.

    related CLIs

    /cli/meta-ads/cli/linkedin-ads/cli/reddit-ads/cli/tiktok-ads

    Building an agent? The full tool map for all servers is one fetch: /cli/llms.txt