#!/bin/sh # Quit the current Grok TUI first (/quit), then run this from a normal shell. # Brings up the Mongo tunnel and resumes the latest session in this workspace. set -eu ROOT="$(CDPATH= cd -- "$(dirname "$0")/.." && pwd)" cd "$ROOT" export PATH="$HOME/.npm-global/bin:$PATH" if [ -f "$HOME/.mcp-env" ]; then # shellcheck disable=SC1091 . "$HOME/.mcp-env" fi "$ROOT/scripts/ensure-mongo-tunnel.sh" if ! command -v grok >/dev/null 2>&1; then echo "grok is not on PATH" >&2 exit 1 fi echo "starting grok --resume in $ROOT" echo "after it opens: /mcps (press r to refresh) then /zapier-build" exec grok --resume