Skip to content

Gemini CLI + Wahlu

Post to Threads from Gemini CLI with Wahlu

Connect Gemini CLI to Wahlu once, then plan, draft and schedule posts for Threads profiles (Meta's Threads app) from the Gemini CLI terminal. Every schedule can wait for your approval.

What Gemini CLI can prepare on Threads
  • Text post

    Up to 500 characters, with an emoji counting as up to 4, and up to 5 links.

  • Photo

    One JPEG or PNG, up to 8 MB.

  • Video

    One MP4 or MOV, up to 5 minutes and 1 GB.

  • Carousel

    2 to 20 photos and videos, mixed.

Can Gemini CLI post to Threads for me?

Yes: add Wahlu's MCP server to Gemini CLI with a Wahlu API key, and Gemini CLI can draft and schedule posts for your Threads profile, held for your approval unless you tell it to post. Gemini CLI can't post to Threads on its own; Wahlu does the publishing. Plans from US$29 a month, or try any plan for 7 days for US$1.

Connect Gemini CLICompare plansThe Wahlu MCP server

How to post to Threads from Gemini CLI

  1. 1

    Create a Wahlu account and try any plan for 7 days for US$1; the trial won't renew.

  2. 2

    Connect your Threads profile in Wahlu.

  3. 3

    Create a Wahlu API key under Settings → API Keys: choose Full access, or Custom with Publishing off if every post should wait for you.

  4. 4

    Add export WAHLU_API_KEY=your-key to your shell profile, with your key, and open a new terminal. Add the Wahlu configuration to ~/.gemini/settings.json. If the file already has settings, add wahlu inside its mcpServers object.

  5. 5

    Ask Gemini CLI to draft your next Threads post and schedule it.

  6. 6

    Approve each held post in Wahlu, and it goes out at the time you set.

Ask Gemini CLI for Threads posts

Example prompts and the steps to expect. These are illustrations, not recorded conversations.

Example prompt

“Read the README in this project and write a Threads post about the release, with a follow-up reply linking to the docs. Hold it for review tomorrow at 9am.”

Example prompt

“Turn the README in this project into a Threads post with up to 4 more parts, each under 500 characters, then run a readiness check.”

Example prompt

“Check whether anything is already scheduled on Threads this week before you draft a post about the README in this project.”

What Wahlu does on Threads

Gemini CLI works through Wahlu's tools, so it can set the Threads options Wahlu supports.

Threads settings on a draft

Post type
Text, photo, video or carousel.
Who can reply
Anyone, your followers, profiles you follow or mentioned profiles only.
Topic tag
One topic, up to 50 characters, without the #, full stops or ampersands.
More parts
Up to 9 more text parts, each posted as a reply to the one before.
Follow-up reply
One reply posted right after the post goes live, for a link or a call to action.

Autopilot doesn't write Threads posts yet. Wahlu doesn't post polls, quote posts or reposts on Threads.

The tool calls, in order

  1. 01

    list_targetsFinds the brand's connected Threads account and checks it's ready.

  2. 02

    upload_media_from_file, import_media_from_url or list_mediaBrings in the image or video, or picks one from your media library.

  3. 03

    create_draftCreates the draft with its caption and threads_settings, such as the post type.

  4. 04

    preflight_draftChecks the draft against Threads's rules without changing it.

  5. 05

    create_schedulePuts it on the calendar at pending_review, held for your approval.

Threads limits to know

Wahlu checks these before a post is scheduled, so the agent finds out early.

Getting images and video to Threads

The local server can upload a file straight from your computer with upload_media_from_file, so screenshots and videos in your project don't need a public link.

Connect Gemini CLI to Wahlu

Set this up once and Gemini CLI can work on every network you've connected, not just Threads.

  1. 1

    In the Wahlu app, create an API key under Settings → API Keys in your workspace, with only the permissions and brands you need.

  2. 2

    Add export WAHLU_API_KEY=your-key to your shell profile, with your key, and open a new terminal.

  3. 3

    Add the Wahlu configuration to ~/.gemini/settings.json. If the file already has settings, add wahlu inside its mcpServers object.

  4. 4

    Start a new Gemini CLI session and run /mcp to check that wahlu is connected and its tools are listed.

Checked against the Gemini CLI docs on 27 September 2026. Menus can change; if a step doesn't match what you see, follow the vendor's current instructions.

~/.gemini/settings.json
{
  "mcpServers": {
    "wahlu": {
      "command": "npx",
      "args": ["-y", "@wahlu/mcp-server@latest"],
      "env": {
        "WAHLU_API_KEY": "$WAHLU_API_KEY"
      }
    }
  }
}

Gemini CLI replaces $WAHLU_API_KEY with the value from your shell, so the key isn't saved in the settings file. You can also add the same configuration to a project's .gemini/settings.json to use Wahlu in that project only. Available local tools depend on the installed version. Check the local MCP server notes for its Node.js requirement and tool availability.

You stay in control.

Every Wahlu plan and the US$1 trial include agent access, through MCP and the API. You choose the workspace, brands and permissions each connection gets, and can disconnect it at any time.

Held until you approve

Agents create schedules at pending_review unless you've told them to publish. A held schedule can't publish until you approve it in Wahlu or ask an agent with Publishing permission to approve it.

Publishing is its own permission

Publishing is separate from Manage your schedule. Untick it and nothing your agent schedules can go out on its own.

Checked before it's scheduled

preflight_draft reports anything that would stop a post, such as media the network won't accept or a caption that's too long, without changing anything. Autopilot's lines to check reach your agent too, and approving past them takes an explicit acknowledgement.

Some things stay in the app

Use the app for queues, draft media and platform settings, and connecting social accounts. Agents can change the name or caption of an unused draft and approve held schedules with the right permissions.

Gemini CLI and Threads: common questions

Not unless you let it: Wahlu holds each schedule Gemini CLI creates for your approval unless you tell Gemini CLI to post. With the Publishing permission, Gemini CLI can also approve a held schedule when you ask it to. Publishing is a separate permission on the API key; create the key without it and every schedule waits until you approve it in Wahlu.

Wahlu has no free plan. Plus is US$29 a month, or US$288 a year (US$24 a month). Every plan includes agent access through MCP and the API. You can try any plan for 7 days for US$1. It won't renew; tap Continue to keep your plan. Any Gemini CLI subscription is separate.

Wahlu posts to Threads profiles (Meta's Threads app). You connect accounts in the Wahlu app; Gemini CLI can't connect them for you.

Your next Threads post, drafted by Gemini CLI.

Connect your Threads account in Wahlu, then give Gemini CLI a specific brief.