Instagram · from Gemini CLI
Post to Instagram from Gemini CLI.
Instagram wants a picture and a terminal only has paths. Gemini CLI uploads the file itself, and can check its shape on the way.
Every Instagram post needs an image or a video, and in a terminal that means a file: a screenshot in the docs folder, a design export, a chart a script rendered. Gemini CLI cannot attach that file to a tool call the way a chat app attaches a photo, and nothing in its documentation says it passes files into tool arguments. So it takes the route our tools offer: it asks for an upload target, sends the bytes there with a shell command, and puts the public address it gets back into the post.
Before anything is sent, the draft is checked against Instagram: a picture present, a caption within 2,200 characters, a carousel of no more than 10 items. Publishing goes through Meta’s API to a professional account, Business or Creator, that you signed in with in a browser. Instagram gets its own line in Gemini CLI’s reply, separate from Facebook or anything else named in the same request.
Asking Gemini CLI for an Instagram post
The Instagram ceilings in this exchange come from the same table the publisher enforces — the conversation is drawn, the numbers are not.
› Set me up — what do you need?
Just the accounts. Connect them in the browser once and I can publish from here after that.
› Done, connected
I will tell you before publishing if a network cannot take what you wrote.
› Good. Drafting the launch note now
Send it over and I will check it before anything goes out.
› put docs/img/settings-page.png on instagram with a short caption about the new settings page, fix the shape if instagram won’t take it
local file · taller than Instagram allows
The capture is too tall for Instagram, so I cropped a copy first:
Published with the cropped copy. Your original file was not changed.
What Instagram allows
Read from the same table the publisher enforces, so this cannot drift from what actually happens when you press send.
- Caption limit
- 2,200 characters
- Post with no image or video
- Refused by Instagram
- Reply chains
- No — the parts are joined into one post
- Images or video per post
- 10
- Image formats
- Anything we accept for upload
Gemini CLI, on the other networks
Instagram, from the other agents
- Instagram from ChatGPT
- Instagram from Claude
- Instagram from Cursor
- Instagram from Claude Code
- Instagram from OpenClaw
- Instagram from Hermes
- Instagram from Codex
- Instagram from Claude Cowork
- Instagram from VS Code
- Instagram from Windsurf
- Instagram from Cline
- Instagram from Kilo Code
- Instagram from Zed
- Instagram from OpenCode
- Instagram from Amp
- Instagram from Goose
- Instagram from Grok
- Instagram from Perplexity
- Instagram from Le Chat
- Instagram from Raycast
- Instagram from LM Studio
- Instagram from Warp
- Instagram from Kimi Code
- Instagram from Junie
- Instagram from DeepSeek
Publishing to Instagram from Gemini CLI
A path stands in for an attachment
Give Gemini CLI the file path; it requests an upload target, sends the bytes from your machine and passes the resulting public address to the Instagram post.
Measured, then cropped if needed
Gemini CLI can read the pixel size with a shell tool already on your machine and crop or pad a copy to a shape Instagram accepts before uploading anything.
A carousel in the order you name
Name several exports and Gemini CLI uploads them one after another, then publishes them as a single carousel post in the order your request gave.
Stopping it means stopping it early
A live Instagram post cannot be deleted through the API, so the approval prompt before Gemini CLI’s publish call is the last moment to cancel it.
How it works
Connect once
~2 minLink the accounts you use in a browser. OAuth, no passwords typed into a chat, no API keys to paste anywhere.
ChatGPT
Claude
Cursor
Ask, in your own words
one sentenceTell Gemini CLI to publish to Instagram, now or on a day you name. No dashboard, no tab switch.
Read the receipt
per networkOne line per network — what landed, what failed and why, and what genuinely could not be determined.
Looking at a picture is not measuring it
Gemini CLI can open an image with its file tool and the model sees it, which is useful for writing the caption. It is not a dependable way to learn the exact proportions, and Instagram refuses a feed picture outside a range from slightly tall portrait to wide landscape, however good the file is. The images a project holds are often outside it: a full-page capture of an app is far too tall. Ask Gemini CLI to read the pixel dimensions with a shell command, such as sips on a Mac or ImageMagick elsewhere, and crop a copy before the upload rather than after the refusal.
A limitation of Instagram from Gemini CLI itself — it stays true whoever publishes for us. From documentation, checked 2026-11-23.
When this is the wrong tool
If the photo lives on your phone, an app on the phone gets it to Instagram with fewer steps; from Gemini CLI it has to reach the computer first. Stories are not part of this, only feed posts and carousels, and once a post is out it stays out unless you delete it in Instagram yourself.
Questions people actually ask
Can Gemini CLI post a screenshot from my repository to Instagram?
Yes. Give it the path and it gets an upload target from 1Social, sends the file and publishes with the returned address on your professional account. If the screenshot is outside the shapes Instagram accepts, ask for a cropped copy in the same request.
Does an @ reference in Gemini CLI attach an image to the Instagram post?
No. An @ reference puts a file’s content into the prompt for the model to read, and the documentation describes it as meant for text files. Instagram fetches pictures from a public address, so the image still has to go through the upload tool.
Which Instagram accounts can Gemini CLI publish to?
Business and Creator accounts only — that is Instagram’s rule for publishing through its API, not Gemini CLI’s. If yours is personal, switching it to Creator in the Instagram settings is free, and after that it connects through a browser sign-in in 1Social like any other account.
Something else? Ask us — a person answers.
Read next
Start where you already work.
Connect an account and post your first update in about two minutes. Every plan starts with a free trial.
Posts go out through each network’s official API — not scraping.