# create-zyte

Scaffold a new Zyte desktop app project with a single command.

## Usage

Using Bun (recommended):

```bash
bun create zyte my-app
```

Using npm:

```bash
npx create-zyte my-app
```

Using the package directly:

```bash
create-zyte my-app
```

## Options

### Template Selection

Choose from multiple project templates:

```bash
# Minimal template (default)
create-zyte my-app

# Full-featured template with styled components
create-zyte my-app --template full-featured

# Interactive todo app template
create-zyte my-app --template todo-app

# List all available templates
create-zyte list
```

### Skip Installation

Skip automatic dependency installation:

```bash
create-zyte my-app --skip-install
```

## Available Templates

### minimal

The simplest possible Zyte app - perfect for getting started quickly.

**Features:**

- Single HTML file with inline styles
- Gradient background
- Minimal boilerplate

**Generated structure:**
```
my-app/
├── src/
│   └── index.ts
├── package.json
├── README.md
└── .gitignore
```

### full-featured

A modern styled app showcasing Zyte's capabilities.

**Features:**

- Clean, professional UI
- Multiple components/sections
- Feature showcase cards
- Responsive design

**Perfect for:**

- Production apps
- Learning Zyte features
- Custom styling examples

### todo-app

A complete interactive todo list application.

**Features:**

- Add, complete, and delete todos
- Clean, modern UI
- Local state management
- Interactive JavaScript

**Perfect for:**

- Learning state management
- Understanding app structure
- Building on top of working code

## After Creation

Once your project is created, navigate to it and start developing:

```bash
cd my-app
bun run dev
```

## Development Workflow

```bash
# Install dependencies (if skipped)
bun install

# Run in development mode
bun run dev

# Build for production
bun run build
```

## What Gets Created

Each template creates a fully functional Zyte app with:

- **package.json** - Project configuration with dev and build scripts
- **src/index.ts** - Main entry point using the TypeScript SDK
- **README.md** - Project-specific documentation
- **.gitignore** - Git ignore rules for node_modules, dist, etc.

## Requirements

- [Bun](https://bun.sh) >= 1.0.0
- The Zyte core binary (built automatically during install)

## Examples

Create a minimal app:
```bash
create-zyte hello-world
cd hello-world
bun run dev
```

Create a full-featured app:
```bash
create-zyte my-dashboard --template full-featured
cd my-dashboard
bun run dev
```

Create a todo app without installing dependencies:
```bash
create-zyte my-todos --template todo-app --skip-install
cd my-todos
bun install
bun run dev
```

## TypeScript SDK

All templates use the `ts-zyte` TypeScript SDK. You never need to write Zig code unless you want to work on advanced features.

**Example from generated code:**

```typescript
import { show } from 'ts-zyte'

await show(html, {
  title: 'My App',
  width: 800,
  height: 600,
})
```

## Learn More

- [Zyte Documentation](https://github.com/stacksjs/zyte)
- [TypeScript SDK](https://github.com/stacksjs/zyte/tree/main/packages/typescript)
- [Benchmarks](https://github.com/stacksjs/zyte/tree/main/benchmarks)

## License

MIT � [Chris Breuer](https://github.com/chrisbbreuer)
