> ## Documentation Index
> Fetch the complete documentation index at: https://forest-chore-open-api.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# forest switch

> Switch to a different branch in your local Forest development environment

# forest switch

Switch your active branch in your local development environment. The active branch determines which layout configuration your Development Environment uses.

## Usage

```bash theme={null}
forest switch [BRANCH_NAME] [options]
```

## Arguments

| Argument      | Description                                                                    |
| ------------- | ------------------------------------------------------------------------------ |
| `BRANCH_NAME` | The name of the branch to switch to (optional, omit for interactive selection) |

## Options

| Option   | Description               |
| -------- | ------------------------- |
| `--help` | Display usage information |

## Interactive selection

If you omit the branch name, the CLI presents an interactive list of available branches:

```bash theme={null}
$ forest switch
? Select the branch you want to set as current:
❯ feature/add-new-smart-view
  hotfix/fix-dropdown-issue
  feature/implement-refund-action
```

## Direct switch

Provide the branch name directly to switch without the interactive prompt:

```bash theme={null}
$ forest switch feature/add-new-smart-view
✅ Switched to branch: feature/add-new-smart-view
```

<Info>
  You cannot switch to the branch that is already active.
</Info>

## Examples

```bash theme={null}
# Interactive branch selection
forest switch

# Switch to a specific branch
forest switch feature/customer-export

# Switch to main development branch
forest switch main-feature
```

## After switching

After switching branches, your Development Environment will reflect the layout of the new branch. If your local agent is running, **restart it** to ensure it picks up any environment variable changes.

<Tip>
  If your Forest UI does not update after switching branches, try refreshing your browser.
</Tip>
