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.

Gemini CLI10:25

› 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

1S

The capture is too tall for Instagram, so I cropped a copy first:

Instagram caption2,200fits
Image or videorequired — attached
Reply chainsjoined into one post
Attachments allowed10per post

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

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

1

Connect once

~2 min

Link the accounts you use in a browser. OAuth, no passwords typed into a chat, no API keys to paste anywhere.

ChatGPT

Claude

Cursor

2

Ask, in your own words

one sentence

Tell Gemini CLI to publish to Instagram, now or on a day you name. No dashboard, no tab switch.

3

Read the receipt

per network

One 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.