Skip to Content
CLILogin

Login

Connect the CLI to your contract.dev account.

contract.dev login

The CLI prints a one-time code and opens the browser at the activation page. Approving there saves credentials to ~/.contract.dev/credentials.json, bound to your account and to the workspace active in the app at that moment. To act on another workspace, see Workspaces.

One-time code: ABCD-1234 Opening https://app.contract.dev/activate?code=ABCD-1234 Waiting for approval... Logged in as you@example.com
FlagDescription
--no-browserPrint the activation URL instead of opening the browser.

whoami

Show which account and workspace the CLI acts as, where the credentials come from, and the key they use:

contract.dev whoami
you@example.com (workspace: Acme) Auth: ~/.contract.dev/credentials.json → https://app.contract.dev (key cmg1a2b3c4d5e6f7g8h9i0j1)

logout

Revoke the key and delete the saved credentials:

contract.dev logout
Revoked the API key. Removed ~/.contract.dev/credentials.json

The key is revoked on the server first, so it does not outlive this machine. If the server cannot be reached the file is still removed; revoke the key under APIs in the app.

Last updated on