How to Schedule Tweets From the Terminal (2026 CLI Guide)

The old command-line Twitter clients died with the API changes. Here is what works in 2026: one CLI that schedules to X and 8 other networks.

The short version

The classic command-line Twitter clients (t, TTYtter and friends) died when X locked down its free API. In 2026 the working approach is a CLI backed by a scheduler that holds the X connection: npx posthell-cli publishes and schedules to X plus 8 other networks, no developer account needed.

There is a graveyard of command-line Twitter clients on the internet, and most guides you will find still point at it. This is the 2026 version: what actually still works, and how to schedule posts to X (and everywhere else) without leaving your terminal.

Why did the old CLI Twitter tools stop working?#

They were built on free API access that X removed. When the X API moved to paid, metered tiers in 2023, clients like t, TTYtter and its forks lost their foundation.

The pattern repeats across every old tutorial: install a Ruby gem or a Perl script, create your own Twitter app, paste four OAuth keys into a dotfile. Step two is where it dies now; the developer tier those tutorials assume either no longer exists or no longer covers a daily posting habit. A few X-only posting CLIs have appeared to fill the gap, but they stop at one network.

What is the working setup in 2026?#

A CLI backed by a scheduler. The scheduler holds the API relationship with X (and 8 other networks); the CLI is a thin client that authenticates with one key.

posthell works this way. You connect your accounts once through their normal logins, create an API key in the dashboard, and then:

export PH_API_KEY=ph_xxx

# post now, to every network you pass
npx posthell-cli publish "shipped thread media support today" -p x,linkedin,threads

# or schedule it (ISO 8601)
npx posthell-cli publish "new build log is up" -p x -s 2026-07-10T09:00:00Z

# or queue a draft to approve later from the dashboard
npx posthell-cli draft "rough notes about today's refactor"

JSON comes back on stdout (pipe it to jq), errors exit non-zero, and there is no X developer account anywhere in the flow. What an X post costs is simple: it counts as one post toward your plan, the same as a post to any of the other 8 networks (the X API pricing story explains why that is not a given).

What can you do with a posting CLI that a web app cannot?#

Put posting where your work already happens: deploy scripts, cron, CI, and the same terminal your coding agent lives in.

Workflow How it looks
Ship-day announcement Deploy script drafts a post when you push a release tag
Weekly build-in-public update Friday cron queues a draft from your changelog
Content pipeline A script bulk-schedules a week of posts from a file
AI agent posting Claude Code or Cursor drives the same tools over MCP

That last row is the design decision that matters: posthell-cli is a thin wrapper over the same MCP server that AI agents use. Same auth, same approval rules, same rate limits. Your shell scripts and your agent are first-class citizens of the same system, so nothing you automate today needs rewriting when an agent takes it over tomorrow.

What we learned building the CLI#

We built it after watching agents interact with the MCP server: a CLI costs an agent fewer tokens than composing JSON-RPC by hand, and it gives humans the same power for free. The other lesson was defaults. draft is the safe verb (queues for your approval), publish is the explicit one, and publishing autonomy is a per-key opt-in rather than a flag you can typo. Guardrails belong in the tool, not in a warning in the README.

Where to start#

Run npx posthell-cli help after creating a key; the whole surface is six commands. Wire draft into your deploy script first, because a queued draft costs you nothing if you hate it. And if you want the agent version of this workflow, where you describe what you shipped in plain English instead of flags, that is letting Claude post to social media.

If you would rather schedule from an app than a terminal, see X scheduling with posthell.

Frequently asked questions

Can I still tweet from the command line in 2026?

Yes, but not with the classic clients like t or TTYtter, which broke when X restricted free API access. You need a CLI backed by a service that holds the X connection, such as npx posthell-cli.

Does scheduling tweets from the terminal need an X developer account?

Not with the scheduler-backed approach. You connect your X account to posthell through the normal login once, and the CLI authenticates with a posthell API key instead of X credentials.

Can I post to other networks from the terminal too?

Yes. The same CLI publishes and schedules to 9 networks, including LinkedIn, Threads and Bluesky, from one command. It sends text, so Instagram, TikTok, YouTube and Pinterest, which need a photo or video, are better posted from the app. Every network counts the same toward your plan's monthly posts.

Can I use this in CI or a cron job?

Yes. The CLI is plain JSON on stdout with non-zero exit codes on failure, so it drops into GitHub Actions, cron or any deploy script. A common pattern is drafting a release post automatically when you ship a tag.

Rohan Gotwal
Rohan Gotwal
Founder, posthell

Rohan builds posthell, which writes and schedules social media posts for small businesses. He writes about what to post, when to post it, and how to keep a business's social media going without it taking over the week.

@rohangotwal
Contents
  1. Why did the old CLI Twitter tools stop working?
  2. What is the working setup in 2026?
  3. What can you do with a posting CLI that a web app cannot?
  4. What we learned building the CLI
  5. Where to start

How one line becomes a post for every network

two openings this friday afternoon from a cancellation. maya can do a cut or a blow dry

  • harlowandpine
    harlowandpineTwo openings this Friday afternoon, thanks to a cancellation. Maya can do a cut or a blow dry. First come, first served.
  • Harlow & Pine
    now ·
    A cancellation has opened up two spots this Friday afternoon. Maya has time for a cut or a blow dry in either one. First come, first served.
    Like Comment Share
  • harlowandpinenow
    Two Friday afternoon spots just opened up. Cut or blow dry with Maya, first come first served.

You run the business. posthell writes the posts.

Start 7 days free

Not ready yet? Write an Instagram caption free, no signup.