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 approvefirst) — the accidental-posting guard (R-POST-2). - An already-
postedplatform is a no-op unless--force(R-POST-3); on success it recordsposted+posted_at+post_urlinsocial.json. --dry-runruns the same pre-flight a real post does and posts nothing (R-POST-1): the platform's media contract (a reel adapter refuses a post with no video, 0060 D3), the rendered reel's presence, and the copy against the platform's constraints. It then reports whether a credential was there to construct the publisher, ascredentials: presentorcredentials: absent, and passes either way, so a pipeline holding no secrets can still prove a set is sendable.post allposts 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 dueis 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¶
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.
With an object store configured (spec 0039), post first pulls any media that
media.lock pins but is missing locally — the rendered reel included — so a
fresh CI clone posts without an explicit keryx media pull.
Instagram (available)¶
The Instagram Reels adapter posts to a Professional (Business/Creator) account under Standard Access (no App Review). Configure:
platforms.instagram.enabled: trueandplatforms.instagram.user_id: <id>in config (non-secret).INSTAGRAM_ACCESS_TOKENin the environment (a long-lived token withinstagram_business_content_publish) — never committed;keryx auth instagramwill 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 |
run the pre-flight, report credential presence, post nothing | ||
--force |
re-post an already-posted platform |