Skip to content

keryx post

Description

Post a workspace's rendered reel to a social platform. The target is a platform name (instagram/youtube/tiktok/linkedin), all (every enabled + approved platform), or due (the approved platforms whose schedule has arrived — the unattended CI entrypoint).

Posting is gated and idempotent:

  • Refused unless approved (keryx approve first) — the accidental-posting guard (R-POST-2).
  • An already-posted platform is a no-op unless --force (R-POST-3); on success it records posted + posted_at + post_url in social.json.
  • --dry-run validates auth + the rendered reel against the platform's limits and posts nothing (R-POST-1).
  • post all posts each platform independently — one platform failing doesn't abort the others, and the run exits non-zero if any failed (R-POST-5..8).
  • post due is the only command CI runs unattended (R-POST-13).

The reel is the workspace's reel-<slug>.mp4 (reel build's output); per-platform copy comes from social.json (keryx social).

Usage

keryx post <platform|all|due> --workspace <slug> [--dry-run] [--force]

Platform adapters land incrementally (Instagram → YouTube → TikTok → LinkedIn); a platform with no compiled-in adapter reports clearly. The approval gate, idempotency, scheduling, and fan-out work today against the posting state machine.

Instagram (available)

The Instagram Reels adapter posts to a Professional (Business/Creator) account under Standard Access (no App Review). Configure:

  • platforms.instagram.enabled: true and platforms.instagram.user_id: <id> in config (non-secret).
  • INSTAGRAM_ACCESS_TOKEN in the environment (a long-lived token with instagram_business_content_publish) — never committed; keryx auth instagram will capture it (auth lands next).

It runs the container-publish flow with the resumable direct upload (no public URL): create a REELS container → upload → poll to FINISHED → publish → record the permalink. The caption is the platform's text + hashtags.

Flags

Flag Description Default Required
--workspace reel workspace slug
--dry-run validate only; post nothing
--force re-post an already-posted platform