content-distribution

v2.2.1
io.github.AutomateLab-tech/content-distribution Checked 4 days ago Published 6 months ago

Publish content to DEV.to, Hashnode, GitHub Discussions, Reddit, Bluesky, LinkedIn, and Medium.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

post.publish Publish variants to one or more channels immediately

Publish one or more channel variants immediately. Side effects: makes external HTTP requests to each channel platform; writes publish state to the local YAML backend; requires valid credentials in the named profile. Idempotent on (content.id, channel) — re-running with the same IDs returns cached state without re-posting. Use post.publish for immediate-only delivery; use post.schedule when any variant needs a future schedule_at; use post.drain to flush a previously built queue.

ParameterTypeDescription
content *object
profile_name *stringName of the distribution profile (credentials store). Use profile.list to discover available names.
variants *array

post.schedule Schedule variants for future publishing

Enqueue channel variants with schedule_at for future publishing; variants without schedule_at are published immediately. Side effects: writes entries to the local YAML schedule store; makes external HTTP requests for any immediately-published variants; requires credentials in the named profile. Idempotent on (content.id, channel). Use post.schedule when any variant needs a future publish time; use post.publish for all-immediate delivery; use post.drain to process the scheduled queue later.

ParameterTypeDescription
content *object
profile_name *stringName of the distribution profile (credentials store). Use profile.list to discover available names.
variants *array

post.drain Fire all scheduled posts due now

Fire all scheduled posts due at or before the given time boundary. Side effects: makes external HTTP requests for each due entry; writes results to the YAML backend. Idempotent — already-published (content.id, channel) pairs are skipped; no-op when no entries are due. Safe to call from cron. Use post.drain on a recurring schedule to flush the queue; use post.publish or post.schedule to add new content; use post.status to inspect results after drain runs.

ParameterTypeDescription
nowstringISO-8601 datetime boundary, e.g. '2026-05-21T09:00:00Z'; defaults to current UTC time when omitted.

post.status Read publish state for content pieces

Return publish state for content pieces. Filters by content_id, channel, or both; returns all entries when neither is given. Side effects: read-only; no external HTTP calls; no auth needed. Deterministic given unchanged backend state. Use post.status to inspect what has been published, what is queued, or what errored; use post.publish, post.schedule, or post.drain to change state.

ParameterTypeDescription
channelstringFilter to a specific channel slug, e.g. 'devto', 'reddit:ClaudeAI'; omit to return state for all channels.
content_idstringFilter to a specific content piece by its stable ID; omit to return state for all content.

post.unpublish Retract a published post (best-effort)

Best-effort delete of a published post on the target platform. Side effects: makes an external HTTP DELETE or update request; DEV.to sets published=false (soft delete); platforms without a delete API return success=false without error. Non-idempotent — calling on an already-deleted URL may return a platform 404. Use post.unpublish to retract a live post; use post.status first to obtain the live_url; use post.publish to re-publish after an unpublish.

ParameterTypeDescription
channel *stringChannel slug the post was published to, e.g. 'devto', 'hashnode', 'reddit:ClaudeAI'.
live_url *stringURL of the live published post to retract, e.g. 'https://dev.to/user/post-slug'.

channel.hints Static per-channel metadata

Return static per-channel metadata: character limits, Markdown support flags, tag vocabulary, and CTA placement rules. Side effects: read-only; no external HTTP calls; no auth needed. Fully deterministic — returns compile-time adapter constants. Use channel.hints before composing a variant body to understand channel constraints; use post.publish or post.schedule once you have a valid variant.

ParameterTypeDescription
channel *stringChannel platform name, e.g. 'devto', 'reddit', 'hashnode', 'bluesky'. Use the platform prefix only, not the full 'platform:account' form.

profile.list List configured distribution profiles

Return all distribution profile names configured in the YAML backend. Side effects: read-only; no external HTTP calls. Deterministic given backend state. Use profile.list to discover available profiles before calling post.publish, post.schedule, or subreddit.list; then pass the chosen name as profile_name.

subreddit.list List Subreddit Catalog entries

Return all subreddits in the Subreddit Catalog with cooldown windows, flair vocabulary, and last-posted metadata. Optionally filtered to subreddits allowed by the named profile. Side effects: read-only; no external HTTP calls. Deterministic given backend state. Use subreddit.list to select a subreddit and obtain flair IDs before composing a reddit: channel variant; pass flair in variant.extras.flair.

ParameterTypeDescription
profile_namestringOptional profile name to filter subreddits to those allowed by that profile; omit to return the full catalog.