Post to Lemmy from Codex
Codex can post to Lemmy communities through Postiz. Install the Postiz skill or add the Postiz MCP server to Codex, connect your Lemmy account and instance in Postiz, then name the community. Codex writes the title and body, adds a link for link posts, targets one or several communities, and schedules the post.
Please make sure there is always a human in the loop.
Last updated: September 2026
How do I post to Lemmy from Codex?
Set up Codex once with the Postiz skill or the Postiz MCP server, connect Lemmy in Postiz, then ask. The whole setup takes a few minutes.
Setup, then just ask
# One-time setup, option A: Postiz skill + CLI
npx skills add gitroomhq/postiz-agent
export POSTIZ_API_KEY=your_api_key # or: postiz auth:login
# One-time setup, option B: Postiz MCP server (OAuth, no key)
codex mcp add postiz --url https://mcp.postiz.com/mcp-oauth-dynamic
codex mcp login postiz
# Then just ask Codex:
> Post our update to the technology
Lemmy community tomorrow at 9am
Codex: Done! Your Lemmy post is scheduled.Lemmy-Specific Features
Community Posting
Post directly to any Lemmy community. Target specific communities by name and ID for precise content distribution.
Link Posts
Share URLs alongside your post content. Perfect for sharing articles, resources, and external content with your communities.
Federated Network
Reach users across the entire fediverse. Your posts on one Lemmy instance are visible to federated instances automatically.
Cross-Community Posting
Post to multiple Lemmy communities in a single request. Share content across related communities to maximize reach.
Custom Titles
Set unique titles for each community post. Tailor your headlines to match the culture and expectations of each community.
Scheduled Posting
Schedule posts with precise timestamps. Plan your community engagement ahead of time and post at peak activity hours.
How does Codex post to Lemmy?
You describe what you want in plain language and Codex handles the Postiz calls for you. Here is how a typical conversation goes.
Find Your Lemmy Integration
Ask Codex whether your Lemmy account is connected. It also checks which options the platform supports.
Example conversation
> Is my Lemmy account connected to Postiz?
Codex: Yes — your Lemmy account is connected
and ready. Want me to post something?Choose Your Communities
Identify the Lemmy communities you want to post to. Each community requires a name, ID, and a post title. You can optionally include a URL for link posts.
Example conversation
> Draft a Lemmy post about our new
feature launch
Codex: Here's a draft for Lemmy:
"We just shipped something big..."
Want me to add media and schedule it?Create Your Post
Schedule a Lemmy post with your content, target communities, and optional link URL. Posts can target one or multiple communities at once.
Example conversation
> Yes — add screenshot.png and schedule
it for tomorrow at 9am
Codex: Done! Scheduled on Lemmy for
tomorrow at 9:00 AM.Lemmy Settings Reference
Mention any of these in plain language and Codex sets them for you. These are the Lemmy options it can apply to any post.
| Field | Type | Description |
|---|---|---|
__type | string | Must be "lemmy" |
subreddit | array | Array of community objects: [{value: {subreddit, id, title, url?}}] |
subreddit[].value.subreddit | string | Community name (min 2 characters) |
subreddit[].value.id | string | Community ID on the Lemmy instance |
subreddit[].value.title | string | Post title (min 2 characters) |
subreddit[].value.url | string | Optional URL for link posts |
Common Configurations
Ask Codex for any of these common Lemmy scenarios and it applies the matching settings.
Simple Text Post to One Community
Just ask
> Post it with: Simple Text Post to One Community
Codex: Got it. Applying:
subreddit: {'subreddit': 'technology', 'id': 'comm-123', 'title': 'Interesting discussion on AI agents'}Link Post with URL
Just ask
> Post it with: Link Post with URL
Codex: Got it. Applying:
subreddit: {'subreddit': 'artificial', 'id': 'comm-456', 'title': 'New AI social media scheduler', 'url': 'https://postiz.com'}Cross-Post to Multiple Communities
Just ask
> Post it with: Cross-Post to Multiple Communities
Codex: Got it. Applying:
subreddit: {'subreddit': 'technology', 'id': 'comm-123', 'title': 'AI-powered social media automation'}, {'subreddit': 'SaaS', 'id': 'comm-789', 'title': 'Let an AI agent run your social media'}, {'subreddit': 'artificial', 'id': 'comm-456', 'title': 'An agent-first alternative to Buffer'}What is Codex?
Codex is OpenAI's coding agent. It runs as the Codex CLI in your terminal (npm install -g @openai/codex), as an IDE extension, and in the cloud, and it can run shell commands and call MCP servers, which is how it drives Postiz. Codex is not ChatGPT: ChatGPT is the chat assistant on chatgpt.com and connects to Postiz differently (see the ChatGPT guide). For the full setup, start at the Codex + Postiz hub.
Terminal & IDE Native
Codex runs in your terminal or IDE. You type what you want in plain English and it handles Postiz for you — no extra configuration needed.
Autonomous Execution
Codex runs commands inside a sandbox with approval rules you control, and works through multi-step tasks like discovering channels, uploading media, and scheduling Lemmy posts.
Parallel Tasks
Run multiple Codex tasks simultaneously. Schedule posts to different platforms in parallel while Codex handles other coding work.
How Postiz Works with Codex
Codex discovers Postiz two ways: the postiz skill, which it loads from .agents/skills or ~/.agents/skills and which you can invoke with $postiz, or the Postiz MCP server added with codex mcp add. Either way it learns the available tools and chains them for Lemmy workflows.
- ✓Install the Postiz skill with npx skills add, or add the Postiz MCP server with codex mcp add
- ✓Codex loads skills from .agents/skills and reads SKILL.md to learn the Postiz CLI
- ✓Authenticate with POSTIZ_API_KEY or postiz auth:login; the MCP route uses OAuth instead
- ✓Codex runs commands in its sandbox and asks for approval based on your permission settings
- ✓Works alongside your coding tasks in parallel
Install Postiz
# Install the Postiz skill
npx skills add gitroomhq/postiz-agent
# Set your API key
export POSTIZ_API_KEY=your_api_key
# Or add the Postiz MCP server instead (OAuth, no API key)
codex mcp add postiz --url https://mcp.postiz.com/mcp-oauth-dynamic
codex mcp login postiz
# Then ask, interactively or headless
codex "list my social media integrations"
codex exec "post today's changelog to Lemmy"Lemmy Posting with Codex
Tell Codex what to post from your terminal or IDE — it discovers your integrations via Postiz and handles the entire publishing workflow.
Just Ask Codex
Terminal and IDE integration
Tell Codex what to post from your terminal or IDE — it discovers your integrations via Postiz and handles the entire publishing workflow.
Codex CLI
$ codex "Post to Lemmy about our
new feature launch, schedule for
tomorrow at 9am"
Codex: I'll handle that.
Found your Lemmy integration.
Composing and scheduling the post.
Done! Your post is scheduled.
Post ID: abc-123Parallel Tasks
Multiple tasks at once
Codex can handle multiple tasks in parallel. Schedule posts to different platforms while it works on other coding tasks simultaneously.
Codex Parallel Tasks
# Run multiple posting tasks in parallel
$ codex "Schedule a post about our
launch to X for tomorrow 9am" &
$ codex "Write a LinkedIn article
about our new feature and schedule
for tomorrow noon" &
$ codex "Fix the bug in auth.ts"
# All three tasks run simultaneouslyWhy Codex + Postiz for Lemmy
Codex's autonomous execution makes Postiz a natural fit. The agent reads the SKILL.md to understand every available command, then autonomously chains them together for Lemmy workflows.
- ✓Runs in your terminal or IDE — just type what you want
- ✓Autonomous execution in sandboxed environments
- ✓Parallel task support — post while coding
- ✓Cross-post to multiple communities in a single session
- ✓Share links and articles across the fediverse effortlessly
- ✓Powered by OpenAI's most capable models
SKILL.md (loaded by Codex from .agents/skills)
---
name: postiz
description: Social media automation
CLI for scheduling posts across
30+ platforms including Lemmy
homepage: https://docs.postiz.com/public-api/introduction
---
# Loaded by Codex from .agents/skills
# Invoke explicitly with $postiz
# Available Commands
- postiz integrations:list
- postiz integrations:settings <id>
- postiz posts:create
- postiz upload <file>
- postiz analytics:platform <id>
# Lemmy Settings
subreddit (array of communities),
each with: subreddit, id, title, urlAlso Works with Claude Code
Postiz works with any AI agent that can run commands or call MCP tools — you ask, the agent does the work. That includes Anthropic's Claude Code: see the Claude Code Lemmy guide, or the Postiz Agent page for any other agent.
Claude Code
by Anthropic
Claude reads the Postiz skill so it knows what it can do, then autonomously discovers your Lemmy integration, composes your post with the right community settings, and schedules it.
Claude Code
> Post an article about our new release
to the technology and programming
communities on Lemmy
Claude: Done! Scheduled on Lemmy for
tomorrow at 9:00 AM.Can Codex post to Lemmy and other platforms at once?
Schedule the same content to Lemmy and other platforms in a single request. Each platform gets its own settings.
Example
> Post "Excited to announce our new feature!" to
Lemmy and LinkedIn tomorrow at 9am, then schedule
a daily tip on Lemmy every weekday at 10am
Codex: Done! Scheduled:
- Lemmy + LinkedIn: tomorrow 9:00 AM
- Daily tips on Lemmy: Mon-Fri 10:00 AMWhat can I ask Codex to post on Lemmy?
Codex takes plain-English prompts in an interactive session, as a one-off codex exec command, or through the $postiz skill. These are the kinds of prompts people type for Lemmy.
Prompts for Lemmy
> Post our agent setup guide to the technology community on Lemmy
tomorrow 9am, title "Automate your social media in 10 minutes"
$ codex exec "Share https://github.com/gitroomhq/postiz-app as a link post
to the technology and programming Lemmy communities"
> $postiz What Lemmy communities can I post to? Post the release
notes to the most relevant oneWhat Lemmy rules should Codex follow?
These are the Lemmy limits and required settings Postiz enforces. Codex reads them from postiz integrations:settings, and you can mention any of them in your prompt.
- ✓Each community target needs the community name (min 2 characters), its id, and a post title (min 2 characters).
- ✓url is optional and turns the entry into a link post.
- ✓You can target several communities in one request; each gets its own title.
- ✓Communities are specific to the Lemmy instance your account is connected to.
Codex and Lemmy FAQ
How do I post to Lemmy from Codex?
Install the Postiz skill with npx skills add gitroomhq/postiz-agent, or add the Postiz MCP server with codex mcp add postiz --url https://mcp.postiz.com/mcp-oauth-dynamic. Connect Lemmy in Postiz once, then ask Codex in plain English what to post and when. Codex resolves the Lemmy settings, uploads any media, and schedules the post.
Can Codex post to several Lemmy communities at once?
Yes. The Lemmy settings accept an array of community targets, each with its own community name, id, title, and optional link. Say "post this to technology and programming" and Codex creates one entry per community, adjusting the title for each if you ask. All of them schedule for the same time.
How does Codex find Lemmy community ids?
Through postiz integrations:settings, which returns the communities available to your connected account on its instance with their ids. Codex maps the community name in your prompt to the id and title fields. If a community is on another instance and not returned, Codex tells you instead of guessing.
Can Codex post to Lemmy on a schedule without me watching?
Yes. Postiz stores scheduled Lemmy posts and publishes them at the chosen time, so Codex does not need to stay open. For unattended runs, call codex exec with your prompt from a script or cron job. Keep a human reviewing the output, since Codex will publish exactly what it is told to publish.
Do I need a Postiz API key to post to Lemmy from Codex?
Not with the MCP route. Run codex mcp login postiz and Codex signs in to your Postiz account over OAuth, so it only reaches channels you already connected, including Lemmy. The CLI skill route needs either postiz auth:login or a POSTIZ_API_KEY environment variable. Your Lemmy login itself never leaves Postiz.
Is posting to Lemmy from Codex the same as posting from ChatGPT?
No. Codex is OpenAI's coding agent for your terminal and IDE, and it reaches Postiz through the Postiz skill or MCP server. ChatGPT is the chat assistant on chatgpt.com, which connects to Postiz as an app or custom MCP connector. Both can publish to Lemmy; see the ChatGPT guide for that setup.
Related Codex and Lemmy guides
Start at the Codex hub for setup, or jump to another platform Codex can post to through Postiz.
Codex + Postiz overview
→Setup, skill vs MCP comparison, codex exec automation, and FAQ for OpenAI Codex.
Post to Reddit from Codex
→Reddit settings, prompts, and rules for Codex.
Post to Warpcast from Codex
→Warpcast settings, prompts, and rules for Codex.
Post to Moltbook from Codex
→Moltbook settings, prompts, and rules for Codex.
Post to Dev.to from Codex
→Dev.to settings, prompts, and rules for Codex.
Lemmy channel on Postiz
→How Postiz connects to Lemmy, features, and setup outside of any agent.
Postiz MCP server
→The OAuth MCP endpoint Codex, ChatGPT, Claude, and Cursor can all connect to.
Postiz Agent CLI
→The postiz CLI and skill that any AI agent can drive from a shell.
Post to social media from ChatGPT
→The chat-app route, for when you are not in a terminal.
Postiz pricing
→7-day free trial, with MCP, CLI and API access on every plan.
Start posting to Lemmy
Install Postiz Agent and automate your Lemmy community engagement with AI-powered scheduling and publishing.