runpod-log is a CLI tool that lets you view RunPod GPU Pod logs directly from your terminal.

Why I Built This

The official RunPod CLI doesn’t have log viewing capabilities. You can only see logs through the web console, which gets inconvenient when running multiple Pods or writing automation scripts. So I built this tool using an unofficial API to bring logs right to your terminal.

Key Features

  • Log retrieval: Fetch both container logs and system logs at once
  • Real-time monitoring: Stream logs to a file with the tail command
  • Automatic authentication: Browser-based auth via Playwright with automatic token refresh

Usage

# Install
pip install runpod-log

# Login (opens browser)
runpod-log login

# Fetch logs once
runpod-log logs <pod-id>

# Real-time monitoring
runpod-log tail <pod-id> ./logs.txt

# Logout
runpod-log logout

How It Works

  1. Authentication: Opens a browser to log into RunPod, capturing JWT tokens from requests to hapi.runpod.net
  2. Token refresh: When tokens expire (~60 seconds), a headless browser automatically fetches new credentials
  3. Log retrieval: Calls https://hapi.runpod.net/v1/pod/{pod_id}/logs API

Session data is stored locally, so you don’t need to log in every time.

Interested?

Useful for integrating with AI agents or building automation scripts to monitor multiple Pods.

👉 github.com/ho4040/runpod-log