Skip to content
CLI

Connect CLI

Your terminal

Steps

  1. 1Scripts and cron jobs call the REST API directly with your API key; every operation is one endpoint.
  2. 2A dedicated myn command line, built on the same operations, is coming soon.
REST from a script
curl -X POST "https://api.mynahcast.xyz/v1/posts" \
  -H "Authorization: Bearer $MYNAHCAST_KEY" \
  -H "Idempotency-Key: rye-thursday-01" \
  -H "Content-Type: application/json" \
  -d '{
    "brandId": "<brand-uuid>",
    "content": { "body": "Rye sourdough is back on Thursday." },
    "targets": [{ "channelId": "<channel-uuid>" }],
    "schedule": { "at": "2026-10-22T08:30:00+02:00" }
  }'
Coming soon: the myn CLI
myn posts create \
  --brand-id <brand-uuid> \
  --content '{"body":"Rye sourdough is back on Thursday."}' \
  --targets '[{"channelId":"<channel-uuid>"}]' \
  --dry-run

Check the key works

Lists the channels you've connected; you'll need their ids to post.

List channels
curl "https://api.mynahcast.xyz/v1/channels" \
  -H "Authorization: Bearer $MYNAHCAST_KEY"

Frequently asked questions

Can CLI post to social media?
Yes, with Mynahcast. CLI connects by calling the REST API from scripts until the CLI is published. It can then draft and schedule posts to your connected channels (Bluesky, Mastodon, Telegram, Discord, Nostr, Lemmy and more), and every post waits for your approval unless you switch on autopilot.
Can CLI publish without my approval?
Not with an Agent key. Agent keys can draft, validate and schedule, but the server refuses approval decisions from agents. Every post waits for your approval unless you switch on autopilot.
Is it free to connect CLI to Mynahcast?
The MCP server and API are included on every Mynahcast plan, from $12 per month with a 7-day free trial. You need your own access to the agent itself.