# Command reference (/docs/cli/reference)



## Setup & authentication [#setup--authentication]

| Command                                 | What it does                                                               |
| --------------------------------------- | -------------------------------------------------------------------------- |
| `layers login [--force]`                | Browser-based OAuth sign-in.                                               |
| `layers logout`                         | Remove local credentials.                                                  |
| `layers whoami`                         | Show the authenticated user.                                               |
| `layers setup`                          | Guided onboarding — detect the project, connect accounts, pick a template. |
| `layers get-users`                      | Alias for `layers setup`.                                                  |
| `layers init [--org ID] [--project ID]` | Create `.layers/config.json` in the current directory.                     |
| `layers link [<project-id>]`            | Link the current directory to an existing Layers project.                  |
| `layers open`                           | Open the web dashboard for the linked project.                             |

## Project / org management [#project--org-management]

| Command                                 | What it does                      |
| --------------------------------------- | --------------------------------- |
| `layers orgs list`                      | List organizations you belong to. |
| `layers orgs switch [<org-id>]`         | Set the default organization.     |
| `layers projects list [--org ID]`       | List projects in the org.         |
| `layers projects switch [<project-id>]` | Set the default project.          |

## Local analysis & SDK [#local-analysis--sdk]

| Command                       | What it does                                                          |
| ----------------------------- | --------------------------------------------------------------------- |
| `layers analyze`              | Scan the local project (framework, platforms, existing SDK).          |
| `layers connect [<platform>]` | Connect a social / ad account via OAuth.                              |
| `layers sdk install`          | Generate an SDK instrumentation spec your AI coding tool can apply.   |
| `layers sdk validate`         | Verify that the SDK is integrated correctly.                          |
| `layers sdk diff`             | Show the git diff of the SDK worktree (`.layers/worktree`).           |
| `layers setup-editor`         | Write MCP + skill config for Claude Code, Cursor, Windsurf, or Codex. |

## Day-to-day [#day-to-day]

| Command                                       | What it does                                                |
| --------------------------------------------- | ----------------------------------------------------------- |
| `layers status`                               | Print the performance dashboard for the current project.    |
| `layers review`                               | Approve or reject pending generated content.                |
| `layers budget [set <amount>\|pause\|resume]` | View or manage ad spend.                                    |
| `layers digest`                               | Show Elle's daily digest.                                   |
| `layers doctor`                               | Run diagnostics on CLI version, auth, and API connectivity. |

## Misc [#misc]

| Command             | What it does                                   |
| ------------------- | ---------------------------------------------- |
| `layers mcp-server` | Start the MCP server (used by `setup-editor`). |
| `layers update`     | Update the CLI to the latest release.          |
| `layers version`    | Show detailed version info.                    |

## Global flags [#global-flags]

| Flag                 | Description                       |
| -------------------- | --------------------------------- |
| `-o, --org <id>`     | Override the active organization. |
| `-p, --project <id>` | Override the active project.      |
| `-h, --help`         | Show help.                        |
| `--version`          | Show the CLI version.             |
