> ## Documentation Index
> Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Template Catalog CLI

> CLI commands for browsing, building, and managing the PraisonAI template catalog

# Template Catalog CLI

The PraisonAI CLI provides commands for interacting with the template catalog - browse templates, build catalogs locally, sync sources, and validate template files.

## Browse Templates

Open the template catalog in your default browser.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Open catalog in browser
praisonai templates browse

# Print URL only (don't open browser)
praisonai templates browse --print

# Use custom catalog URL
praisonai templates browse --url https://my-catalog.example.com
```

| Option        | Description                                   |
| ------------- | --------------------------------------------- |
| `--print`     | Print the catalog URL without opening browser |
| `--url <url>` | Use a custom catalog URL                      |
| `--local`     | Run local catalog server (if installed)       |

## Validate Templates

Validate TEMPLATE.yaml files for correctness.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Validate templates in default location
praisonai templates validate

# Validate specific directory
praisonai templates validate --source ./my-templates

# Strict mode (warnings become errors)
praisonai templates validate --strict

# JSON output format
praisonai templates validate --json

# Combine options
praisonai templates validate --source ./templates --strict --json
```

| Option           | Description                                |
| ---------------- | ------------------------------------------ |
| `--source <dir>` | Directory containing templates to validate |
| `--strict`       | Treat warnings as errors                   |
| `--json`         | Output results as JSON                     |

### Validation Checks

The validator checks for:

* Required fields: `name`, `version`, `description`
* Valid version format (semver)
* Workflow file existence
* Agents file existence
* README.md presence
* Tag format (lowercase)

## Build Catalog

Build the template catalog locally.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Build with defaults
praisonai templates catalog build

# Specify output directory
praisonai templates catalog build --out ./dist

# Use custom source directory
praisonai templates catalog build --source ./my-templates

# Minify output
praisonai templates catalog build --minify

# Combine options
praisonai templates catalog build --out ./public/data --source ./templates --minify
```

| Option            | Description                           |
| ----------------- | ------------------------------------- |
| `--out <dir>`     | Output directory for generated files  |
| `--source <path>` | Source directory containing templates |
| `--minify`        | Minify JSON output                    |

### Generated Files

The build command generates:

* `templates.json` - Searchable index of all templates
* `rss.xml` - RSS feed for new templates

## Sync Sources

Sync template sources from GitHub repositories.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Sync all configured sources
praisonai templates catalog sync

# Sync specific source
praisonai templates catalog sync --source agent-recipes

# Use custom config file
praisonai templates catalog sync --config ./my-config.json

# Specify cache directory
praisonai templates catalog sync --cache-dir ./my-cache
```

| Option              | Description                 |
| ------------------- | --------------------------- |
| `--source <name>`   | Sync only a specific source |
| `--config <path>`   | Path to catalog config file |
| `--cache-dir <dir>` | Override cache directory    |

## List Templates

List all available templates.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# List all templates
praisonai templates list

# Show search paths
praisonai templates list --paths

# Filter by source
praisonai templates list --source custom

# Add custom directory
praisonai templates list --custom-dir ./my-templates
```

## Search Templates

Search templates by name or tags.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Search by keyword
praisonai templates search video

# Search with offline mode
praisonai templates search transcript --offline
```

## Template Info

Show detailed information about a template.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Get template info
praisonai templates info ai-video-editor

# With custom directory
praisonai templates info my-template --custom-dir ./templates
```

## Run Templates

Run a template directly.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Run a template
praisonai templates run transcript-generator ./audio.mp3

# With options
praisonai templates run ai-video-editor input.mp4 --output edited.mp4

# Strict tool checking
praisonai templates run my-template --strict-tools
```

## Add Templates

Add templates from GitHub or local paths.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Add from GitHub
praisonai templates add github:user/repo/template-name

# Add from local directory
praisonai templates add ./my-local-template
```

## Manage Sources

Add or remove template sources from persistent config.

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Add a source
praisonai templates add-sources github:MervinPraison/Agent-Recipes

# Remove a source
praisonai templates remove-sources github:MervinPraison/Agent-Recipes
```

## Complete Command Reference

| Command                                            | Description                 |
| -------------------------------------------------- | --------------------------- |
| `praisonai templates browse`                       | Open catalog in browser     |
| `praisonai templates browse --print`               | Print catalog URL           |
| `praisonai templates validate`                     | Validate templates          |
| `praisonai templates validate --source <dir>`      | Validate specific directory |
| `praisonai templates validate --strict`            | Strict validation mode      |
| `praisonai templates validate --json`              | JSON output                 |
| `praisonai templates catalog build`                | Build catalog locally       |
| `praisonai templates catalog build --out <dir>`    | Build to specific directory |
| `praisonai templates catalog sync`                 | Sync template sources       |
| `praisonai templates catalog sync --source <name>` | Sync specific source        |
| `praisonai templates list`                         | List all templates          |
| `praisonai templates list --paths`                 | Show search paths           |
| `praisonai templates search <query>`               | Search templates            |
| `praisonai templates info <name>`                  | Show template details       |
| `praisonai templates run <name>`                   | Run a template              |
| `praisonai templates add <source>`                 | Add a template              |
| `praisonai templates add-sources <src>`            | Add persistent source       |
| `praisonai templates remove-sources <src>`         | Remove persistent source    |
