Deploy/Codex CLI
OpenAI

Deploy a Codex CLI app to production

OpenAI's Codex CLI is a terminal agent that edits files and runs commands locally. Launchmatic gives Codex a single command — `lm deploy` — that takes whatever it just built and puts it in production.

Why Launchmatic for Codex CLI

Codex CLI is great at writing code, indifferent to packaging it. Launchmatic's Nixpacks-powered detector handles the Dockerfile, build, and runtime selection, so Codex never has to learn your hosting setup.

Deploy in 5 steps

  1. 1
    Run Codex CLI in your project: codex.
  2. 2
    After it finishes, commit and push to GitHub.
  3. 3
    Install + authenticate: npm i -g @launchmatic/cli && lm login.
  4. 4
    Bind the repo to Launchmatic: lm init for a single-service project, or lm monorepo init if Codex scaffolded an apps/services workspace.
  5. 5
    Deploy: lm deploy (single) or lm up (every service in the monorepo manifest).
  6. 6
    Optional: add Launchmatic's MCP server so Codex can deploy directly: codex mcp add launchmatic https://launchmatic.io/mcp.

End-of-Codex-session deploy hook (single service):

# Add to ~/.codex/hooks/post-session.sh
[ -f .launchmatic.json ] || lm init --yes
git add . && git commit -m "codex: $(date +%s)" || true
git push && lm deploy

FAQ

Can Codex deploy without me running the command?+

Yes — register Launchmatic's MCP server with Codex (`codex mcp add launchmatic https://launchmatic.io/mcp`) and Codex can call our `deploy` tool directly inside a session.

Ready to deploy?

Free to start. No credit card. Auto-SSL on custom domains, managed Postgres, and per-branch preview deploys included.

Other deploy guides