Turn Gemini CLI into a Server with Custom Slash Commands

Опубликовано: 14 Март 2026
на канале: John Capobianco
1,355
40

In this video, we take Gemini CLI beyond a terminal toy and turn it into a real server that listens for webhooks, responds with AI, and plugs into your chat stack. You’ll build custom slash commands (/listen:start, /listen:status, /listen:stop), run a detached listener that forwards inbound events to Gemini, test it with cURL, and integrate with Slack, Teams, Discord, Webex, and even Streamlit apps.

Create custom Gemini CLI commands in ~/.gemini/commands/*
Start a background webhook listener: /listen:start, /listen:status, /listen:stop
Forward any JSON webhook → Gemini → structured AI reply
Test end-to-end with cURL (and ngrok)
Add Slack slash command (/gemini) with the 3-second ACK pattern
Patterns for Teams/Discord/Webex & embedding into Streamlit frontends

listen.js — zero-dependency Node HTTP server:

Slash commands (TOML):
/listen:start — launch listener detached, log to /tmp/gemini-listen.log
/listen:status — clean one-liner status (Running / Not running)
/listen:stop — stop by PID

Git Repo: https://github.com/automateyournetwor...

#geminicli #ModelContextProtocol #MCP #AI #Agents #Webhooks #SlackBots #Teams #Discord #Webex #Streamlit #DevOps #Automation #AIOps #Terminal

If this helped, like & subscribe!