How to post to LinkedIn from Gemini CLI

To post to LinkedIn from Gemini, add PostWire to Gemini CLI with gemini mcp add -s user --transport http postwire https://postwire.io/api/mcp, type /mcp auth postwire to sign in, connect your LinkedIn profile once on LinkedIn's own page, and ask "write a LinkedIn post about this release from CHANGELOG.md and schedule it for Tuesday at 8:30". Gemini writes the post with generate_posts (the hook in the first 210 characters, the link in the first comment), shows it to you, and publishes it with post_to_social or queues it with schedule_post, up to 365 days ahead. You create no LinkedIn developer app: PostWire posts to your personal profile through LinkedIn's official API. The free plan covers it: 1 business, 10 posts a month, 5 AI drafts a day, 2 networks per post, no card.

Gemini CLI asks before it runs each PostWire tool, so nothing reaches your profile until you say yes. A scheduled post goes out from PostWire's servers with your terminal closed, first comment included. Gemini never sees your LinkedIn password: you sign in on LinkedIn's page and allow PostWire to post as you.

Updated . Written from PostWire's own code; vendor prices read on Nov 11, 2026. Live networks: TikTok, Instagram, YouTube, LinkedIn (personal profiles), Facebook Pages, Bluesky, Mastodon, Telegram, Discord, and X on paid plans.

Set it up and post, step by step

Prompt to copy once LinkedIn is connected: Read CHANGELOG.md and write a first-person LinkedIn post about what we shipped in v3.1 and why, with the release link in the first comment. Show it to me, then schedule it for Tuesday at 8:30 my time.

  1. Add PostWire to Gemini CLI

    In your terminal (not inside Gemini) run gemini mcp add -s user --transport http postwire https://postwire.io/api/mcp. -s user saves it in ~/.gemini/settings.json for every folder; without it Gemini CLI saves it for the current project only. The URL is PostWire's hosted MCP server: there is nothing to install.

  2. Sign in

    Start gemini and type /mcp auth postwire. Your browser opens PostWire's sign-in: your email and a 6-digit code, which also creates a free PostWire account if you have none, with no password and no card. /mcp then lists postwire as connected.

  3. Connect your LinkedIn profile

    Ask "connect my LinkedIn". Gemini calls create_connect_link and prints a one-hour link; open it, sign in on LinkedIn's own page and press Allow. PostWire asks LinkedIn only for permission to post as you (w_member_social), plus your name and photo to show which profile is connected.

  4. Ask for the post

    "Write the LinkedIn post for the release." generate_posts returns a draft and publishes nothing. It is written for LinkedIn: first person, 1,200 to 1,500 characters when the idea allows, the hook in the first 210 characters (about two lines, what the feed shows before "see more"), very short blocks, 3 hashtags at the end. A link goes in the first comment, not in the body. Ask for changes in plain words until it reads right.

  5. Add images or a PDF, if you want them

    Up to 20 images in one post, or one PDF, PowerPoint or Word file on its own, which LinkedIn shows as a document readers swipe through. LinkedIn fetches files from a link, so a file on your disk goes through an upload page: Gemini asks for one (create_upload_link, up to 100 MB on the free plan and 1 GB on paid plans), you pick the files there, and get_uploaded_file hands Gemini their links. A file that is already online goes as its public https link.

  6. Publish now, or schedule it

    Say "post it" and Gemini calls post_to_social; the result carries the link to the live post and the first comment's status. Say "schedule it for Tuesday at 8:30" and it calls schedule_post, or uses run_at: "next_slot" for your next free posting hour. Gemini CLI shows the call and waits for you to allow it. This is the call:

    {
      "name": "schedule_post",
      "arguments": {
        "platforms": ["linkedin"],
        "per_platform": { "linkedin": {
          "text": "We shipped CSV export for invoices this week.\n\nIt took three tries. …\n\n#buildinpublic #saas #devtools",
          "first_comment": "The release notes: https://example.com/changelog/v3-1"
        } },
        "run_at": "2026-11-17T08:30:00-05:00"
      }
    }
  7. Check the queue

    "What's scheduled on LinkedIn?" calls list_scheduled_posts and "cancel Tuesday's post" calls cancel_scheduled_post; the same queue is on the dashboard's Queue page.

From a release script, gemini -p "write the LinkedIn post for the latest tag from CHANGELOG.md and schedule it for 8:30 tomorrow" runs the same request without the chat screen; the key header and the tool allowlist for that are on the Instagram guide. Prefer to set it up by hand? Open the dashboard, connect LinkedIn under Accounts and copy your key under API & MCP. All Gemini CLI clients: Gemini CLI setup.

Ways to post to LinkedIn from Gemini, side by side

How each service plugs into Gemini and what it costs to start, read on its own Gemini, LinkedIn and pricing pages on Nov 11, 2026.

ServiceHow it plugs into Gemini CLISign-inFree to startCheapest paid plan
PostWiregemini mcp add with https://postwire.io/api/mcp/mcp auth postwire in the browser, or a key headerFree plan: 1 business, 10 posts a month, 5 AI drafts a day, 2 networks per post, no card$19/mo — 3 businesses, every network in each post
Postizgemini extensions install with its GitHub extensionBrowser sign-in on the first call7-day free trial$29/mo — 5 channels
Upload-PostA block in ~/.gemini/settings.json with its MCP URLAn API key in a headerFree plan of 10 uploads a month; its free-plan network list names LinkedIn$24/mo — 5 profiles

Checked on Nov 11, 2026 (2026-11-11) on each vendor's own pricing or docs page, linked in the first column and below. Monthly billing in USD unless noted. "Not listed" means we could not find it on their page, not that it is missing.

Where PostWire is ahead

  • The post is written for LinkedIn: generate_posts puts the hook in the first 210 characters, keeps the link out of the body and in the first comment, and writes every other network's version from the same idea in the same request.
  • A free plan with no time limit: 10 posts a month, no card, MCP included. Postiz starts with a 7-day trial.
  • The cheapest paid plan here: $19 a month for 3 businesses. Upload-Post $24 for 5 profiles, Postiz $29 for 5 channels.
  • Sign in without pasting a key into a config file: /mcp auth postwire opens the browser, and the key is there for scripts that need it.
  • A week of posts in one call: plan_week drafts up to 7 days of LinkedIn posts, each from a different angle, for you to review before anything is queued.
  • A person approves what Gemini queued: on paid plans, approval rules hold the post until you approve it from an emailed link.
Sources, all read on Nov 11, 2026:
  • Postiz — Schedule Social Media Posts with Gemini ("One command installs the Postiz extension in Gemini CLI": gemini extensions install https://github.com/gitroomhq/postiz-agent; "Gemini opens your browser to sign in to Postiz"; Instagram and LinkedIn in its platform list; "Postiz starts with a 7-day free trial, then plans run from $29 per month for 5 channels"): postiz.com/gemini
  • Postiz pricing ("Start with a 7-day free trial"; Standard $29 a month, 5 channels): postiz.com/pricing
  • Upload-Post — Post to Social Media with Gemini ("Add one block to ~/.gemini/settings.json" with httpUrl https://mcp.upload-post.com/mcp and an "Authorization: ApiKey" header; "Start free, no card"): www.upload-post.com/gemini-social-media/
  • Upload-Post — LinkedIn MCP server ("One hosted server at mcp.upload-post.com/mcp. Sign in with OAuth or paste an Upload-Post API key"; text posts, PDF documents, images and video): www.upload-post.com/mcp/linkedin/
  • Upload-Post llms-full.txt (Free plan: 10 uploads a month, no credit card, "platforms without TikTok (Instagram, LinkedIn, YouTube, Facebook, …)"; Basic $24 a month, 5 profiles): www.upload-post.com/llms-full.txt
  • Gemini CLI docs — MCP servers (gemini mcp add, --scope, /mcp auth, httpUrl, headers, trust, includeTools): github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md
  • Gemini CLI docs — GEMINI.md context files (global ~/.gemini/GEMINI.md and workspace GEMINI.md files, sent "to the model with every prompt"; /memory show, /memory reload): github.com/google-gemini/gemini-cli/blob/main/docs/cli/gemini-md.md

What to say in Gemini CLI, and what LinkedIn receives

You sayGemini callsLinkedIn receives
"Post the release notes on my LinkedIn"generate_posts, then post_to_socialA text post, with the link in the first comment
"Post ./docs/launch-deck.pdf with it"create_upload_link, then post_to_socialA document post readers swipe through
"Add the three screenshots in ./assets"create_upload_link, then post_to_social with the imagesOne post with the 3 images
"Schedule it for Tuesday at 8:30"schedule_post with run_atThe same post, at that time
"Plan next week of LinkedIn posts about the launch"plan_weekUp to 7 days of posts, a different angle each day
"Post a tip every Monday at 9"create_recurring_post (paid plans)The post, every Monday at 9

Source: PostWire's MCP server and LinkedIn publisher, read Nov 11, 2026. Every LinkedIn tool and limit: LinkedIn MCP server.

Keep your LinkedIn voice in GEMINI.md

Gemini CLI reads a context file named GEMINI.md and sends it to the model with every prompt: ~/.gemini/GEMINI.md for all your projects, and a GEMINI.md in the project folder for that project. Put the rules for your LinkedIn posts there once, and "post the release on LinkedIn" comes out in your voice each time, with no prompt to paste:

# LinkedIn posts (postwire tools)
- First person, as the founder.
- Plain words. No "thrilled to announce".
- Start from what changed for the
  customer, then how we built it.
- Versions and dates come from
  CHANGELOG.md. Never invent a metric.
- The link goes in first_comment,
  never in the post text.
- Always show me the draft first.
- Schedule for 8:30 on a weekday with
  schedule_post. Call post_to_social
  only when I say "post it now".

Gemini passes your angle to generate_posts, which adds LinkedIn's own shape: the hook in the first 210 characters, short blocks, 3 hashtags. /memory show prints the context Gemini has loaded, and /memory reload picks up an edit without restarting. A team that keeps GEMINI.md in the repo shares one voice across everyone who posts.

Source: Gemini CLI's GEMINI.md docs, read Nov 11, 2026.

LinkedIn's rules Gemini works within

  • Up to 3,000 characters in the post and 1,250 in the first comment. If the first comment fails, the post stays published and the comment is retried.
  • Images or a document, not both: 1 to 20 images, or one PDF, PowerPoint or Word file on its own.
  • Your personal profile, through LinkedIn's official API and the permission you grant on LinkedIn's own page. No browser automation and no password.

What Starter ($19 a month) adds for LinkedIn

Three LinkedIn posts a week is about 13 a month, past the free plan's 10 and its 3 waiting posts. With Starter:

  • No limit on the queue and 1,000 posts a month, so a whole month of LinkedIn posts can wait in line.
  • 25 recurring posts (create_recurring_post), for the weekly slot you never want to miss.
  • 3 businesses, each with its own LinkedIn profile and its own networks, plus every network in each post.
  • Approvals: what Gemini queues waits until you approve it from an emailed link.

Paid plans have a 14-day refund.

What it does not do

PostWire posts to personal LinkedIn profiles. It does not post to company pages, it does not upload video to LinkedIn, and it does not read or answer comments or messages. To post a video, send it to YouTube, TikTok or Instagram in the same request. This guide is for Gemini CLI, Google's terminal agent; PostWire has not been tested as a custom app in the Gemini web app at gemini.google.com, so this page makes no claim about it.

Questions people ask

Can Gemini post to LinkedIn?

Yes, from Gemini CLI with an MCP server. Gemini has no LinkedIn access of its own; with PostWire added (gemini mcp add -s user --transport http postwire https://postwire.io/api/mcp), a sign-in with /mcp auth postwire and your LinkedIn profile connected once, it writes the post and publishes or schedules it on your personal profile when you ask.

Can Gemini CLI schedule LinkedIn posts?

Yes. It calls schedule_post with a time up to 365 days ahead, or "next_slot" for your next free posting hour, and PostWire publishes the post at that time with Gemini closed, first comment included. The free plan keeps 3 posts waiting at once; paid plans have no such limit.

Do I need a LinkedIn developer app or API key?

No. PostWire's own LinkedIn app does the posting: you sign in on LinkedIn's page and press Allow. Gemini CLI holds only a PostWire sign-in, made with your email and a 6-digit code, or your PostWire key in a script.

How do I make Gemini write LinkedIn posts in my voice?

Write your rules in GEMINI.md, the context file Gemini CLI sends with every prompt: ~/.gemini/GEMINI.md for all projects, or a GEMINI.md in the project folder. Say who is speaking, which words to avoid, that the link goes in the first comment, and that Gemini shows the draft before it schedules.

Can Gemini post a PDF carousel to LinkedIn?

Yes. One PDF, PowerPoint or Word file is posted as a LinkedIn document readers swipe through, or up to 20 images in one post. A file on your disk goes through an upload page that Gemini asks for. Video is not posted to LinkedIn.

Can it post to a LinkedIn company page?

Not through PostWire: it posts to personal LinkedIn profiles. The same idea can go to Bluesky, a Facebook Page, X (on paid plans) and the other networks in the same request.

Does it work in the Gemini app at gemini.google.com?

This guide covers Gemini CLI, where PostWire's sign-in was checked. PostWire has not been tested as a custom app in the Gemini web app. In the browser, Claude and ChatGPT have PostWire in their app directories: see the Claude and ChatGPT guides.

How much does it cost?

The free plan includes LinkedIn and the MCP server: 1 business, 10 posts a month, 5 AI drafts a day, 2 networks per post, no card. Starter is $19 a month for 3 businesses and Pro $29 for 10, with every network in each post. Paid plans have a 14-day refund.