Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

codex-whatsappconnect

Run OpenAI Codex against a local repo from WhatsApp.

This project connects:

  • Twilio WhatsApp Sandbox or sender
  • a local codex CLI install
  • one repo on your machine
  • background status messages back to WhatsApp

What It Does

  • receives incoming WhatsApp messages from Twilio
  • runs codex exec against a configured local repo
  • sends start, progress, success, and failure messages back to WhatsApp
  • allows one active job at a time so repo edits do not overlap

Requirements

  • Node 20+
  • codex installed and authenticated locally
  • a Twilio account with WhatsApp Sandbox or a production sender
  • a local repository you want Codex to control

Install

git clone https://github.com/YOUR_GITHUB_USERNAME/codex-whatsappconnect.git
cd codex-whatsappconnect
npm install

Copy the environment template:

cp .env.example .env

Fill in:

  • TARGET_REPO_PATH
  • ALLOWED_WHATSAPP_FROM
  • TWILIO_ACCOUNT_SID
  • TWILIO_AUTH_TOKEN
  • TWILIO_WHATSAPP_FROM

Environment

Example:

PORT=3000
TARGET_REPO_PATH=/absolute/path/to/your/repo
ALLOWED_WHATSAPP_FROM=whatsapp:+15551234567
TWILIO_ACCOUNT_SID=ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TWILIO_AUTH_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
TWILIO_WHATSAPP_FROM=whatsapp:+14155238886
CODEX_BIN=codex
CODEX_MODEL=
CODEX_SANDBOX=workspace-write
CODEX_CONFIG_JSON=[]

Run

Start the webhook server:

npm run dev

Expose it publicly with Cloudflare Tunnel:

npm run tunnel

Cloudflare will print a public URL like:

https://random-name.trycloudflare.com

Use this in Twilio:

https://random-name.trycloudflare.com/twilio/whatsapp

Method: POST

Twilio Setup

  1. Open Twilio WhatsApp Sandbox.
  2. Join the sandbox from your phone.
  3. Set When a message comes in to your public webhook URL.
  4. Make sure ALLOWED_WHATSAPP_FROM matches your WhatsApp number exactly.

Example Prompts

  • list files
  • review
  • what folder are you in
  • find the main app entry point
  • fix the failing tests and summarize what changed

Current Behavior

  • each WhatsApp message starts a fresh codex exec run
  • repo state persists on disk
  • Codex session memory does not persist between jobs

Safety Notes

  • restrict this bridge to one repo at a time
  • keep CODEX_SANDBOX=workspace-write unless you fully trust the environment
  • do not commit your real .env
  • rotate Twilio credentials if they are ever pasted into chat or logs

Roadmap

  • persistent Codex sessions across WhatsApp messages
  • /status, /stop, and /reset commands
  • git diff summaries after each completed job
  • approval gates for dangerous commands
  • support for multiple repos

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages