-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLLMS.txt
More file actions
78 lines (51 loc) · 1.7 KB
/
LLMS.txt
File metadata and controls
78 lines (51 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# gsw
> Switch Google Cloud configurations instantly.
gsw is a lightweight Bash/Zsh plugin for switching between gcloud configurations.
## Prerequisites
- Google Cloud SDK (`gcloud`) must be installed and configured
- At least one gcloud configuration must exist (`gcloud config configurations list`)
## Commands
### gsw
Switch the gcloud configuration. Defaults to the current shell session.
```
gsw <config_name> # Switch for current session (sets CLOUDSDK_ACTIVE_CONFIG_NAME)
gsw -g <config_name> # Switch GLOBALLY (changes default active config)
gsw # List available configurations and show usage
gsw --help # Show help (static, no gcloud call)
gsw --version # Show version
```
## Environment Variables
| Variable | Description | Set by |
|----------|-------------|--------|
| `CLOUDSDK_ACTIVE_CONFIG_NAME` | Overrides global config for current shell | `gsw` (default) |
## Exit Codes
| Code | Meaning |
|------|---------|
| 0 | Success |
| 1 | Configuration does not exist |
## Error Handling
### Configuration not found
```
Error: Configuration 'nonexistent' does not exist.
Available configurations:
...
```
**Resolution**: Run `gsw` to see available configuration names.
### gcloud not installed
```
command not found: gcloud
```
**Resolution**: Install Google Cloud SDK from https://cloud.google.com/sdk/docs/install
## Installation
```bash
curl -sL https://raw.githubusercontent.com/sakebook/gsw/main/install.sh | bash
```
Or clone to `~/.gsw` and add `source ~/.gsw/gsw.sh` to your shell config.
## Integration with direnv
For automatic configuration switching per directory:
```bash
# .envrc
export CLOUDSDK_ACTIVE_CONFIG_NAME="project-config"
```
## License
MIT