Skip to main content
Environment variables Subcommands

polar auth login

Sign in to Polar through your browser
Flags Examples Choose sandbox or production, then sign in
Sign in to sandbox
Sign in to production again, replacing the saved session
Without a browser, e.g. in CI or as an agent, skip login and use an access token

polar auth whoami

Show the active organization

polar auth list

List the organizations you have access to

polar auth org

Choose the active organization
Arguments Examples Pick the active organization from a list
Set it by slug or ID, for scripts and agents

polar auth token

Give your app its own organization access token: a human approves it in the browser, with any —scope preselected, and the CLI prints it
Flags Examples Add a token for the active organization to .env.local
Preselect scopes and store the token as a GitHub Actions secret without writing it to disk
As an agent without a saved session, use your own access token; a human still approves the app token
Create a token for a specific organization

polar auth logout

Sign out and remove saved sessions
Flags Examples Sign out, asking which session only if you have both
Remove every saved session