npm package: @tageery/cli
Description: Tageery CLI - Command-line tool for creating and managing themes and apps
Author: Tageery
Latest version: 1.1.12

# Tageery CLI

Command-line tool for creating and managing Tageery themes and apps for the marketplace.

## Installation

### Global Installation (Recommended)

```bash
npm install -g @tageery/cli
```

Or using pnpm:

```bash
pnpm add -g @tageery/cli
```

### Verify Installation

```bash
tageery --version
```

## Quick Start

### 1. Authenticate

```bash
tageery login --key <your-api-key> --base <api-url>
```

Get your API key from the [Tageery Partners Portal](https://app.tageery.com/developers).

### 2. Create a Theme

```bash
tageery theme create my-awesome-theme
```

Or using the alternative syntax:
```bash
tageery init --name my-awesome-theme
```

During creation you can pick:

- **Demo theme (recommended)** – copies the official Tageery default theme (layout, sections, and components exactly match production)
- **Empty theme** – clean file tree with minimal boilerplate

You can also skip the prompt:

```bash
tageery theme create my-awesome-theme --template demo
tageery theme create my-clean-theme --template empty
```

### 3. Develop Your Theme

The demo template now matches the real default theme:

- `templates/layout.tsx` & `templates/homepage.tsx` accept `storeData`, `appearance`, `themeConfig`, `sectionsConfig`, etc.
- `components/` includes responsive header, footer, and topbar with the same props as production.
- `sections/hero`, `sections/products`, `sections/collections`, `sections/categories`, etc. are local copies of the default sections.
- `tsconfig.json` is preconfigured to load `@tageery/theme-sdk`, so imports like `next-intl`, `embla-carousel-react`, and `@/lib/platform-components` work out of the box.

Key files to customize:
- `theme.config.json` – Theme metadata + registry
- `templates/` – Layout/page templates
- `components/` – Shared components
- `sections/` – Section blocks wired to Theme Customizer settings
- `assets/` – CSS, JS, images

### 4. Sync & Preview

When you create a GitHub-connected theme, the CLI automatically syncs it to Tageery so demo stores can preview the latest files. You can re-run the sync anytime:

```bash
tageery theme sync my-awesome-theme
tageery theme sync my-awesome-theme --repo my-org/my-theme --branch develop
```

This pulls the repo, runs `pnpm theme:validate` + `pnpm theme:manifest`, and refreshes demo stores with the new slug. Run it inside your git repo (so we can auto-detect `origin`) or pass `--repo owner/name`.

### 5. Publish

```bash
tageery publish my-awesome-theme \\
  --demo-url https://demo.mystore.com \\
  --screenshots https://cdn.cdn.com/shot-1.png,https://cdn.cdn.com/shot-2.png,https://cdn.cdn.com/shot-3.png \\
  --support-email studio@example.com
```

The CLI guides you through the listing requirements (screenshots, preview stores, pricing, support). Use `--auto` plus the flags above for CI/CD.

## Commands

| Command | Description |
|---------|-------------|
| `tageery theme create <name>` | Create a new theme (demo or empty template) |
| `tageery theme sync <slug>` | Pull latest GitHub code + rebuild manifest (auto-detects git remote or accept `--repo`) |
| `tageery init --name <name>` | Initialize a new theme (alias) |
| `tageery login --key <key>` | Authenticate with API |
| `tageery publish <slug>` | Publish theme to marketplace |
| `tageery status <slug>` | Check submission status |
| `tageery withdraw <slug>` | Withdraw a pending submission |
| `tageery preview <slug>` | Preview theme |
| `tageery version` / `tageery --version` | Show installed version and check for updates |
| `tageery help` | Show help |

## Documentation

For complete documentation, see [TAGEERY_CLI_GUIDE.md](./TAGEERY_CLI_GUIDE.md)

## Configuration

The CLI stores configuration in `~/.tageery/config.json`:

```json
{
  "apiKey": "pk_xxxxx",
  "apiBase": "https://app.tageery.com"
}
```

## Environment Variables

- `TAGEERY_API_KEY` - API key for authentication
- `TAGEERY_API_BASE` - API base URL (default: http://localhost:3000)

## Examples

# Create a new theme
tageery theme create fashion-store

# Login
tageery login --key pk_xxxxxxxxxxxxx --base https://app.tageery.com

# Publish theme
tageery publish fashion-store \
  --bundle-url https://s3.amazonaws.com/bucket/theme.zip \
  --thumbnail-url https://s3.amazonaws.com/bucket/preview.png

# Check status
tageery status fashion-store
```

## Support

- **Documentation**: [TAGEERY_CLI_GUIDE.md](./TAGEERY_CLI_GUIDE.md)
- **Platform Docs**: https://docs.tageery.com
- **Partners Portal**: https://app.tageery.com/developers
- **Email**: support@tageery.com

## License

MIT

- **Demo theme (recommended)** – copies the official Tageery starter template
- **Empty theme** – clean file tree with minimal boilerplate

You can also skip the prompt:

```bash
tageery theme create my-awesome-theme --template demo
tageery theme create my-clean-theme --template empty
```

### 3. Develop Your Theme

Edit files in the created directory:
- `theme.config.json` - Theme configuration
- `templates/` - Layout + page templates
- `components/` - Reusable components
- `sections/` - Modular sections
- `assets/` - CSS, JS, images

### 4. Publish

```bash
tageery publish my-awesome-theme --bundle-url <url>
```

## Commands

| Command | Description |
|---------|-------------|
| `tageery theme create <name>` | Create a new theme (demo or empty template) |
| `tageery init --name <name>` | Initialize a new theme (alias) |
| `tageery login --key <key>` | Authenticate with API |
| `tageery publish <slug>` | Publish theme to marketplace |
| `tageery status <slug>` | Check submission status |
| `tageery preview <slug>` | Preview theme |
| `tageery help` | Show help |

## Documentation

For complete documentation, see [TAGEERY_CLI_GUIDE.md](./TAGEERY_CLI_GUIDE.md)

## Configuration

The CLI stores configuration in `~/.tageery/config.json`:

```json
{
  "apiKey": "pk_xxxxx",
  "apiBase": "https://app.tageery.com"
}
```

## Environment Variables

- `TAGEERY_API_KEY` - API key for authentication
- `TAGEERY_API_BASE` - API base URL (default: http://localhost:3000)

## Examples

# Create a new theme
tageery theme create fashion-store

# Login
tageery login --key pk_xxxxxxxxxxxxx --base https://app.tageery.com

# Publish theme
tageery publish fashion-store \
  --bundle-url https://s3.amazonaws.com/bucket/theme.zip \
  --thumbnail-url https://s3.amazonaws.com/bucket/preview.png

# Check status
tageery status fashion-store
```

## Support

- **Documentation**: [TAGEERY_CLI_GUIDE.md](./TAGEERY_CLI_GUIDE.md)
- **Platform Docs**: https://docs.tageery.com
- **Partners Portal**: https://app.tageery.com/developers
- **Email**: support@tageery.com

## License

MIT