# /rootcx:preview

Sync files to preview and open in browser.

## Usage

```bash
npx @rootcx/cli preview
```

## Options

- `--no-browser` - Don't open browser automatically

```bash
npx @rootcx/cli preview --no-browser
```

## What it does

1. Reads all project files from the current directory
2. Syncs them to the RootCX preview server
3. Opens the preview URL in your browser

## Preview Features

The preview provides:
- Live rendering of your app
- Same environment as production
- Access to Business Design System components
- Data hooks work with real data
- Integration hooks available

## Workflow

1. Make changes to your code
2. Run `verify_build` to validate
3. Run `/rootcx:preview` to see changes live

## Troubleshooting

### Preview not updating?
- Ensure all files are saved
- Run `verify_build` to check for errors
- Check that you're in the project directory

### Authentication error?
- Run `/rootcx:login` to re-authenticate

### Files missing?
- Check `.gitignore` patterns
- Ensure files are not in ignored directories (node_modules, .git, etc.)

## Requirements

- Must be in a linked RootCX project directory
- Must be authenticated
