exposelisted
Install: claude install-skill stevengonsalvez/agents-in-a-box
# /expose - Expose Local Services via Tailscale
Expose a local service on Tailscale with a unique path, preserving the root path for the main application.
## Usage
```
/expose <port> [service-name]
```
## Examples
```
/expose # Auto-detects running dev server and exposes it
/expose 3000 # Exposes localhost:3000 with auto-generated path
/expose 8080 api # Exposes localhost:8080 as /api
/expose 5173 vite-app # Exposes localhost:5173 as /vite-app
```
## Implementation
When called, this command will:
1. **Auto-Detect Dev Server (if no port specified)**
- Search for common dev server ports: 3000, 3001, 4200, 5173, 5174, 8000, 8080, 8081
- Check for running processes with common dev commands: `npm run dev`, `yarn dev`, `vite`, `next dev`
- Use `lsof` to find the actual port being used
- If multiple found, prompt user to choose
2. **Check Tailscale Status**
- Verify Tailscale is running
- Get current Tailscale IP and hostname
3. **Generate Unique Path**
- If service-name provided: use `/service-name`
- Otherwise: generate random path like `/svc-<random-8-chars>`
- Ensure path doesn't conflict with existing services
3. **Preserve Root Path**
- Never override the root path `/`
- Keep track of which service owns root (if any)
4. **Expose Service**
```bash
tailscale serve --set-path /<unique-path> --bg http://localhost:<port>
```
5. **Store Service Mapping**
- Save to `.claude/tailscale-servi