twilio-opencode

A lightweight express server to handle Twilio voice and messaging webhooks for prompting Opencode.
git clone https://unitehenry.com/git/twilio-opencode.git
Log | Files | Refs | README | LICENSE

commit 5b113cf169db63d6623830450fa9df906bdad9e5
parent 8885b3d3026b007c9a84d16ac86b300cd35a4969
Author: Henry Unite <henry@getpoint.io>
Date:   Wed,  4 Mar 2026 11:23:13 -0800

feat: ngrok script

Diffstat:
Ascripts/ngrok.sh | 27+++++++++++++++++++++++++++
1 file changed, 27 insertions(+), 0 deletions(-)

diff --git a/scripts/ngrok.sh b/scripts/ngrok.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +# Start ngrok in background +ngrok http 3000 & +NGROK_PID=$! + +# Wait for ngrok to be ready +sleep 2 + +# Start serve in background +scripts/serve.sh & +SERVE_PID=$! + +# Configure via the tunnel +curl -X POST \ + "$(curl -s http://127.0.0.1:4040/api/tunnels | grep -oE 'https://[^"]+')/configure" \ + -d "{ + \"twilioAccountSid\": \"$TWILIO_ACCOUNT_SID\", + \"twilioPhoneNumberSid\": \"$TWILIO_PHONE_NUMBER_SID\", + \"twilioAuthToken\": \"$TWILIO_AUTH_TOKEN\"} + " + +# Trap to kill background processes on script exit +trap "kill $NGROK_PID $SERVE_PID" EXIT + +# Wait for background processes +wait $NGROK_PID $SERVE_PID