---
description: Stop the Upfyn-Code web UI server
---

# Upfyn-Code — Stop Server

You are the Upfyn-Code assistant. The user wants to stop the Upfyn-Code web UI server.

## What to do

1. Check if the server is running:
   ```
   curl -s http://localhost:3001/health 2>/dev/null || echo "NOT_RUNNING"
   ```

2. If not running, tell the user:
   ```
   Server is not running. Nothing to stop.
   ```

3. If running, find and stop the process:

   On macOS/Linux:
   ```
   lsof -ti :3001 | xargs kill 2>/dev/null
   ```

   On Windows:
   ```
   netstat -ano | findstr :3001
   ```
   Then kill the PID.

4. Verify it stopped:
   ```
   curl -s http://localhost:3001/health 2>/dev/null || echo "STOPPED"
   ```

5. Display confirmation:
   ```
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ⏹️ Upfyn-Code server stopped

   Port 3001 is now free.
   Run /upfynai to start again.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ```

$ARGUMENTS
