| Crates.io | gcp-racoon |
| lib.rs | gcp-racoon |
| version | 0.1.3 |
| created_at | 2026-01-10 06:06:52.620421+00 |
| updated_at | 2026-01-14 09:40:22.985298+00 |
| description | GCP Log Spy with Gemini AI |
| homepage | https://github.com/Staninbui/racoon |
| repository | https://github.com/Staninbui/racoon |
| max_upload_size | |
| id | 2033558 |
| size | 273,871 |
GCP Log Spy with Gemini AI
A powerful terminal UI for streaming, querying, and analyzing Google Cloud Platform logs with Gemini powered insights.
Download the latest release for your platform:
# macOS (Apple Silicon)
curl -L https://github.com/Staninbui/racoon/releases/latest/download/gcp-racoon-aarch64-apple-darwin.tar.gz | tar xz
sudo mv gcp-racoon /usr/local/bin/
# macOS (Intel)
curl -L https://github.com/Staninbui/racoon/releases/latest/download/gcp-racoon-x86_64-apple-darwin.tar.gz | tar xz
sudo mv gcp-racoon /usr/local/bin/
# Linux (x86_64)
curl -L https://github.com/Staninbui/racoon/releases/latest/download/gcp-racoon-x86_64-unknown-linux-gnu.tar.gz | tar xz
sudo mv gcp-racoon /usr/local/bin/
# Windows (PowerShell)
Invoke-WebRequest -Uri https://github.com/Staninbui/racoon/releases/latest/download/gcp-racoon-x86_64-pc-windows-msvc.zip -OutFile gcp-racoon.zip
Expand-Archive gcp-racoon.zip -DestinationPath .
Move-Item gcp-racoon.exe C:\Windows\System32\
# Clone the repository
git clone https://github.com/Staninbui/racoon.git
cd racoon
# Build and install
cargo install --path .
cargo install gcp-racoon
# Pull the image
docker pull ghcr.io/staninbui/gcp-racoon:latest
# Run directly
docker run --rm -it \
-v ~/.config/gcloud:/root/.config/gcloud:ro \
-e GEMINI_API_KEY \
ghcr.io/staninbui/gcp-racoon tail --project my-project
# Create an alias for convenience
alias racoon='docker run --rm -it \
-v ~/.config/gcloud:/root/.config/gcloud:ro \
-v ~/.config/racoon:/root/.config/racoon:ro \
-e GEMINI_API_KEY \
ghcr.io/staninbui/gcp-racoon'
# Now use like a normal command
racoon --help
# Coming soon
# brew tap staninbui/tap
# brew install gcp-racoon
Racoon uses your existing GCP credentials. Make sure you're authenticated:
# Using gcloud
gcloud auth application-default login
# Or set service account key
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json
For AI features, set your Gemini API key:
export GEMINI_API_KEY=your-api-key-here
Or add to config file (~/.config/racoon/config.toml):
[ai]
api_key = "your-api-key-here"
# Stream logs in real-time
racoon tail --project your-project-id
# Query logs
racoon query --project your-project-id --filter 'severity>=ERROR'
# List projects
racoon projects
# Check authentication
racoon auth
| Command | Description |
|---|---|
tail |
Stream logs in real-time with TUI |
query |
Execute a one-off log query |
projects |
List accessible GCP projects |
auth |
Verify authentication status |
export |
Export logs to a file |
download |
Quick download logs |
view |
View logs from a local file (offline) |
config |
Manage configuration |
racoon tail --project my-project --since 1h --severity WARNING
| Key | Action |
|---|---|
j / โ |
Move down |
k / โ |
Move up |
g / Home |
Go to first log |
G / End |
Go to last log |
PageDown |
Skip 10 logs down |
PageUp |
Skip 10 logs up |
/ |
Search within logs |
n |
Next search match |
N |
Previous search match |
f |
Set GCP filter |
e |
Explain selected log with AI |
? |
Ask AI a question |
p |
Pause/resume streaming |
t |
Toggle theme (dark/light) |
Ctrl+j/k |
Scroll detail pane |
Ctrl+n/p |
Scroll AI pane |
Esc |
Clear search/AI/filter |
q |
Quit |
# Basic query
racoon query --project my-project --since 2h --limit 50
# With filter
racoon query --project my-project --filter 'resource.type="cloud_run_revision"'
# With AI-generated filter
racoon query --project my-project --ai "all errors from Cloud Run today"
# Export logs to JSON
racoon export --project my-project --output logs.json --limit 1000
# Export with AI query
racoon export --project my-project --output errors.json --ai "critical errors last 24h"
# Export to NDJSON (newline-delimited)
racoon export --project my-project --output logs.ndjson --format ndjson
# View exported logs offline
racoon view logs.json
# Show config file path
racoon config path
# Create default config
racoon config init
# Show current config
racoon config show
# Edit config
racoon config edit
Config file location: ~/.config/racoon/config.toml
# AI Settings
[ai]
api_key = "your-gemini-api-key"
model = "gemini-2.0-flash"
# Default Values
[defaults]
project = "my-default-project"
since = "1h"
limit = 100
severity = "INFO"
# UI Settings
[ui]
max_logs = 100
mouse = false
theme = "dark" # or "light"
# Logging
[logging]
level = "info"
| Variable | Description |
|---|---|
GEMINI_API_KEY |
Gemini API key (overrides config) |
GOOGLE_APPLICATION_CREDENTIALS |
Path to GCP service account key |
Racoon integrates with Google Gemini for intelligent log analysis.
Press e on any log to get an AI explanation:
โโ AI Analysis โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ### 1. Summary โ
โ This error indicates a connection timeout to the โ
โ database server. The request waited 30 seconds but โ
โ no response was received. โ
โ โ
โ ### 2. Severity Assessment โ
โ **High** - Database connectivity issues can cause โ
โ cascading failures across dependent services. โ
โ โ
โ ### 3. Recommended Actions โ
โ 1. Check database server health โ
โ 2. Verify network connectivity โ
โ 3. Review connection pool settings โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Press ? and ask in natural language:
? Are there any errors from Cloud Run in the last hour?
โโ AI Analysis โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Yes, I found 3 errors from Cloud Run: โ
โ โ
โ 1. 10:23:15 - Container failed to start (OOM) โ
โ 2. 10:25:33 - Request timeout after 300s โ
โ 3. 10:45:01 - Connection refused to backend โ
โ โ
โ The most critical is the OOM error which suggests โ
โ your container needs more memory allocation. โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
You can also use AI to set filters:
? ๅธฎๆ่ฎพ็ฝฎ่ฟๆปคๆกไปถไธบไป
ๆพ็คบERRORไปฅไธ็ๆฅๅฟ
โ
ๅทฒ่ฎพ็ฝฎ่ฟๆปคๆกไปถ: severity>=ERROR
logName)# Re-authenticate
gcloud auth application-default login
# Check current credentials
racoon auth
roles/logging.viewer permission--since 24hracoon config showMIT License - see LICENSE for details.
Made with โค๏ธ and ๐ฆ