Show Build deployed status in CLI (using git push)

Do you hate having to go ALL THE WAY to the Vercel Deployment Dashboard to see when your latest build has successfully deployed! Well, your troubles are over. Just create a gpush function (I am on macOS so I put it in .zshrc and now after you gpush from your CLI (even shorter than git push!) your terminal will let you know as soon as your build is live, saving you precious seconds of context switching.

Seriously though, I did find this annoying and glad I found a way to fix it:

gpush() {
  git push "$@"
  echo "Waiting for Vercel deploy..."
  sleep 5
  url=$(vercel ls 2>&1 | grep -o 'https://[^ ]*' | head -1)
  
  if [ -z "$url" ]; then
    echo "❌ Could not find deployment URL"
    return 1
  fi
  
  vercel inspect "$url" --wait
  echo "✅ Build deployed"
}
1 Like