Authenticate
The CLI signs you in through your browser and keeps a refreshing account session at ~/.stream/auth.yaml. You sign in once per machine.
Sign in with init
getstream init links a directory to one of your apps. When there's no session on the machine, it signs you in first:
cd path/to/your/project
getstream initWith no session, init opens your browser to log in with the Stream Dashboard, writes the refreshing session, then moves on to linking the app. See Projects and credentials for what the link writes, or the Quickstart for the setup end to end.
Sign in without linking a project
To create the session on its own, run:
getstream loginThis goes through the same browser flow and same session file as above, but doesn't link a project. Use it to sign back in after a guest session or on a machine where you reach apps with --app-id rather than a linked project.
Try the CLI without an account
getstream login --guestCreates a temporary guest account backed by a throwaway app, so you can run commands before signing up. It needs no browser or email, so it can be used by agents and in headless environments that start with no credentials. Run it before init and the sign-in is already done, so init goes straight to linking an app.
A machine holds one session at a time, so --guest replaces a session already on the machine; getstream login gets your real account back. When you're ready to keep your work, convert the guest into a real account:
getstream login --upgradeThis opens the dashboard to finish creating a personal account.
Target another app for one call
getstream api GetApp --app-id 99999--app-id resolves any app you own through your account session, without changing the linked project.
Log out
getstream logoutClears ~/.stream/auth.yaml. Logging out of a guest account discards it, so the CLI asks for confirmation; pass --force to skip the prompt in a script.
Related
- Use the CLI in CI: for headless environments with no browser
getstream env: write SDK keys into the project you're developing