Skip to content

Agent setup guide

Paste the repo link into your AI agent and it sets everything up. You only log in, click Allow, and paste three values from Meta into a private page on your own computer.

You don't need to be technical. Open any AI agent that can use your terminal, such as Claude Code, Codex, Cursor or Gemini CLI, and paste:

Set up https://github.com/hemang-doshi/ig-comment-dm for me. Follow SETUP-WITH-AI.md in the repo.

The agent follows SETUP-WITH-AI.md, a playbook written for agents. It installs everything, deploys your bot to your own Cloudflare account, and guides you through Meta's dashboard. If it can control a browser (Claude Code with Claude in Chrome, for example), it does the clicking too.

Who does what

StepYour agentYou
Install Node.js if missing, download the code, npm installDoes it (asks before installing Node.js)
Cloudflare loginOpens the tabSign in (or sign up, free) and click Allow
Build, create the database, deploy, generate secretsDoes it
Create the Meta app and its login configurationGuides you, or clicks through itLog in to Facebook and pick your business portfolio
App ID and configuration idFinds them
App secretShows you where it is, never looksClick Show, then paste it into the private setup page
Meta comment webhook, privacy and terms linksSet up automatically through Meta's API
Redirect URLs, data-deletion linkFills them in
Publish the Meta appTakes you to the buttonClick it
Save your dashboard linkCopy it from the private setup page
Connect Instagram, first automationGuides youClick Connect, approve, write your DM
Health check and npm run doctorDoes it

The private setup page

When setup needs your Meta values, it opens a page titled Comment to DM · private setup in your browser. It runs only on your computer, at 127.0.0.1 on a random address, and closes when setup finishes. Whatever you paste there goes straight into your own Cloudflare account. Your agent never sees it, and nothing is printed to its terminal.

When the bot is live, the same page shows your private dashboard link with Copy and Open buttons. Save it in a password manager or bookmarks: Cloudflare keeps it hidden, so that page is the only place it appears. Then click Done and your agent carries on.

If it stops

Everything is safe to run again. Ask your agent to "continue the setup". It re-runs npm run setup:agent, which skips what's already done, and npm run doctor tells it exactly what's missing.

Never paste a secret (your App secret, a token or your dashboard link) into the agent's chat. If one ends up there anyway, reset it: Rotating a secret.

Doing it without an agent

See the self-setup guide, and Unified login if your Meta app was created after late October 2026.