Post to Threads from Gemini CLI

Gemini CLI can draft a batch of Threads posts from files in the repo, post the best of them, and read the replies back in the same session.

Hermoso is a marketing MCP server: 850+ tools over one OAuth’d endpoint that let an agent research the ads already running in a market, generate finished image and video ads, publish them, and build the paid campaigns behind them. Gemini CLI reaches all of it through one connection. This page is about one slice of that — what Gemini CLI can actually do on Threads, and what Threads will not let it do.

Connect Hermoso to Gemini CLI

  1. Install the extension.
    gemini extensions install https://github.com/hermoso-ai/hermoso
    It installs the latest release of Hermoso’s public repository: five skills (research, ad-from-brand, generate, product-photoshoot and marketing) plus a GEMINI.md context file. The skills run the hermoso command through npx, so nothing is added to Gemini CLI’s tool list and nothing costs context until a command runs. gemini extensions list shows them under Agent skills.
  2. Sign in once.
    npx -y hermoso auth login
    It opens a browser sign-in and stores an owner-only credential in ~/.hermoso/config.json. Gemini CLI can run it for you the first time it needs Hermoso. No browser on that machine? Create a key under MCP & CLI → Terminal & API keys and run npx -y hermoso auth login --token hmk_….
  3. Optional: the MCP server as well.
    gemini mcp add --scope user --transport http hermoso https://app.hermoso.ai/mcp
    Gemini CLI finds Hermoso’s authorization server when the first connection answers 401 and registers itself, so no key goes in settings.json; /mcp auth hermoso inside a session runs the sign-in. The skills reach every tool without it.
  4. Ask Gemini CLI for something. “Pull my three closest competitors’ longest-running ads and remix the best hook into a 9:16 video,” or “post this render to the channel.” The agent picks the tools; you approve the spend.

We ran the install above on 2026-09-23 against Gemini CLI 0.60.0 in a clean home directory: it pulled the current release of hermoso-ai/hermoso, and gemini extensions list reported the five skills and the context file. The extension carries no MCP server of its own, which is deliberate: a tool list is loaded into every session, and skills cost nothing until they run. Hermoso is not affiliated with or endorsed by Google.

Then connect Threads itself, once, under Settings → Connectors in Hermoso. That is an OAuth consent screen, so it is the one step that needs a browser — everything after it is a tool call.

The Threads tools Gemini CLI gets

  • post_to_meta — publishes with target: "threads" — text, image or video, and optionally geotagged.
  • schedule_post — queues it alongside every other channel.
  • list_threads_posts / threads_insights — what you have posted, and how each one did.
  • list_threads_replies / reply_to_thread / hide_thread_reply — read the replies, answer as the brand, hide what does not belong.
  • list_threads_mentions — who is talking about you.
  • search_threads_keyword / search_threads_locations — keyword search and the location ids a geotag needs.
  • delete_thread — removes a post.

Threads is the channel where Hermoso goes furthest past publishing. Beyond posting there is a full read-and-respond surface — replies, mentions, keyword search and per-post insights — which is what makes it usable as a listening channel and not just an outlet. Note that Threads is a separate OAuth grant from Facebook even though it shares the Page.

Threads limits worth knowing before you automate anything

TextA Threads post is capped at 500 characters — the tightest here except X. It is enforced when the post is created or queued — refused while you are still there to fix it, rather than silently cut on the way out.
VisibilityPublic only — “Threads has no unlisted, private or draft post.” A Threads post exists publicly or not at all.
Carousel2 to 20 slides, images and video mixed. Both bounds are Meta’s own words, quoted in the table that enforces them: “Carousels must have at least 2” items, and “no more than 20 total images, videos, or a mix of the two.” That makes Threads the most generous mixed-media carousel of any channel here.
Which accountpageId — the same connected Page identity carries Facebook, Instagram and Threads.

Try it in Gemini CLI

Ask for it in ordinary language — these are sentences, not a DSL:

“Turn each heading in ./docs/launch.md into a Threads post under 500 characters, post the first two, and check the replies before the session ends.”

That walks get_brandgenerate_textpost_to_meta (target: "threads") → list_threads_replies. Gemini CLI asks before it runs a shell command, and the skills act through the hermoso command, so a publish shows up as a line you can read before you say yes. For MCP tools it offers once, always for that tool, or always for the server.

Gemini CLI on Threads: the part that bites

If you also add Hermoso as an MCP server, Gemini CLI names every tool mcp_hermoso_ plus the tool name, so the reply tool appears in its confirmation prompt with that prefix. Always-allow the reads, list_threads_replies and list_threads_mentions, and let the reply tool keep asking. It speaks as the brand in public.

Two Gemini CLI details decide how safe this is. gemini mcp add writes to the project’s .gemini/settings.json unless you pass --scope user, which is useful when one repo should always run against one brand. And never add Hermoso with --trust: it skips every confirmation for the server, including the ones in front of a publish. MCP tools arrive named mcp_hermoso_ plus the tool name, and --exclude-tools keeps any of them out entirely.

Research Threads before you post

search_threads searches public Threads by keyword through the research surface, and search_threads_keyword does the same through your connected Threads account. There is no Threads ad library, because there are no Threads ads to archive.

The paid half

There is no Threads ads product in Hermoso, and it would be wrong to imply one. Threads here is an organic channel: publish, read, reply, measure. The paid tools cover Meta (Facebook and Instagram), Google Ads, Microsoft Advertising, Reddit Ads, LinkedIn, Pinterest, X Ads, TikTok Ads, Snapchat Ads, ChatGPT Ads and Apple Search Ads.

What Gemini CLI cannot do on its own

An agent with a budget is only useful if the blast radius is bounded, so the fence is in the server rather than in a prompt. Every ad campaign, ad set, ad group and ad is created paused, and the status switches that arm real money refuse to run without an explicit confirmation flag. Every render is quoted first — hermoso_capabilities publishes each model’s exact credit cost before anything spends — and credits are reserved before the first provider call and settled at the exact cost afterwards, so a failed dispatch refunds rather than leaving you billed for nothing. Deletes are confirm-gated too, and every campaign tree is read back from the ad platform before your agent tells you what it built.

One step is deliberately not headless: linking an account is an OAuth consent screen, so you connect the channel once in a browser. Everything after that is a tool call.

The rest of the matrix

From Gemini CLI, post to: Facebook · Instagram · TikTok · YouTube · X · LinkedIn · Pinterest · Bluesky · Telegram — or see everything Gemini CLI can publish to.

Post to Threads from: Claude · ChatGPT · Claude Code · Cursor · Codex · Cline · OpenClaw · Grok Bot · Hermes · Perplexity · Le Chat

Frequently asked questions

Can Gemini CLI post to Threads?

Yes, with Hermoso's Gemini CLI extension. Run gemini extensions install https://github.com/hermoso-ai/hermoso, which adds five Hermoso skills that drive the hermoso command, then sign in once with npx -y hermoso auth login. The sign-in opens a browser and stores the credential itself, so there is no key to create and none to paste. If you also want Hermoso's tools in Gemini CLI's own list, gemini mcp add --scope user --transport http hermoso https://app.hermoso.ai/mcp adds the hosted server, which signs in with OAuth. Gemini CLI then has 850+ tools, including the ones that publish to Threads — and the ones that research the ads already running in your market and render the creative in the first place.

How do I connect Threads to Gemini CLI?

Two steps, once each. Run gemini extensions install https://github.com/hermoso-ai/hermoso, which adds five Hermoso skills that drive the hermoso command, then sign in once with npx -y hermoso auth login. The sign-in opens a browser and stores the credential itself, so there is no key to create and none to paste. If you also want Hermoso's tools in Gemini CLI's own list, gemini mcp add --scope user --transport http hermoso https://app.hermoso.ai/mcp adds the hosted server, which signs in with OAuth. Then connect Threads inside Hermoso under Settings → Connectors, which is an OAuth consent screen in a browser. After that Gemini CLI publishes to Threads as an ordinary tool call.

Does Gemini CLI need my Threads password?

No. You connect Threads to Hermoso once through an OAuth consent screen in a browser, and Gemini CLI then reaches it as a tool call. Linking an account is the one step that is not headless; nothing after it needs a password, and no credential is ever handed to the model.

Can Gemini CLI run Threads ads as well as posting?

No. There is no Threads ads product in Hermoso. Threads here is organic: publish, read replies and mentions, answer, and measure.

Start free — 30 credits at signup and 250+ more to earn, and every feature on every plan. Credits are spent only on AI models and Ad Spy research; posting, scheduling, ads management and analytics are free.

Start free   See pricing