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
| Step | Your agent | You |
|---|---|---|
Install Node.js if missing, download the code, npm install | Does it (asks before installing Node.js) | |
| Cloudflare login | Opens the tab | Sign in (or sign up, free) and click Allow |
| Build, create the database, deploy, generate secrets | Does it | |
| Create the Meta app and its login configuration | Guides you, or clicks through it | Log in to Facebook and pick your business portfolio |
| App ID and configuration id | Finds them | |
| App secret | Shows you where it is, never looks | Click Show, then paste it into the private setup page |
| Meta comment webhook, privacy and terms links | Set up automatically through Meta's API | |
| Redirect URLs, data-deletion link | Fills them in | |
| Publish the Meta app | Takes you to the button | Click it |
| Save your dashboard link | Copy it from the private setup page | |
| Connect Instagram, first automation | Guides you | Click Connect, approve, write your DM |
Health check and npm run doctor | Does 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.