Zernio for Gemini CLI
Add the server
Writes it to ~/.gemini/settings.json for every project.
Run Instagram from Gemini CLI
Answer DMs, reply to comments, run Meta Ads campaigns, send conversions to the Meta Conversions API, run catalog ads, read analytics and publish posts on Instagram, from Gemini CLI. Gemini CLI reads a lot at once, so a quarter of conversations or campaign rows fits in one question, with the answer saved as a CSV.
- Inbox
- Meta Ads
- Conversions
- Catalog ads
- Analytics
- Publishing
A quarter of Instagram DMs and comments, read in one go with Gemini CLI
Gemini CLI is an open source terminal agent with a large context window. Pull months of platform history into one session, ask what it shows, and get the answer as a CSV for Google Sheets or a summary to paste into a Doc.
- 01
Ask Gemini CLI: "pull 90 days of Instagram conversations and list what people ask most".
- 02
It reads the conversations through Zernio and keeps them all in context while it groups them.
- 03
It writes triage.csv for the ones still open; edit the reply column in Sheets and save it back.
- 04
Gemini CLI reads your edits and sends only the rows you marked.
Six months of Meta Ads results in one question
- 01
Ask Gemini CLI: "load six months of Meta Ads results by campaign and week and tell me what changed".
- 02
It reads the whole range through Zernio's ads tools into one session instead of a month at a time.
- 03
You get the trend per campaign, and ads.csv with the rows behind it for your reporting sheet.
How people run Instagram from Gemini CLI
What Instagram keeps asking
Pull a quarter of Instagram DMs and comments into one session and ask for the recurring questions with a quote each. The large context window means the whole quarter is read together, not sampled.
Replies edited in Sheets
Gemini CLI writes open Instagram DMs and comments to a CSV with a suggested reply column. Your team edits it in Google Sheets, marks rows to send, and Gemini CLI sends only those.
House rules in GEMINI.md
Write your tone, banned phrases and escalation rules for Instagram into GEMINI.md. Gemini CLI loads that file as context in every session, so a new teammate's prompts follow the same rules.
Gemini CLI and Instagram in 4 steps
Gemini CLI reaches Instagram through the Zernio MCP server. No Zernio server to host and no Instagram developer app of your own.
01
Connect Instagram
Sign up free and connect an Instagram Business or Creator account in Zernio.
Connect Instagram02
Add the server
--scope user writes it to ~/.gemini/settings.json for every project. Leave it out to add it to this project's .gemini/settings.json only.
03
Sign in
In a Gemini CLI session, start the OAuth flow and approve it in the browser. Gemini CLI discovers Zernio's OAuth settings on its own.
04
Check it works
Run /mcp in a session and confirm zernio shows as CONNECTED with its tools listed.
Good to know in Gemini CLI
- --scope user puts zernio in ~/.gemini/settings.json for every project; leave it out to keep it to one project's .gemini/settings.json.
- Put reply rules and tone in a GEMINI.md file; Gemini CLI loads it as context, so drafts follow the same rules in every session.
- gemini -p runs one prompt with no session, and --output-format json returns the answer as structured data for a shell script.
What Gemini CLI can do on Instagram
Gemini CLI reads a lot at once, so a quarter of conversations or campaign rows fits in one question, with the answer saved as a CSV.
Inbox
Reads months of Instagram DMs and comments in one session to find what people ask most, then sends the replies you approved in a CSV.
- Read and send DMs with images, video and audio, quick replies, buttons and carousels.
- List, post, reply to, hide and delete comments, and send a private DM reply to a commenter.
Ads
Loads long ranges of Meta Ads results at once to spot drift per campaign, and exports the rows for your reporting sheet.
Campaigns and boosted posts on Meta Ads, from a separately connected ad account.
Meta Ads with ZernioConversions
Reads offline sales from a CSV and sends each row to the Meta Conversions API as an event, starting with one test row.
Meta Conversions API: purchases, leads and sign-ups sent server-side to your Meta pixel (dataset), deduplicated against the browser pixel.
Conversions API docsCatalog ads
Exports the Meta catalog's product set to a CSV you can check against your own product sheet.
Advantage+ catalog ads that promote a product set from your Meta product catalog.
Analytics
Summarises a year of Instagram numbers into one page of Markdown for a Google Doc, with the rows alongside as CSV.
Impressions, reach, likes, comments, shares, saves and views per post, plus account insights, daily follower history, audience demographics (100+ followers) and Story insights while a Story is live.
Publishing
Schedules Instagram posts row by row from a CSV your team filled in, after the rest of the work is done.
- Feed posts with a single image
- Carousels of up to 20 images and videos, mixed
Ask in plain words. Gemini CLI picks the tools.
Written for how Gemini CLI works. Copy one, change the details.
Read everything at once, answer in a sheet, in Gemini CLI
Instagram rules the agent runs into
Set by Instagram's API or by Zernio, whichever agent you use. Checked against the Zernio Instagram docs on December 4, 2026.
- Personal Instagram accounts cannot post through the API; only Business and Creator accounts can.
- Every post needs media, so there are no text-only posts.
Connecting Gemini CLI is free. Its calls bill like the API requests behind them.
Each Instagram account counts as one connected account. The first 2 connected accounts are free, then $6 per account a month, falling to $1 as you add more.
Frequently Asked Questions
Connect an Instagram Business or Creator account in Zernio first. Then, in Gemini CLI: add the server and sign in. Run /mcp in a session and confirm zernio shows as CONNECTED with its tools listed.
With --scope user it goes in ~/.gemini/settings.json for every project. Without it, it goes in the project's own .gemini/settings.json.
Through files. Export the sheet as CSV and Gemini CLI reads it from disk, and it writes results back as CSV for you to import. Zernio does the Instagram side.
Gemini CLI has a large context window, so months of Instagram conversations or campaign rows usually fit in one session. For very long ranges, ask it to work month by month and combine the results.
Yes. gemini -p runs a single prompt without opening a session, and --output-format json returns the response and stats as JSON. You can also pipe a file in on stdin.
Write them in a GEMINI.md file. Gemini CLI loads it as context at the start of each session, so tone and escalation rules apply without repeating them in every prompt.
Yes, under Apache 2.0. You can read how it connects to MCP servers like Zernio, and its settings live in plain settings.json files.
Per post: impressions, reach, likes, comments, shares, saves and views. Account insights, daily follower history and audience demographics are also available, and Story insights can be read while the Story is live.
Give Gemini CLI your Instagram account
Connect an Instagram Business or Creator account, add Zernio to Gemini CLI, and ask.
- Inbox
- Meta Ads
- Conversions
- Catalog ads
- Analytics
- Publishing