con un clic
trent-local-voice-server-prod
// Deploy the local voice development server with ngrok for outbound calling. Use when the user asks to test voice locally, start the voice server, or debug voice calls.
// Deploy the local voice development server with ngrok for outbound calling. Use when the user asks to test voice locally, start the voice server, or debug voice calls.
Building terminal UI tools with Bubble Tea and the shared trenthaines.dev/tui package. Use when creating TUI pickers, popups, or any interactive terminal tools — covers the shared package, layout patterns, testing, chezmoi integration, and known gotchas.
Create and manage PDF annotations in Obsidian using the Annotator plugin. Use when user asks to annotate, highlight, or comment on a PDF in their vault. Sub-skill of obsidian.
Help with Obsidian Zettelkasten vault management - search, create, edit, and organize notes in the user's personal knowledge base with 1200+ notes. Use when the user asks about their Zettelkasten, vault, notes, knowledge management, or wants to create/modify markdown notes in ~/Documents/Zettelkasten. (project, gitignored)
Generate daily activity summaries from Claude Code logs. Use when the user asks for a daily summary, work log, what they did today/yesterday, or activity report.
Deploy the duet local development server pointing to production (DECAGON_ENV=prod). Use when the user asks to start the local server against prod, run the dev environment with prod, or test locally against production.
Deploy the duet local development server (backend + frontend) in tmux panes. Use when the user asks to start the local server, run the dev environment, or start backend/frontend.
| name | trent-local-voice-server-prod |
| description | Deploy the local voice development server with ngrok for outbound calling. Use when the user asks to test voice locally, start the voice server, or debug voice calls. |
Deploy the local voice development server with ngrok tunnel for outbound calling. This runs:
ngrok http 8080curl -s http://localhost:4040/api/tunnels | jq -r '.tunnels[0].public_url'DECAGON_ENV=prod VOICE_OUTBOUND_BASE_URL=<ngrok-url> uvicorn backend.server_cs.voice_server:app --reload --port 8080DECAGON_ENV=prod uvicorn backend.server_cs.server:app --reload --port 8000cd frontend && DECAGON_ENV=prod yarn run dev --webpackCreates 4 NEW panes (leaves Claude Code pane untouched):
[Claude] | [ngrok] | [backend]
| [voice] | [frontend]
# Create 4 NEW panes - don't touch the original Claude Code pane
# 1. Split right for ngrok
NGROK_PANE=$(tmux split-window -h -P -F '#{pane_id}')
# 2. Split ngrok down for voice
VOICE_PANE=$(tmux split-window -v -t "$NGROK_PANE" -P -F '#{pane_id}')
# 3. Split ngrok right for backend
BACKEND_PANE=$(tmux split-window -h -t "$NGROK_PANE" -P -F '#{pane_id}')
# 4. Split voice right for frontend
FRONTEND_PANE=$(tmux split-window -h -t "$VOICE_PANE" -P -F '#{pane_id}')
# Layout is now:
# [Claude] | [ngrok] | [backend]
# | [voice] | [frontend]
# 5. Start ngrok
tmux send-keys -t "$NGROK_PANE" 'ngrok http 8080' Enter
# 6. Wait for ngrok to initialize
sleep 4
# 7. Get ngrok URL (retry if needed)
for i in 1 2 3 4 5; do
NGROK_URL=$(curl -s http://localhost:4040/api/tunnels 2>/dev/null | jq -r '.tunnels[0].public_url' 2>/dev/null)
if [ -n "$NGROK_URL" ] && [ "$NGROK_URL" != "null" ]; then
break
fi
sleep 2
done
if [ -z "$NGROK_URL" ] || [ "$NGROK_URL" = "null" ]; then
echo "ERROR: Could not get ngrok URL. Check if ngrok is running."
exit 1
fi
echo "ngrok URL: $NGROK_URL"
# 8. Start voice server (with ngrok URL) - use 'env' for fish shell compatibility
tmux send-keys -t "$VOICE_PANE" "env DECAGON_ENV=prod VOICE_OUTBOUND_BASE_URL=$NGROK_URL uvicorn backend.server_cs.voice_server:app --reload --port 8080" Enter
# 9. Start backend - use 'env' for fish shell compatibility
tmux send-keys -t "$BACKEND_PANE" 'env DECAGON_ENV=prod uvicorn backend.server_cs.server:app --reload --port 8000' Enter
# 10. Start frontend - use 'env' for fish shell compatibility
tmux send-keys -t "$FRONTEND_PANE" 'cd frontend && env DECAGON_ENV=prod yarn run dev --webpack' Enter
echo "Voice development environment started!"
echo "ngrok URL: $NGROK_URL"
echo ""
echo "Layout:"
echo " [Claude] | [ngrok] | [backend]"
echo " | [voice] | [frontend]"
echo ""
echo "To test: Go to http://localhost:3000 -> Preview -> Voice -> Enter phone # and select agent"
ngrok config add-authtoken <token>)