Skip to content

Sign in to the CLI

Sign the GraphOps CLI in to your account from a browser, check what you approve, and end a CLI session.

Use the GraphOps CLI with your own account without copying passwords or tokens into a terminal. The CLI shows a short code; you approve it in a browser where you can use your usual sign-in methods, and the CLI finishes signing in on its own.

Sign in

  1. Run graphops auth login. The CLI shows a sign-in address and a code.
  2. Open the address in a browser and enter the code exactly as the CLI shows it.
  3. Sign in with your password or a passkey, and complete two-factor authentication if your sign-in requires it. You can also choose Google or GitHub when that provider is already connected to your GraphOps account.
  4. Check that the code on the approval page matches the code in your terminal and that the page shows the account the CLI should use, then choose Allow. To use a different account, choose Use another account and sign in again.

The CLI finishes signing in after you allow the request, and the browser tells you to return to your terminal. If the code expires before you approve it, run graphops auth login again to get a new code.

Approving always asks you to sign in, even when the browser is already signed in to GraphOps. The approval signs in only the CLI; it does not sign that browser in to the platform. Your account's email address must be verified before you can approve the CLI.

Approve only your own codes

Approving a code gives the CLI that requested it access to your account. Enter only codes that you started from your own terminal, and choose Deny if you did not run graphops auth login or the codes do not match.

What you approve

Allowing the request lets the GraphOps CLI:

  • read your name and email address;
  • send requests as your account, with the role you have in each of your organizations;
  • stay signed in without asking you again, until its session ends.

The CLI does not receive your password, passkey, or two-factor codes. Approval never creates an account or connects a provider: to approve with Google or GitHub, connect the provider from Account first. If you choose a Google or GitHub account that isn't connected to GraphOps, the browser stops and the request stays unapproved; connect the provider, then run graphops auth login again.

How long the CLI stays signed in

Each approval creates a CLI session that lasts for a limited period. When it ends, the CLI can no longer send requests; run graphops auth login to sign in again. To sign the CLI out before then, end its session: the CLI is signed out immediately.

End a CLI session

End a CLI session when you no longer use the CLI on that computer, or when you do not recognize it. In Account, find the session under Sessions. CLI sessions show GraphOps CLI with the CLI label.

Open the session's action menu, choose End session, and confirm. The CLI's next request is refused, including after it refreshes its sign-in, and it must sign in again. Ending a CLI session does not sign out your browser sessions. See end a device session for the other session controls.

Next steps