Skip to main content

gws login

The gws login command authenticates your CLI with the GetWebstack API using OAuth.

Usage

gws login

Output:

Opening browser for authentication...
✓ Browser opened at https://auth.getwebstack.com
⏳ Waiting for authentication...

✓ Authentication successful!
✓ Credentials saved to ~/.gws/auth.json

Logged in as: user@example.com

Note: This command can be run from anywhere (does not require project context).


Arguments and options

gws login takes no positional arguments. It accepts a single option:

OptionDescription
-t, --token <token>Authenticate with a token directly (useful in containerized or CI environments where opening a browser isn't possible).

Without --token, gws login opens your browser to complete an OAuth flow and writes the resulting token to ~/.getwebstackrc (overridable via the GWS_AUTH_FILE env var).


Authentication Methods

Create a free GetWebstack account:

  • Google OAuth - Sign in with your Google account
  • GitHub OAuth - Authorize via GitHub
  • Email/Password - Standard email login with optional 2FA

Troubleshooting

Browser Doesn't Open

If the browser fails to open automatically, manually navigate to the URL shown in the terminal.

Authentication Timeout

Authentication must be completed within 5 minutes. Run gws login again if timeout occurs.

Port Conflict

GetWebstack uses ports 3000-3010 for OAuth callback. If these are in use:

# Kill process using port 3000
lsof -ti:3000 | xargs kill -9

# Try again
gws login