You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installing `compass`, you're ready to use it immediately if you already have `gcloud` installed and authenticated. Compass uses your existing `gcloud` credentials, so there's no additional authentication needed.
170
+
171
+
**Verify your setup:**
167
172
```bash
168
-
#Simple SSH to an instance (discovers project, zone automatically if cached)
# Look up which resources use a specific IP address
175
-
compass gcp ip lookup 192.168.0.208
180
+
### Loading Projects
181
+
182
+
For multi-project operations (IP lookups, instance discovery across projects, global search), you'll want to import your GCP projects into the cache:
176
183
177
-
# Import projects for multi-project operations (interactive)
184
+
**Interactive project selection:**
185
+
```bash
178
186
compass gcp projects import
187
+
```
188
+
189
+
This command discovers all projects you have access to and presents an interactive menu. Use arrow keys to navigate, `Space` to select/deselect projects, and `Enter` to confirm. Only selected projects will be used for multi-project searches.
179
190
180
-
# Import projects matching a regex pattern (non-interactive)
191
+
**Quick import with regex:**
192
+
```bash
193
+
# Import all production projects
181
194
compass gcp projects import --regex "^prod-"
182
195
183
-
# Search cached projects for instances with matching names
184
-
compass gcp search piou
196
+
# Import dev and staging projects
197
+
compass gcp projects import -r "dev|staging"
198
+
```
185
199
186
-
# Inspect VPN gateways
187
-
compass gcp vpn list --project prod
200
+
**Why import projects?**
201
+
- Enables instance discovery without specifying `--project` every time
202
+
- Powers the global resource search across your infrastructure
203
+
- Speeds up IP lookups by caching subnet information
204
+
- Learns from your search patterns to prioritize frequently-used projects
188
205
189
-
# Launch the interactive TUI
190
-
compass interactive
206
+
### Using the Interactive TUI
191
207
192
-
# Update to the latest published release
193
-
compass update
208
+
Launch the Terminal UI for a visual, keyboard-driven experience:
209
+
210
+
```bash
211
+
compass interactive # or: compass i
212
+
```
213
+
214
+
**Essential keyboard shortcuts:**
215
+
216
+
| Key | Action | Description |
217
+
|-----|--------|-------------|
218
+
|`↑` / `↓`| Navigate | Move through the list |
219
+
|`s`| SSH | Connect to selected instance |
220
+
|`d`| Details | Show detailed information |
221
+
|`b`| Browser | Open resource in Cloud Console |
222
+
|`/`| Filter | Filter current view (AND/OR/NOT operators) |
223
+
|`Shift+S`| Search | Global search across all resource types |
224
+
|`Shift+R`| Refresh | Reload current view |
225
+
|`v`| VPN View | Switch to VPN inspection |
226
+
|`c`| CT View | Switch to connectivity tests |
227
+
|`i`| IP Lookup | Switch to IP address lookup |
228
+
|`?`| Help | Show all available shortcuts |
229
+
|`Esc`| Back/Quit | Clear filter or exit application |
230
+
231
+
**Filter syntax:**
232
+
-`web prod` — AND: must contain both "web" AND "prod"
233
+
-`web|api` — OR: must contain "web" OR "api"
234
+
-`-dev` — NOT: must NOT contain "dev"
235
+
- Combine: `web|api prod -staging` — ("web" or "api") AND "prod" but NOT "staging"
# Subsequent connections remember the project, zone, and IAP preference
255
+
compass gcp ssh my-instance
256
+
```
257
+
258
+
Compass automatically discovers the instance's zone, determines if IAP tunneling is needed, caches the metadata for instant future connections, and learns which projects to prioritize for similar searches.
259
+
260
+
**Search and lookup:**
261
+
```bash
262
+
# Global search across all resource types (22 types supported)
263
+
compass gcp search piou
264
+
265
+
# Look up which resources use a specific IP address
0 commit comments