Skip to content

skystate login / logout / status

Authentication commands for logging in, logging out, and checking account status.


skystate login

Authenticate the CLI via GitHub OAuth.

Synopsis

skystate login [--no-browser]

Description

Opens your browser to the GitHub OAuth flow. After you authorize SkyState, copy the token from the page and paste it into the terminal when prompted. The token is written to ~/.config/skystate/credentials.json with permissions 0600.

If the browser cannot be opened (e.g., in a headless environment), the login URL is printed to stderr instead.

Login times out after 120 seconds if no token is pasted.

After login the CLI fetches your account info to confirm the token is valid and prints your email, display name, and account slug.

Options

OptionDescription
--no-browserPrint the login URL to stderr instead of attempting to open a browser

Global options

--verbose, --api-url — see global options.

Examples

sh
# Standard login — opens browser automatically
skystate login

# Print URL manually (useful in SSH sessions or CI)
skystate login --no-browser

Output

Opening browser for login...
Paste token: <paste here>
Logged in as user@example.com (Jane Doe) (jane-doe)
Token written to /home/user/.config/skystate/credentials.json

Errors

SituationMessage
Login timed outError: Login timed out
Network unreachableError: Network error -- check your connection and try again

Troubleshooting

  • If the browser does not open, run skystate login --no-browser and open the URL manually.
  • If you receive Session expired. on subsequent commands, run skystate login again.
  • To use a token from CI/CD without running the browser flow, set the SKYSTATE_TOKEN environment variable instead.

Dashboard equivalent

Log in at https://app.skystate.io via the GitHub OAuth button.


skystate logout

Remove stored credentials.

Synopsis

skystate logout

Description

Deletes ~/.config/skystate/credentials.json. This command is idempotent — running it when already logged out does nothing.

After logout, all commands that require authentication will print:

Not authenticated. Run: skystate login

Options

None beyond global options (--verbose).

Examples

sh
skystate logout

Output

Logged out. Token removed from /home/user/.config/skystate/credentials.json

skystate status

Show your account information, subscription tier, and API usage.

Synopsis

skystate status [--format <format>] [--quiet]

Description

Fetches your account details and billing status in parallel and displays them as a key-value summary. Useful for quickly verifying that the CLI is authenticated and checking how much of your plan you have consumed.

If not authenticated, exits with code 2 and prints:

Not authenticated. Run: skystate login

Options

--format, --quiet — see global options.

Examples

sh
skystate status
skystate status --format json

Output (default format)

email          user@example.com
name           Jane Doe
slug           jane-doe
sso provider   github
token source   credentials file (/home/user/.config/skystate/credentials.json)
tier           hobby
projects       2/5
api requests   1234/50000

token source shows whether the token came from the SKYSTATE_TOKEN environment variable or the credentials file.

projects and api requests show count/limit or count/unlimited for plans without limits.

Output (JSON format)

json
{
  "email": "user@example.com",
  "name": "Jane Doe",
  "slug": "jane-doe",
  "sso provider": "github",
  "token source": "credentials file (/home/user/.config/skystate/credentials.json)",
  "tier": "hobby",
  "projects": "2/5",
  "api requests": "1234/50000"
}

Errors

SituationExit CodeMessage
Not authenticated2Not authenticated. Run: skystate login
Network error1Error: Network error -- check your connection and try again
Session expired2Error: Session expired.

Dashboard equivalent

Account and usage details are available in the Usage tab and Account Settings in the dashboard at https://app.skystate.io.

Built with VitePress