🦀 GCP Snap Crab
A minimalist, terminal-based tool to create and restore Google Cloud SQL database backups — no browser required.
Table of Contents
- ✨ Features
- Prerequisites
- 📸 Screenshots
- ⌨️ Keyboard Shortcuts
- 📦 Installation
- 🚀 Special thanks
- ❤️ Contributing
✨ Features
- Create Cloud SQL backups — select a project, instance, and backup name through a guided TUI flow.
- Restore Cloud SQL backups — restore a backup from any project/instance to any target project/instance (cross-project restore supported).
- Search & filter — press
/in any instance or backup list to filter by name; results update live as you type. - Scrollable lists — instance and backup lists scroll with a visible scrollbar; handles large GCP environments gracefully.
- Progress indicator — animated spinner and elapsed time shown while a restore or backup operation is running.
- Copy to clipboard — press
yto copy the current backup ID or operation ID to the system clipboard. - Input validation — project IDs, instance names, and backup names are validated against GCP naming rules before submission.
- Manual input — press
mto type a project ID, instance name, or backup name directly; useful for projects not listed in your active account. - Dry-run mode — run with
--dry-runto simulate the full flow without making any changes to your GCP resources. - Token caching — GCP access token is cached with a TTL to avoid repeated
gcloudcalls.
Prerequisites
- Google Cloud SDK (
gcloud) installed and authenticated (gcloud auth login/gcloud auth application-default login). - A GCP project with Cloud SQL Admin API enabled.
- IAM permissions:
roles/cloudsql.admin(or equivalent) on both source and target projects.
📸 Screenshots

⌨️ Keyboard Shortcuts
| Key | Action |
|---|---|
↑ / ↓ |
Navigate list |
Enter |
Select item / confirm |
Esc |
Go back one step |
/ |
Enter search/filter mode (instance & backup lists) |
m |
Manual input (project ID, instance name, backup name) |
y |
Copy highlighted backup ID or active operation ID to clipboard |
r |
Refresh current list or poll operation status |
n |
Start a new operation |
h |
Toggle help screen |
q |
Quit |
In search mode:
| Key | Action |
|---|---|
| Type | Filter the list live |
Enter or / |
Exit search, keep filter |
Esc |
Exit search, clear filter |
📦 Installation
Using Cargo
Using Homebrew (macOS)
Coming soon.
From source
Flags
gcp-snap-crab [OPTIONS]
Options:
--dry-run Simulate operations without making any GCP API changes
-h, --help Print help
-V, --version Print version
🚀 Special thanks
❤️ Contributing
Contributions are welcome — bug reports, feature ideas, and pull requests alike.
- Fork the repository.
- Create a branch:
git checkout -b feature/your-feature. - Make your changes and add tests where relevant.
- Open a Pull Request describing what changed and why.