# Accounts and contexts

> Status: Beta

> Closed beta. Check and switch accounts, sign in with an API token, and sign out of the Rippling CLI.

## Overview

A context is a saved connection to a Rippling account. The CLI uses your default context unless you select another one for a command.

For browser sign-in, see [Get started](https://developer.rippling.com/documentation/rippling-platform/rippling-cli/get-started#sign-in). `rippling login` saves a context named `developer-account` and makes it the default. Use `rippling login --no-default` to leave the current default unchanged.

## Check your accounts

List saved contexts, then inspect one by name:

```bash
rippling config context list
rippling config context get --context developer-account
```

Inspection commands show account metadata without revealing authentication tokens. Add `--json` for machine-readable output.

## Switch accounts

Select a context for one command with `--context`:

```bash
rippling --context sandbox-dev project validate
```

Or change the default for subsequent commands:

```bash
rippling config default-context set --context sandbox-dev
rippling config default-context show
```

For sandbox accounts, see [Developer sandboxes](https://developer.rippling.com/documentation/rippling-platform/rippling-cli/sandboxes). `rippling sandbox use` saves the sandbox credentials as a context and makes it the default.

## Sign in with an API token

To use an API token instead of browser sign-in, pipe it into `config create`. Replace `COMPANY_ID` with your company ID and choose a context name that isn't already in use:

```bash
printf '%s' "$RIPPLING_API_TOKEN" | rippling config create \
  --context api-account \
  --company-id COMPANY_ID \
  --description "API account" \
  --token-stdin
```

Configuration is stored in `~/.rippling`. Set `RIPPLING_HOME` only if you need to store it elsewhere.

## Sign out

```bash
rippling --context developer-account logout
```

This removes the selected context and its CLI-owned credentials. If it was the default, choose another default before running further commands.

## See also

-   [Get started with the Rippling CLI](https://developer.rippling.com/documentation/rippling-platform/rippling-cli/get-started)
-   [Developer Program](https://developer.rippling.com/documentation/rippling-platform/developer-program/get-started)
-   [Developer sandboxes](https://developer.rippling.com/documentation/rippling-platform/rippling-cli/sandboxes)

Source: https://developer.rippling.com/documentation/rippling-platform/rippling-cli/accounts-and-contexts

> For the complete documentation index, see [llms.txt](https://developer.rippling.com/llms.txt). Public pages have a Markdown version at the same URL with .md added.
