> ## Documentation Index
> Fetch the complete documentation index at: https://www.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting started

> Install the Dynamic CLI, authenticate through your browser, select an environment, and run your first commands.

This guide takes you from a fresh install to running your first commands against a Dynamic environment.

<Note>
  **What you need:** Node.js 18+ and a Dynamic account. If you don't have an account yet, create one in the [Dynamic dashboard](https://app.dynamic.xyz).
</Note>

## 1. Install

```sh theme={"system"}
npm install -g @dynamic-labs/dynamic-console-cli
```

This installs the `dyn` binary globally. Verify the install:

```sh theme={"system"}
dyn --help
```

## 2. Authenticate

```sh theme={"system"}
dyn auth login
```

The CLI opens your browser, you approve the request from the Dynamic dashboard, and the CLI stores a token locally. Login also auto-selects the first available environment, so your next command works immediately.

For CI and automation, skip the browser and set a token instead — see [Authentication & CI](/cli/guides/authentication).

## 3. Check your context

```sh theme={"system"}
dyn status
```

This shows the active organization, project, and environment. Every command that reads or changes data targets this environment until you switch.

## 4. Select an environment

```sh theme={"system"}
dyn environments switch                  # interactive picker
dyn environments switch <environment-id> # switch directly by ID
```

<Warning>
  Sandbox and live are fully isolated. Confirm with `dyn status` that you're on **sandbox** before testing changes — running against live affects real users immediately.
</Warning>

## 5. Run your first commands

Discover what's configurable, then read a value:

```sh theme={"system"}
dyn settings list             # every configurable project setting + description
dyn providers list            # auth providers enabled on this environment
dyn users list                # users in this environment
```

Add `-o json` to any command for machine-readable output:

```sh theme={"system"}
dyn users list -o json | jq '.users[].email'
```

## 6. Log out

On shared machines, clear your stored token when you're done:

```sh theme={"system"}
dyn auth logout
```

## Next steps

<CardGroup cols={2}>
  <Card title="Config as code" icon="file-code" href="/cli/guides/config-as-code">
    Export an environment to YAML and apply changes with safety gates.
  </Card>

  <Card title="Project settings" icon="sliders" href="/cli/guides/project-settings">
    Read and write the settings tree with `dyn settings`.
  </Card>

  <Card title="Managing embedded wallets" icon="wallet" href="/cli/guides/embedded-wallets">
    Configure embedded wallet behavior from the terminal.
  </Card>

  <Card title="Authentication & CI" icon="key" href="/cli/guides/authentication">
    Run the CLI non-interactively in pipelines.
  </Card>
</CardGroup>

## Troubleshooting

If a command reports no active environment, run `dyn environments switch` to select one, then retry. If your token has expired, re-run `dyn auth login`.
