Skip to content

Commit f885cdf

Browse files
committed
added a path command and updated readme
1 parent 84a8e86 commit f885cdf

File tree

2 files changed

+45
-20
lines changed

2 files changed

+45
-20
lines changed

README.md

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
## vercelgate
2-
vercelgate is a command-line tool designed to streamline the process of managing multiple Vercel client accounts. It eliminates the need for repetitive login and logout actions, allowing users to switch between accounts and teams seamlessly.
32

3+
vercelgate is a command-line tool designed to streamline the process of managing multiple Vercel client accounts. It eliminates the need for repetitive login and logout actions, allowing users to switch between accounts and teams seamlessly.
44

55
## WHY
6-
As developers, we often encounter situations where clients provide access to their Vercel accounts without subscribing to a Team plan. The Vercel CLI restricts usage to one account at a time, necessitating a logout from one account before logging into another. This can be a significant inconvenience, especially since the Vercel CLI does not natively support multi-account management, likely encouraging users to opt for a paid Team plan.
76

8-
vercelgate offers a practical solution by enabling users to switch between multiple personal Vercel hobby plan accounts without the need to upgrade to a Vercel Pro Team plan.
7+
As developers, we often encounter situations where clients provide access to their Vercel accounts without subscribing to a Team plan. The Vercel CLI restricts usage to one account at a time, requiring you to log out from one account before logging into another. This can be a significant inconvenience, especially since the Vercel CLI does not natively support multi-account management, likely encouraging users to opt for a paid Team plan.
98

9+
vercelgate offers a practical solution by enabling users to switch between multiple personal Vercel hobby plan accounts without the need to upgrade to a Vercel Pro Team plan.
1010

1111
## Installation
12+
1213
```go
1314
go install github.com/khanakia/vercelgate@main
1415
```
1516

1617
### Install with Homebrew:
18+
1719
```sh
1820
brew tap khanakia/vercelgate
1921
brew install vercelgate
@@ -37,71 +39,80 @@ vercelgate --help
3739

3840
This will display a list of available commands and options to tailor your account management experience.
3941

40-
4142
```bash
4243
vercelgate sync
4344
```
44-
Sync current logged in vercel account with vercelgate
45+
46+
Syncs your current logged-in Vercel account with vercelgate.
4547

4648
```bash
4749
vercelgate new
4850
```
49-
Once synced this command will empty the current vercel account and now you add new vercel account `vercel login` and then `vercel sycn` again now the previously logged in account and the new one both are sycned with vercelgate
50-
5151

52+
This command clears the current Vercel account configuration. After running this, you can add a new Vercel account using `vercel login` and then run `vercelgate sync` to add it to vercelgate.
5253

5354
```bash
5455
vercelgate switch
5556
```
56-
It will show you list of all the synced vercel accounts and you can choose from to set any of account as actie account
5757

58+
Displays a list of all synced Vercel accounts, allowing you to choose which account to set as active.
5859

5960
```bash
6061
vercelgate switchteam
6162
```
62-
It will show you list of all the synced vercel accounts with their teams and you can choose from any team to set the selected team as current team
63+
64+
Shows a list of all synced Vercel accounts and their teams, allowing you to select a team to set as the current team.
65+
66+
```bash
67+
vercelgate path
68+
```
69+
70+
Displays the Vercel global configuration path where settings and authentication data are stored.
6371

6472
```bash
6573
vercelgate reset
6674
```
67-
It will reset all the synced vercel accounts with vercelgate.
6875

76+
Resets all synced Vercel accounts from vercelgate.
6977

7078
## Example
79+
7180
```sh
7281
➜ ✗ vercelgate switch
73-
Use the arrow keys to navigate: ↓ ↑ → ←
74-
? Select Account:
82+
Use the arrow keys to navigate: ↓ ↑ → ←
83+
? Select Account:
7584
▸ Jane Doe ([email protected])
7685

7786
Switched to user Jane Doe
7887

7988

80-
➜ ✗ vercelgate new
89+
➜ ✗ vercelgate new
8190
you can now add new account using `vercel login` and then run `vercelgate sync` again
8291

8392

84-
➜ ✗ vercel login
93+
➜ ✗ vercel login
8594
Vercel CLI 34.0.0
8695
? Log in to Vercel Continue with Email
8796
? Enter your email address: [email protected]
8897
We sent an email to [email protected]. Please follow the steps provided inside it and make sure the security code matches Eager Bornean Orang-utan.
8998
> Success! Email authentication complete for [email protected]
9099

91100

92-
➜ ✗ vercelgate sync
101+
➜ ✗ vercelgate sync
93102
synced successfully
94103

95104
➜ ✗ vercelgate switch
96-
Use the arrow keys to navigate: ↓ ↑ → ←
97-
? Select Account:
105+
Use the arrow keys to navigate: ↓ ↑ → ←
106+
? Select Account:
98107
▸ Jane Doe ([email protected])
99108
100109

101110
```
102111

103112
## Features
104113

105-
- **Simple Account Switching**: Quickly switch between different Vercel accounts without logging out.
106-
- **Support for Multiple Accounts**: Manage multiple personal and hobby plan accounts.
107-
- **Command-Line Interface**: Easy-to-use CLI for all interactions.
114+
- **Simple Account Switching**: Quickly switch between different Vercel accounts without logging out
115+
- **Support for Multiple Accounts**: Manage multiple personal and hobby plan accounts
116+
- **Team Management**: Switch between teams within accounts
117+
- **Configuration Access**: View global configuration paths for troubleshooting
118+
- **Command-Line Interface**: Easy-to-use CLI for all operations

main.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ func main() {
3131
rootCmd.AddCommand(resetCmd)
3232
rootCmd.AddCommand(switchCmd)
3333
rootCmd.AddCommand(switchTeamCmd)
34+
rootCmd.AddCommand(pathCmd)
3435

3536
if err := rootCmd.Execute(); err != nil {
3637
fmt.Fprintln(os.Stderr, err)
@@ -244,6 +245,19 @@ var resetCmd = &cobra.Command{
244245
},
245246
}
246247

248+
var pathCmd = &cobra.Command{
249+
Use: "path",
250+
Short: "Show Vercel global configuration path",
251+
Run: func(cmd *cobra.Command, args []string) {
252+
globalPath, err := vercelutil.GetGlobalPathConfig()
253+
if err != nil {
254+
log.Fatal(err)
255+
return
256+
}
257+
fmt.Printf("Vercel global configuration path: %s\n", globalPath)
258+
},
259+
}
260+
247261
func NewAccountCmd() error {
248262
filePath, err := vercelutil.AuthJsonFile()
249263
if err != nil {

0 commit comments

Comments
 (0)