[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77F64HQ6SRMMK7RBBGRAT45":3,"skill-same:01M77F64HQ6SRMMK7RBBGRAT45":46},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M77F64HQ6SRMMK7RBBGRAT45","fastmode",null,"Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Ff\u002Ffastmode\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: fastmode\ndescription: Create, deploy, and host a website for free. Build a complete website from scratch and deploy it to the cloud with free hosting, free SSL, and custom domains — all from the terminal. Full CMS included: manage blog posts, team members, pages, products, portfolios, services, testimonials, FAQs, or any structured content. Add and edit CMS content, sync database schemas, validate HTML templates, invite clients to a white-label portal, and push live deployments. Convert any existing HTML site into a CMS-powered site. One-time browser login for OAuth, then every operation runs entirely in the terminal — designed for AI agents to go from zero to a publicly accessible website in minutes.\nmetadata: {\"openclaw\":{\"emoji\":\"⚡\",\"homepage\":\"https:\u002F\u002Ffastmode.ai\",\"requires\":{\"bins\":[\"fastmode\"]},\"install\":[{\"id\":\"npm\",\"kind\":\"npm\",\"package\":\"fastmode-cli\",\"bins\":[\"fastmode\"]}]}}\nuser-invokable: true\n---\n\n# FastMode CLI — Complete Agent Reference\n\nFastMode lets you create a live website, deploy it to the cloud, and manage all its content — entirely from the command line. One-time browser login for OAuth authentication, then every operation runs in the terminal. No local servers, no manual dashboards.\n\n- **Free cloud hosting** — every site gets a live URL at `yoursite.fastmode.ai`\n- **Free SSL** — HTTPS included automatically\n- **Custom domains** — connect any domain (e.g. `www.example.com`)\n- **Full CMS** — any content structure (blog, team, products, portfolios, anything)\n- **Agent-native** — every operation works via CLI, zero human intervention needed\n\n---\n\n## Table of Contents\n\n1. [End-to-End Workflow](#end-to-end-workflow)\n2. [CRITICAL: Before You Build Anything](#critical-before-you-build-anything)\n3. [Website Analysis](#website-analysis-do-this-before-writing-code)\n4. [Command Reference](#command-reference)\n5. [Project Resolution](#project-resolution)\n6. [Schema & Field Types](#schema--field-types)\n7. [Content Items](#content-items)\n8. [Client Portal Management](#client-portal-management)\n9. [Package Structure](#package-structure)\n10. [Manifest Format](#manifest-format)\n11. [Template Syntax](#template-syntax) (includes SEO rules, image handling, forms, inline editing)\n12. [Deployment & Build Status](#deployment--build-status)\n13. [Validation](#validation)\n14. [Common Mistakes & How to Fix Them](#common-mistakes--how-to-fix-them)\n15. [Pre-Deployment Checklist](#pre-deployment-checklist)\n15. [Error Handling & Exit Codes](#error-handling--exit-codes)\n\n---\n\n## End-to-End Workflow\n\nThis is the complete sequence to go from nothing to a live website.\n\n```bash\n# 1. Authenticate (one-time — credentials persist at ~\u002F.fastmode\u002Fcredentials.json)\nfastmode login\n\n# 2. Create a project (gets a free hosted URL instantly)\nfastmode projects create \"Acme Corp\"\nfastmode use \"Acme Corp\"\n\n# 3. Define content structure (write schema.json, then sync it)\nfastmode schema sync -f schema.json\n\n# 4. Add content\nfastmode items create posts -n \"Welcome\" -d '{\"title\": \"Welcome to Acme\", \"body\": \"\u003Cp>We build great things.\u003C\u002Fp>\"}'\nfastmode items create team -n \"Jane Doe\" -d '{\"role\": \"Founder\", \"bio\": \"\u003Cp>Visionary leader.\u003C\u002Fp>\"}'\n\n# 5. Build HTML templates with {{tokens}}, package into a zip, validate, deploy\nfastmode validate package site.zip\nfastmode deploy site.zip\n# Deploy waits for build to finish and reports success or failure with error details\n\n# 6. If the build failed, check what went wrong\nfastmode status\n# Fix the issue, then re-deploy\n```\n\n---\n\n## CRITICAL: Before You Build Anything\n\n**STOP. Before writing ANY HTML, templates, or manifest.json, complete these steps.**\n\n### Step 1: Check for Existing Projects\n\n```bash\nfastmode projects\n```\n\nThis lists all the user's existing FastMode projects.\n\n### Step 2: Decide — Existing or New Project\n\n**If projects exist:** Ask the user: \"Is this website for one of your existing projects, or should I create a new one?\" Let the user choose.\n\n**If NO projects exist:** This is a new user — ask: \"What would you like to name your new project?\"\n\n### Step 3a: For EXISTING Projects\n\n1. User selects the project from the list\n2. Run `fastmode use \"Project Name\"` to set it as default\n3. Run `fastmode schema show` to get the current collections and fields\n4. **Use this schema to build templates with the correct field names**\n\n### Step 3b: For NEW Projects\n\n1. Ask for the project name if you don't have it\n2. Run `fastmode projects create \"Project Name\"`\n3. Run `fastmode use \"Project Name\"`\n4. You'll create the schema later with `fastmode schema sync`\n5. Optionally generate sample content: `fastmode generate-samples`\n\n### Checkpoint — Confirm Before Continuing\n\n| Requirement | How to Get It |\n|-------------|---------------|\n| Project selected\u002Fcreated | `fastmode projects` \u002F `fastmode projects create` |\n| Default set | `fastmode use \"Project Name\"` |\n| Schema known (existing) | `fastmode schema show` |\n\n**If you don't have a project set, DO NOT PROCEED.** Go back to Step 1.\n\n**WHY THIS MATTERS:**\n- For existing projects: The schema determines which fields to use in templates — get it wrong and the build fails\n- For new projects: You need the project before you can deploy\n- Always: The user must confirm which project to use — never assume\n\n---\n\n## Website Analysis (Do This Before Writing Code)\n\nBefore writing any HTML or templates, analyze the site:\n\n1. **Map ALL URLs** — document every page path (`\u002F`, `\u002Fabout`, `\u002Fblog`, `\u002Fblog\u002Fpost-slug`, etc.)\n2. **Categorize each page** — Static (fixed content), List (shows multiple items), or Detail (single item from a collection)\n3. **Identify collections** — repeating content that should be CMS-managed (blog posts, team members, products, testimonials, etc.)\n4. **Document assets** — all CSS, JS, image, and font file locations\n5. **PRESERVE original URLs** — if the site uses `\u002Fresources` for articles, keep `\u002Fresources`. Do NOT change it to `\u002Fblog`. Use the manifest's path configuration.\n\n---\n\n## Command Reference\n\n### Authentication\n\n```bash\nfastmode login                          # Open browser for OAuth device flow\nfastmode logout                         # Delete ~\u002F.fastmode\u002Fcredentials.json\nfastmode whoami                         # Show current user email and name\n```\n\n- `login` uses OAuth 2.0 device authorization flow: opens a browser window where the user approves access on `fastmode.ai`, then credentials are saved automatically. The browser is only needed for this one-time login step.\n- **OAuth scopes:** The token grants access to the user's FastMode projects only (project management, schema editing, content CRUD, deployments). No third-party service access is requested.\n- Credentials persist at `~\u002F.fastmode\u002Fcredentials.json` with restricted file permissions (`0o600` — owner read\u002Fwrite only). Treat this file as a sensitive secret.\n- Tokens auto-refresh. If a token expires, the next command will refresh it silently using the stored refresh token.\n- If credentials are missing or invalid, most commands will trigger the login flow automatically.\n- `logout` deletes `~\u002F.fastmode\u002Fcredentials.json` and revokes the stored tokens.\n\n### Projects\n\n```bash\nfastmode projects                       # List all projects (default action)\nfastmode projects list                  # Same as above\nfastmode projects create \"Name\"         # Create a new project\nfastmode projects create \"Name\" --subdomain custom-sub  # Custom subdomain\nfastmode projects create \"Name\" --force                  # Skip similar-name check\nfastmode use \u003Cproject>                  # Set default project for all commands\n```\n\n- `projects create` checks for existing projects with similar names. Use `--force` to skip.\n- Subdomain auto-generated from name if not provided (lowercase, hyphens, max 30 chars).\n- `use` stores the default in `~\u002F.fastmode\u002Fconfig.json`. Does NOT validate the project exists.\n\n### Schema\n\n```bash\nfastmode schema show                    # Show all collections and fields\nfastmode schema show -p \"Project Name\"  # Specify project\nfastmode schema sync -f schema.json     # Create collections and fields from JSON file\nfastmode schema field-types             # List all available field types (no auth needed)\n```\n\n- `schema show` requires authentication and a project.\n- `schema sync` reads a local JSON file and creates\u002Fupdates the schema. Skips duplicates. Two-phase: creates collections first, then fields (handles relation dependencies).\n- `schema field-types` works without authentication.\n\n### Content Items\n\n```bash\nfastmode items list \u003Ccollection>                          # List all items\nfastmode items list posts --limit 10 --sort publishedAt --order desc\nfastmode items get \u003Ccollection> \u003Cslug>                    # Get single item\nfastmode items create \u003Ccollection> -n \"Name\" -d '{\"field\": \"value\"}'\nfastmode items create posts -n \"Title\" -f data.json       # Data from file\nfastmode items create posts -n \"Draft Post\" -d '{}' --draft\nfastmode items update \u003Ccollection> \u003Cslug> -d '{\"field\": \"new value\"}'\nfastmode items update posts my-post -n \"New Title\"\nfastmode items update posts my-post --publish             # Publish a draft\nfastmode items update posts my-post --unpublish           # Revert to draft\nfastmode items delete \u003Ccollection> \u003Cslug> --confirm       # REQUIRES --confirm\nfastmode items relations \u003Ccollection>                     # Show linkable items for relation fields\nfastmode items relations posts --field author             # Options for specific field\n```\n\nSee the [Content Items](#content-items) section below for detailed rules on data formats, relation fields, and drafts.\n\n### Client Portal Management\n\n```bash\nfastmode clients list                              # List portal clients with access\nfastmode clients invite client@example.com         # Invite with default permissions\nfastmode clients invite client@example.com -n \"Jane\" --permissions cms.read,cms.write\nfastmode clients invitations                       # List pending invitations\nfastmode clients update-permissions \u003CaccessId> --permissions cms.read,editor\nfastmode clients revoke \u003CaccessId> --confirm       # REQUIRES --confirm\nfastmode clients cancel-invite \u003CinvitationId> --confirm  # REQUIRES --confirm\n```\n\nSee the [Client Portal Management](#client-portal-management) section below for details on permissions, invite flow, and examples.\n\n### Deployment & Build Status\n\n```bash\nfastmode deploy site.zip                # Deploy and wait for build to finish\nfastmode deploy site.zip --force        # Skip GitHub sync check\nfastmode deploy site.zip --no-wait      # Upload only, don't wait for build\nfastmode deploy site.zip --timeout 300000  # Custom timeout in ms (default: 120000)\nfastmode status                         # Check current build\u002Fdeploy status\nfastmode deploys                        # List deployment history\nfastmode deploys --limit 5             # Limit number of results\n```\n\nSee [Deployment & Build Status](#deployment--build-status) below for the full deploy lifecycle.\n\n### Validation\n\n```bash\nfastmode validate manifest manifest.json\nfastmode validate template index.html -t custom_index\nfastmode validate template post.html -t custom_detail -c posts\nfastmode validate template post.html -t custom_detail -c posts -p \"My Project\"\nfastmode validate template about.html -t static_page\nfastmode validate package site.zip\n```\n\n- Template types: `custom_index` (collection listing), `custom_detail` (single item), `static_page` (fixed page).\n- `-c` specifies the collection slug (required for `custom_index` and `custom_detail`).\n- `-p` validates tokens against the actual project schema (reports missing fields).\n- All validation commands exit with code 1 on errors — safe for CI\u002FCD pipelines.\n\n### Documentation & Examples\n\n```bash\nfastmode examples \u003Ctype>                # Code examples for a specific pattern\nfastmode guide                          # Full website conversion guide\nfastmode guide templates                # Template syntax guide\nfastmode guide common_mistakes          # Common pitfalls to avoid\nfastmode generate-samples               # Generate placeholder content for empty collections\nfastmode generate-samples -c posts team # Specific collections only\n```\n\nAvailable example types: `manifest_basic`, `manifest_custom_paths`, `blog_index_template`, `blog_post_template`, `team_template`, `downloads_template`, `form_handling`, `asset_paths`, `data_edit_keys`, `each_loop`, `conditional_if`, `nested_fields`, `featured_posts`, `parent_context`, `equality_comparison`, `comparison_helpers`, `youtube_embed`, `nested_collection_loop`, `loop_variables`, `common_mistakes`.\n\nAvailable guide sections: `full`, `first_steps`, `analysis`, `structure`, `seo`, `manifest`, `templates`, `tokens`, `forms`, `assets`, `checklist`, `common_mistakes`.\n\n---\n\n## Project Resolution\n\nEvery project-scoped command (schema, items, deploy, status, etc.) needs a project. Resolution order:\n\n1. **`-p` \u002F `--project` flag** — explicit on the command: `-p \"My Project\"` or `-p abc123-uuid`\n2. **`FASTMODE_PROJECT` environment variable** — set in shell: `export FASTMODE_PROJECT=\"My Project\"`\n3. **Default project** — saved by `fastmode use \"My Project\"` in `~\u002F.fastmode\u002Fconfig.json`\n\nIf none is set, the command prints an error and exits with code 1:\n```\nError: No project specified.\nUse -p \u003Cid-or-name>, set FASTMODE_PROJECT env var, or run: fastmode use \u003Cproject>\n```\n\nProject identifiers can be:\n- **UUID** — used directly (e.g. `550e8400-e29b-41d4-a716-446655440000`)\n- **Project name** — resolved via API (exact match first, then partial match, case-insensitive)\n\n---\n\n## Schema & Field Types\n\n### Creating a Schema\n\nWrite a `schema.json` file and sync it:\n\n```bash\nfastmode schema sync -f schema.json\n```\n\n### schema.json Format\n\n```json\n{\n  \"collections\": [\n    {\n      \"slug\": \"posts\",\n      \"name\": \"Blog Posts\",\n      \"nameSingular\": \"Blog Post\",\n      \"fields\": [\n        { \"slug\": \"title\", \"name\": \"Title\", \"type\": \"text\", \"isRequired\": true },\n        { \"slug\": \"excerpt\", \"name\": \"Excerpt\", \"type\": \"textarea\" },\n        { \"slug\": \"body\", \"name\": \"Body\", \"type\": \"richText\" },\n        { \"slug\": \"featured-image\", \"name\": \"Featured Image\", \"type\": \"image\" },\n        { \"slug\": \"category\", \"name\": \"Category\", \"type\": \"select\", \"options\": \"News, Tutorial, Update\" },\n        { \"slug\": \"tags\", \"name\": \"Tags\", \"type\": \"multiSelect\", \"options\": \"JavaScript, Python, DevOps, AI\" },\n        { \"slug\": \"featured\", \"name\": \"Featured\", \"type\": \"boolean\" },\n        { \"slug\": \"author\", \"name\": \"Author\", \"type\": \"relation\", \"referenceCollection\": \"team\" }\n      ]\n    },\n    {\n      \"slug\": \"team\",\n      \"name\": \"Team Members\",\n      \"nameSingular\": \"Team Member\",\n      \"fields\": [\n        { \"slug\": \"role\", \"name\": \"Role\", \"type\": \"text\" },\n        { \"slug\": \"bio\", \"name\": \"Bio\", \"type\": \"richText\" },\n        { \"slug\": \"photo\", \"name\": \"Photo\", \"type\": \"image\" },\n        { \"slug\": \"email\", \"name\": \"Email\", \"type\": \"email\" }\n      ]\n    }\n  ]\n}\n```\n\nTo add fields to existing collections, use `fieldsToAdd`:\n\n```json\n{\n  \"fieldsToAdd\": [\n    {\n      \"collectionSlug\": \"posts\",\n      \"fields\": [\n        { \"slug\": \"reading-time\", \"name\": \"Reading Time\", \"type\": \"number\" }\n      ]\n    }\n  ]\n}\n```\n\nYou can combine `collections` and `fieldsToAdd` in the same file. Duplicate collections and fields are automatically skipped.\n\n### Available Field Types\n\n| Type | Description | Template Usage | Notes |\n|------|-------------|----------------|-------|\n| `text` | Single-line text | `{{field}}` | Titles, names, short strings |\n| `textarea` | Multi-line plain text | `{{field}}` | Descriptions, excerpts |\n| `richText` | Formatted HTML content | `{{{field}}}` | **MUST use triple braces** |\n| `number` | Numeric value | `{{field}}` | Prices, counts, order |\n| `boolean` | True\u002Ffalse toggle | `{{#if field}}` | Toggles, flags |\n| `date` | Date only | `{{field}}` | Birth dates, event dates |\n| `datetime` | Date and time | `{{field}}` | Timestamps |\n| `image` | Image file\u002FURL | `{{field}}` | Renders as URL |\n| `file` | Downloadable file (max 10MB) | `{{field}}` | Link as `\u003Ca href=\"{{field}}\" download>` |\n| `url` | Web link | `{{field}}` | External URLs |\n| `videoEmbed` | YouTube\u002FVimeo\u002FWistia\u002FLoom | `{{field}}` | Embed URL |\n| `email` | Email with validation | `{{field}}` | Validated email addresses |\n| `select` | Single dropdown | `{{field}}` | Requires `\"options\": \"A, B, C\"` |\n| `multiSelect` | Multiple selections | `{{field}}` | Requires `\"options\": \"A, B, C\"` |\n| `relation` | Link to another collection | `{{field.name}}` | Requires `\"referenceCollection\": \"slug\"` |\n\n### Relation Fields — CRITICAL\n\nRelation fields link items between collections (e.g. a post has an author from the team collection). When creating or updating items with relation fields:\n\n- **You MUST use the item's UUID**, not its name or slug\n- Use `fastmode items relations \u003Ccollection>` to get the available IDs\n- Example: `fastmode items relations posts --field author` shows team member IDs\n\n```bash\n# First, find the author's item ID\nfastmode items relations posts --field author\n# Output shows: ID: 550e8400-..., Name: Jane Doe, Slug: jane-doe\n\n# Then use that ID when creating a post\nfastmode items create posts -n \"My Post\" -d '{\"title\": \"My Post\", \"author\": \"550e8400-e29b-41d4-a716-446655440000\"}'\n```\n\n**WRONG:** `\"author\": \"Jane Doe\"` — this will NOT work.\n**CORRECT:** `\"author\": \"550e8400-e29b-41d4-a716-446655440000\"` — use the UUID.\n\n---\n\n## Content Items\n\n### Creating Items\n\n```bash\nfastmode items create \u003Ccollection> -n \"Item Name\" -d '{\"field\": \"value\"}'\n```\n\n| Flag | Description |\n|------|-------------|\n| `-n, --name \u003Cname>` | **Required.** Item name\u002Ftitle. |\n| `-s, --slug \u003Cslug>` | URL slug. Auto-generated from name if omitted. |\n| `-d, --data \u003Cjson>` | Field data as JSON string. |\n| `-f, --file \u003Cpath>` | Read field data from a JSON file (takes precedence over `-d`). |\n| `-p, --project \u003Cid>` | Project ID or name. |\n| `--draft` | Create as unpublished draft. |\n\n**Data rules:**\n- `-d` value must be valid JSON. Keys are field slugs.\n- `-f` reads from a JSON file. If both `-f` and `-d` are given, `-f` wins.\n- If neither `-d` nor `-f` is given, the item is created with just the name (no field data).\n- Rich text fields accept raw HTML: `\"body\": \"\u003Ch2>Title\u003C\u002Fh2>\u003Cp>Content here.\u003C\u002Fp>\"`\n- Relation fields require UUIDs (see above).\n- Without `--draft`, items are published immediately (`publishedAt` set to now).\n\n### Updating Items\n\n```bash\nfastmode items update \u003Ccollection> \u003Cslug> -d '{\"field\": \"new value\"}'\n```\n\n| Flag | Description |\n|------|-------------|\n| `-n, --name \u003Cname>` | New name\u002Ftitle. |\n| `-d, --data \u003Cjson>` | Updated fields as JSON. Only provided fields change — others are preserved. |\n| `-f, --file \u003Cpath>` | Read updated data from a JSON file. |\n| `-p, --project \u003Cid>` | Project ID or name. |\n| `--publish` | Set `publishedAt` to now (make item live). |\n| `--unpublish` | Set `publishedAt` to null (revert to draft). |\n\n**Update is a partial merge.** Only the fields you provide in `-d` are changed. All other fields remain as they are.\n\n### Deleting Items\n\n```bash\nfastmode items delete \u003Ccollection> \u003Cslug> --confirm\n```\n\nThe `--confirm` flag is **required**. Without it, the command refuses to run and exits with code 1. This is a safety measure — deletion is permanent and cannot be undone.\n\n**Always ask the user for confirmation before deleting.**\n\n### Draft \u002F Publish Mechanics\n\n| Action | Command |\n|--------|---------|\n| Create as published (default) | `fastmode items create posts -n \"Title\" -d '{...}'` |\n| Create as draft | `fastmode items create posts -n \"Title\" -d '{...}' --draft` |\n| Publish a draft | `fastmode items update posts my-slug --publish` |\n| Unpublish (revert to draft) | `fastmode items update posts my-slug --unpublish` |\n\n- Draft items have `publishedAt: null` and are not visible on the live site.\n- Published items have a `publishedAt` timestamp and appear on the live site.\n- Without `--draft`, new items are published immediately.\n\n---\n\n## Client Portal Management\n\nThe client portal lets you give external clients (your customers, collaborators) limited access to manage content on your FastMode site. Clients get their own login, separate from your admin account, with configurable permissions.\n\n### How It Works\n\n1. **You invite a client** by email — they receive a unique invite link\n2. **Client clicks the link** — creates a password and gets portal access\n3. **Client manages content** — based on the permissions you assigned\n4. **You control access** — update permissions or revoke access at any time\n\nThe portal is **auto-enabled** on the project when you send the first invitation. No manual setup needed.\n\n### Available Permissions\n\n| Permission | Description |\n|------------|-------------|\n| `cms.read` | View collection items |\n| `cms.write` | Create, edit, archive, and delete items |\n| `editor` | Access the visual editor |\n| `forms.read` | View form submissions |\n| `dns` | Manage DNS settings |\n| `api` | Access API and integrations |\n| `notifications` | Manage notification rules |\n| `billing` | View plans and manage billing |\n\n**Default permissions** (used when none specified): `cms.read`, `cms.write`, `editor`, `forms.read`\n\n### Inviting Clients\n\n```bash\n# Invite with default permissions\nfastmode clients invite client@example.com\n\n# Invite with a name\nfastmode clients invite client@example.com -n \"Jane Smith\"\n\n# Invite with specific permissions\nfastmode clients invite client@example.com -n \"Jane Smith\" --permissions cms.read,forms.read\n\n# Invite with all permissions\nfastmode clients invite client@example.com --permissions cms.read,cms.write,editor,forms.read,dns,api,notifications,billing\n```\n\nThe command returns an **invite URL** — share this with the client. The link expires in 7 days.\n\n**Important:**\n- Each email can only be invited once per project\n- If a client already has access, the invite will fail\n- If a pending invitation already exists for the email, the invite will fail\n\n### Listing Clients and Invitations\n\n```bash\n# See who has portal access\nfastmode clients list\n\n# See pending (unaccepted) invitations\nfastmode clients invitations\n```\n\n`clients list` shows the **access ID** for each client — you need this ID to update permissions or revoke access.\n\n### Updating Permissions\n\n```bash\n# First, get the access ID from the list\nfastmode clients list\n\n# Update permissions (replaces ALL existing permissions)\nfastmode clients update-permissions \u003CaccessId> --permissions cms.read,cms.write,editor\n```\n\n**Permissions are replaced entirely** — if a client had `cms.read,cms.write,editor,forms.read` and you set `--permissions cms.read`, they will ONLY have `cms.read`.\n\n### Revoking Access\n\n```bash\n# Revoke a client's portal access (requires --confirm)\nfastmode clients revoke \u003CaccessId> --confirm\n```\n\nThe `--confirm` flag is **required**. Without it, the command refuses to run.\n\n**Always ask the user for confirmation before revoking access.**\n\nRevoking access is a soft delete — the client's account still exists but they cannot access this project's portal. Their active sessions are terminated immediately.\n\n### Canceling Invitations\n\n```bash\n# Cancel a pending invitation (requires --confirm)\nfastmode clients cancel-invite \u003CinvitationId> --confirm\n```\n\nThe invitation link will no longer work. Use `fastmode clients invitations` to get the invitation ID.\n\n### Typical Workflow\n\n```bash\n# 1. Invite your client\nfastmode clients invite designer@agency.com -n \"Design Agency\" --permissions cms.read,cms.write,editor\n\n# 2. Share the invite URL from the output with the client\n\n# 3. Later, check who has access\nfastmode clients list\n\n# 4. Restrict a client to read-only\nfastmode clients update-permissions abc12345 --permissions cms.read\n\n# 5. Remove a client who no longer needs access\nfastmode clients revoke abc12345 --confirm\n```\n\n---\n\n## Package Structure\n\nThe deployment package is a `.zip` file with this exact structure:\n\n```\nsite.zip\n├── manifest.json              # REQUIRED — defines pages and CMS templates\n├── pages\u002F                     # Static HTML pages\n│   ├── index.html             # Homepage (REQUIRED — must have path \"\u002F\")\n│   ├── about.html\n│   └── contact.html\n├── templates\u002F                 # CMS-powered templates (if using collections)\n│   ├── posts_index.html       # Blog listing page\n│   ├── posts_detail.html      # Single blog post page\n│   └── team_index.html        # Team listing page\n└── public\u002F                    # ALL static assets (CSS, JS, images, fonts)\n    ├── css\u002F\n    │   └── style.css\n    ├── js\u002F\n    │   └── main.js\n    └── images\u002F\n        ├── logo.png\n        └── favicon.ico\n```\n\n### Strict Rules\n\n1. **`manifest.json` MUST be at the root of the zip.**\n2. **Static pages go in `pages\u002F`.** One HTML file per page.\n3. **CMS templates go in `templates\u002F`.** Convention: `{collection}_index.html` and `{collection}_detail.html`.\n4. **ALL static assets go in `public\u002F`.** CSS, JavaScript, images, fonts — everything.\n5. **Reference assets with `\u002Fpublic\u002F` prefix in HTML.** Example: `\u003Clink href=\"\u002Fpublic\u002Fcss\u002Fstyle.css\" rel=\"stylesheet\">`.\n6. **A homepage is required.** One page must have `\"path\": \"\u002F\"` in the manifest.\n\n### Critical: Asset Paths\n\n**WRONG — will 404:**\n```html\n\u003Clink href=\"\u002Fassets\u002Fcss\u002Fstyle.css\" rel=\"stylesheet\">\n\u003Clink href=\"\u002Fcss\u002Fstyle.css\" rel=\"stylesheet\">\n\u003Clink href=\"..\u002Fcss\u002Fstyle.css\" rel=\"stylesheet\">\n\u003Cscript src=\"js\u002Fmain.js\">\u003C\u002Fscript>\n```\n\n**CORRECT:**\n```html\n\u003Clink href=\"\u002Fpublic\u002Fcss\u002Fstyle.css\" rel=\"stylesheet\">\n\u003Cscript src=\"\u002Fpublic\u002Fjs\u002Fmain.js\">\u003C\u002Fscript>\n\u003Cimg src=\"\u002Fpublic\u002Fimages\u002Flogo.png\" alt=\"Logo\">\n```\n\nThis also applies **inside CSS files** — background images AND fonts:\n```css\n\u002F* WRONG *\u002F\nbackground-image: url('..\u002Fimages\u002Fbg.jpg');\nbackground-image: url('images\u002Fbg.jpg');\nsrc: url('..\u002Ffonts\u002Fcustom.woff2');\n\n\u002F* CORRECT *\u002F\nbackground-image: url('\u002Fpublic\u002Fimages\u002Fbg.jpg');\nsrc: url('\u002Fpublic\u002Ffonts\u002Fcustom.woff2');\n```\n\n**Asset path conversion table:**\n\n| Original Path | Converted Path |\n|---------------|----------------|\n| `css\u002Fstyle.css` | `\u002Fpublic\u002Fcss\u002Fstyle.css` |\n| `..\u002Fcss\u002Fstyle.css` | `\u002Fpublic\u002Fcss\u002Fstyle.css` |\n| `.\u002Fimages\u002Flogo.png` | `\u002Fpublic\u002Fimages\u002Flogo.png` |\n| `\u002Fimages\u002Flogo.png` | `\u002Fpublic\u002Fimages\u002Flogo.png` |\n| `..\u002Ffonts\u002Fcustom.woff` | `\u002Fpublic\u002Ffonts\u002Fcustom.woff` |\n\nExternal URLs (Google Fonts, CDNs, etc.) stay unchanged.\n\n---\n\n## Manifest Format\n\nThe `manifest.json` file defines the site structure. It uses a FLAT format for CMS templates (not nested).\n\n### Basic Example (Static Only)\n\n```json\n{\n  \"pages\": [\n    { \"path\": \"\u002F\", \"file\": \"pages\u002Findex.html\", \"title\": \"Home\" },\n    { \"path\": \"\u002Fabout\", \"file\": \"pages\u002Fabout.html\", \"title\": \"About\" },\n    { \"path\": \"\u002Fcontact\", \"file\": \"pages\u002Fcontact.html\", \"title\": \"Contact\" }\n  ]\n}\n```\n\n### With CMS Collections\n\n```json\n{\n  \"pages\": [\n    { \"path\": \"\u002F\", \"file\": \"pages\u002Findex.html\", \"title\": \"Home\" },\n    { \"path\": \"\u002Fabout\", \"file\": \"pages\u002Fabout.html\", \"title\": \"About\" }\n  ],\n  \"cmsTemplates\": {\n    \"postsIndex\": \"templates\u002Fposts_index.html\",\n    \"postsIndexPath\": \"\u002Fblog\",\n    \"postsDetail\": \"templates\u002Fposts_detail.html\",\n    \"postsDetailPath\": \"\u002Fblog\",\n    \"teamIndex\": \"templates\u002Fteam_index.html\",\n    \"teamIndexPath\": \"\u002Fteam\"\n  }\n}\n```\n\n### CMS Template Keys — FLAT Format\n\nEach collection needs 2-4 keys in `cmsTemplates`. The format is `{collectionSlug}Index`, `{collectionSlug}IndexPath`, `{collectionSlug}Detail`, `{collectionSlug}DetailPath`.\n\n| Key | Required | Description |\n|-----|----------|-------------|\n| `{slug}Index` | Yes | Path to the collection listing template file |\n| `{slug}IndexPath` | Yes | URL path for the listing page (e.g. `\u002Fblog`) |\n| `{slug}Detail` | No | Path to the single item template file |\n| `{slug}DetailPath` | No | URL path prefix for item pages (e.g. `\u002Fblog` → `\u002Fblog\u002Fitem-slug`) |\n\n**Example for a \"services\" collection:**\n```json\n\"cmsTemplates\": {\n  \"servicesIndex\": \"templates\u002Fservices_index.html\",\n  \"servicesIndexPath\": \"\u002Fservices\",\n  \"servicesDetail\": \"templates\u002Fservices_detail.html\",\n  \"servicesDetailPath\": \"\u002Fservices\"\n}\n```\n\n### Common Manifest Mistakes — AI Agents Frequently Get This Wrong\n\n**AI agents frequently use a nested object format or \"collections\" key that FastMode does NOT support.** Read carefully.\n\n**WRONG — using \"collections\" key (MOST COMMON AI MISTAKE):**\n```json\n{\n  \"collections\": {\n    \"posts\": {\n      \"indexPath\": \"\u002Fblog\",\n      \"indexFile\": \"collections\u002Fposts\u002Findex.html\",\n      \"detailPath\": \"\u002Fblog\u002F:slug\",\n      \"detailFile\": \"collections\u002Fposts\u002Fdetail.html\"\n    }\n  }\n}\n```\n\n**WRONG — nested objects inside cmsTemplates:**\n```json\n\"cmsTemplates\": {\n  \"posts\": {\n    \"indexPath\": \"\u002Fblog\",\n    \"detailPath\": \"\u002Fblog\"\n  }\n}\n```\n\n**WRONG — singular slug names:**\n```json\n\"postIndex\": \"...\"   \u002F\u002F Should be \"postsIndex\"\n\"postDetail\": \"...\"  \u002F\u002F Should be \"postsDetail\"\n```\n\n**CORRECT — flat keys using `cmsTemplates`, matching the collection slug exactly:**\n```json\n\"cmsTemplates\": {\n  \"postsIndex\": \"templates\u002Fposts_index.html\",\n  \"postsIndexPath\": \"\u002Fblog\",\n  \"postsDetail\": \"templates\u002Fposts_detail.html\",\n  \"postsDetailPath\": \"\u002Fblog\"\n}\n```\n\nKey rules:\n- Use `cmsTemplates`, **NOT** `collections`\n- Use **FLAT** keys: `{slug}Index`, `{slug}Detail`, `{slug}IndexPath`, `{slug}DetailPath`\n- Do **NOT** nest objects inside collection names\n- Use `fastmode validate manifest manifest.json` to catch these errors before deploying\n\n### Optional: Head\u002FBody Injection\n\n```json\n{\n  \"pages\": [...],\n  \"cmsTemplates\": {...},\n  \"defaultHeadHtml\": \"\u003Clink rel=\\\"stylesheet\\\" href=\\\"\u002Fpublic\u002Fcss\u002Fglobal.css\\\">\",\n  \"defaultBodyEndHtml\": \"\u003Cscript src=\\\"\u002Fpublic\u002Fjs\u002Fanalytics.js\\\">\u003C\u002Fscript>\"\n}\n```\n\n---\n\n## Template Syntax\n\nFastMode templates use Handlebars-style tokens. There are three types of templates:\n\n- **Static pages** (`pages\u002F`): Fixed HTML with optional `data-edit-key` attributes for inline CMS editing and optional `{{#each}}` loops for dynamic content.\n- **Index templates** (`templates\u002F`): Collection listing pages. **MUST** contain at least one `{{#each collectionSlug}}` loop.\n- **Detail templates** (`templates\u002F`): Single item pages. **MUST** contain CMS tokens like `{{name}}`, `{{{body}}}`, etc.\n\n### SEO Tags — Do NOT Include\n\nFastMode automatically manages all SEO meta tags. Including them in your HTML will cause duplicate tags (bad for SEO ranking). **Remove ALL of these from your templates:**\n\n| Tag | Why to Remove |\n|-----|---------------|\n| `\u003Ctitle>...\u003C\u002Ftitle>` | Managed via CMS Settings |\n| `\u003Cmeta name=\"description\">` | Managed via CMS Settings |\n| `\u003Cmeta name=\"keywords\">` | Managed via CMS Settings |\n| `\u003Cmeta property=\"og:*\">` | Open Graph auto-generated |\n| `\u003Cmeta name=\"twitter:*\">` | Twitter cards auto-generated |\n| `\u003Clink rel=\"icon\">` | Favicon managed in settings |\n| `\u003Clink rel=\"shortcut icon\">` | Favicon managed in settings |\n| `\u003Clink rel=\"apple-touch-icon\">` | Managed by FastMode |\n| `\u003Cmeta name=\"google-site-verification\">` | Managed in settings |\n\n**Correct `\u003Chead>` structure:**\n```html\n\u003Chead>\n  \u003Cmeta charset=\"UTF-8\">\n  \u003Cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  \u003C!-- SEO managed by Fast Mode — do not add title, description, or OG tags -->\n  \u003Clink rel=\"stylesheet\" href=\"\u002Fpublic\u002Fcss\u002Fstyle.css\">\n  \u003C!-- External fonts, scripts, etc. are fine -->\n  \u003Clink href=\"https:\u002F\u002Ffonts.googleapis.com\u002Fcss2?family=Inter:wght@400;600&display=swap\" rel=\"stylesheet\">\n\u003C\u002Fhead>\n```\n\n### Built-in Fields (Every Item Has These)\n\n| Token | Description | Example |\n|-------|-------------|---------|\n| `{{name}}` | Item name\u002Ftitle | `\u003Ch1>{{name}}\u003C\u002Fh1>` |\n| `{{slug}}` | URL slug | `\u003Ca href=\"\u002Fposts\u002F{{slug}}\">` |\n| `{{url}}` | Full URL to detail page | `\u003Ca href=\"{{url}}\">Read more\u003C\u002Fa>` |\n| `{{publishedAt}}` | Publish date | `\u003Ctime>{{publishedAt}}\u003C\u002Ftime>` |\n| `{{createdAt}}` | Creation date | |\n| `{{updatedAt}}` | Last modified date | |\n\n### Regular Fields — Double Braces `{{field}}`\n\nUsed for text, number, date, image, url, email, select, boolean fields:\n\n```html\n\u003Ch1>{{name}}\u003C\u002Fh1>\n\u003Cp>{{excerpt}}\u003C\u002Fp>\n\u003Cimg src=\"{{featured-image}}\" alt=\"{{name}}\">\n\u003Cspan>Category: {{category}}\u003C\u002Fspan>\n\u003Ca href=\"{{website-url}}\">Visit\u003C\u002Fa>\n```\n\n### Rich Text Fields — Triple Braces `{{{field}}}`\n\n**CRITICAL:** Rich text fields contain HTML. You **MUST** use triple braces `{{{ }}}` so the HTML renders correctly. Double braces will escape the HTML and display raw tags as text.\n\n```html\n\u003C!-- CORRECT — HTML renders properly -->\n\u003Cdiv class=\"content\">{{{body}}}\u003C\u002Fdiv>\n\u003Cdiv class=\"bio\">{{{bio}}}\u003C\u002Fdiv>\n\n\u003C!-- WRONG — HTML appears as escaped text like &lt;p&gt;Hello&lt;\u002Fp&gt; -->\n\u003Cdiv class=\"content\">{{body}}\u003C\u002Fdiv>\n```\n\n### Loops — `{{#each collection}}`\n\nUsed in index templates and static pages to iterate over collection items.\n\n**Basic loop:**\n```html\n{{#each posts}}\n  \u003Carticle>\n    \u003Ch2>\u003Ca href=\"{{url}}\">{{name}}\u003C\u002Fa>\u003C\u002Fh2>\n    \u003Cp>{{excerpt}}\u003C\u002Fp>\n  \u003C\u002Farticle>\n{{\u002Feach}}\n```\n\n**Loop modifiers:**\n\n| Modifier | Description | Example |\n|----------|-------------|---------|\n| `limit=N` | Maximum items | `{{#each posts limit=6}}` |\n| `sort=\"field\"` | Sort by field | `{{#each posts sort=\"publishedAt\"}}` |\n| `order=\"asc\\|desc\"` | Sort direction | `{{#each posts sort=\"name\" order=\"asc\"}}` |\n| `featured=true` | Only featured items | `{{#each posts featured=true limit=3}}` |\n| `where=\"field.slug:{{slug}}\"` | Filter by relation | `{{#each posts where=\"author.slug:{{slug}}\"}}` |\n\n**Combined modifiers:**\n```html\n\u003C!-- Latest 3 featured posts, newest first -->\n{{#each posts featured=true limit=3 sort=\"publishedAt\" order=\"desc\"}}\n  \u003Carticle>{{name}}\u003C\u002Farticle>\n{{\u002Feach}}\n```\n\n### Loop Variables\n\nAvailable only inside `{{#each}}` blocks:\n\n| Variable | Description | Example |\n|----------|-------------|---------|\n| `{{@index}}` | Zero-based index (0, 1, 2...) | `Item {{@index}}` |\n| `{{@first}}` | True for the first item | `{{#if @first}}hero{{\u002Fif}}` |\n| `{{@last}}` | True for the last item | `{{#unless @last}},{{\u002Funless}}` |\n| `{{@length}}` | Total number of items | `Showing {{@length}} items` |\n\n**Do NOT use loop variables outside `{{#each}}` blocks** — they will produce warnings and undefined values.\n\n```html\n{{#each posts}}\n  {{#if @first}}\n    \u003Cdiv class=\"hero\">\n      \u003Ch1>{{name}}\u003C\u002Fh1>\n    \u003C\u002Fdiv>\n  {{else}}\n    \u003Cdiv class=\"card\">\n      \u003Ch3>{{name}}\u003C\u002Fh3>\n    \u003C\u002Fdiv>\n  {{\u002Fif}}\n{{\u002Feach}}\n```\n\n### Conditionals — `{{#if}}`, `{{#unless}}`\n\n```html\n\u003C!-- Show if field has a value -->\n{{#if image}}\n  \u003Cimg src=\"{{image}}\" alt=\"{{name}}\">\n{{\u002Fif}}\n\n\u003C!-- Show if field has a value, with fallback -->\n{{#if thumbnail}}\n  \u003Cimg src=\"{{thumbnail}}\" alt=\"\">\n{{else}}\n  \u003Cdiv class=\"placeholder\">No image\u003C\u002Fdiv>\n{{\u002Fif}}\n\n\u003C!-- Show if field is empty\u002Fmissing -->\n{{#unless posts}}\n  \u003Cp>No posts yet.\u003C\u002Fp>\n{{\u002Funless}}\n```\n\n### Equality & Comparison Helpers\n\n```html\n\u003C!-- Equal -->\n{{#if (eq status \"published\")}}\n  \u003Cspan class=\"badge\">Published\u003C\u002Fspan>\n{{\u002Fif}}\n\n\u003C!-- Not equal — useful for \"Related Items\" excluding current item -->\n{{#unless (eq slug ..\u002Fslug)}}\n  \u003Ca href=\"{{url}}\">{{name}}\u003C\u002Fa>\n{{\u002Funless}}\n\n\u003C!-- Numeric comparisons -->\n{{#if (lt @index 1)}}   \u003C!-- Less than -->\n{{#if (gt @index 0)}}   \u003C!-- Greater than -->\n{{#if (lte price 100)}} \u003C!-- Less than or equal -->\n{{#if (gte stock 5)}}   \u003C!-- Greater than or equal -->\n{{#if (ne status \"draft\")}} \u003C!-- Not equal -->\n```\n\n**Hero + grid layout pattern:**\n```html\n{{#each posts}}\n  {{#if (lt @index 1)}}\n    \u003Cdiv class=\"hero\">\u003Ch1>{{name}}\u003C\u002Fh1>\u003C\u002Fdiv>\n  {{else}}\n    {{#if (lt @index 4)}}\n      \u003Cdiv class=\"featured\">\u003Ch3>{{name}}\u003C\u002Fh3>\u003C\u002Fdiv>\n    {{else}}\n      \u003Cdiv class=\"list-item\">{{name}}\u003C\u002Fdiv>\n    {{\u002Fif}}\n  {{\u002Fif}}\n{{\u002Feach}}\n```\n\n### Relation Fields — Dot Notation\n\nAccess fields on related items using dot notation:\n\n```html\n{{#each posts}}\n  \u003Carticle>\n    \u003Ch2>{{name}}\u003C\u002Fh2>\n    {{#if author}}\n      \u003Cspan class=\"author\">By {{author.name}}\u003C\u002Fspan>\n      {{#if author.photo}}\n        \u003Cimg src=\"{{author.photo}}\" alt=\"{{author.name}}\">\n      {{\u002Fif}}\n    {{\u002Fif}}\n  \u003C\u002Farticle>\n{{\u002Feach}}\n```\n\nAvailable: `{{relation.name}}`, `{{relation.slug}}`, `{{relation.url}}`, `{{relation.anyField}}`.\n\n### Parent Context — `..\u002F`\n\nInside a loop, access the parent scope (the current page's item) with `..\u002F`:\n\n```html\n\u003C!-- On an author detail page, show only THIS author's posts -->\n\u003Ch1>{{name}}\u003C\u002Fh1>\n\n\u003Ch2>Posts by {{name}}\u003C\u002Fh2>\n{{#each posts}}\n  {{#if (eq author.name ..\u002Fname)}}\n    \u003Carticle>\n      \u003Ch2>\u003Ca href=\"{{url}}\">{{name}}\u003C\u002Fa>\u003C\u002Fh2>\n    \u003C\u002Farticle>\n  {{\u002Fif}}\n{{\u002Feach}}\n```\n\n### Nested Loops with `@root.`\n\nWhen nesting loops, use `@root.` to reference root-level collections:\n\n```html\n{{#each categories}}\n  \u003Ch3>{{name}}\u003C\u002Fh3>\n  {{#each @root.posts where=\"category.slug:{{slug}}\"}}\n    \u003Ca href=\"{{url}}\">{{name}}\u003C\u002Fa>\n  {{\u002Feach}}\n{{\u002Feach}}\n```\n\n### Inline Editing — `data-edit-key` (CRITICAL for Static Pages)\n\n**Without `data-edit-key` attributes, static pages have NO editable content in the CMS dashboard.** Every text element that should be editable MUST have one.\n\n```html\n\u003C!-- Static pages — REQUIRED for editable content -->\n\u003Ch1 data-edit-key=\"home-hero-title\">Welcome to Our Site\u003C\u002Fh1>\n\u003Cp data-edit-key=\"home-hero-subtitle\">We build amazing things.\u003C\u002Fp>\n\u003Cp data-edit-key=\"home-about-text\">Our story began in 2020...\u003C\u002Fp>\n\n\u003C!-- Hierarchical naming for sections -->\n\u003Csection class=\"about\">\n  \u003Ch2 data-edit-key=\"about-section-title\">About Us\u003C\u002Fh2>\n  \u003Cp data-edit-key=\"about-section-paragraph-1\">First paragraph...\u003C\u002Fp>\n  \u003Cp data-edit-key=\"about-section-paragraph-2\">Second paragraph...\u003C\u002Fp>\n\u003C\u002Fsection>\n\n\u003C!-- CMS templates — optional, for hardcoded headers -->\n\u003Ch1 data-edit-key=\"blog-page-title\">Our Blog\u003C\u002Fh1>\n```\n\n**Naming convention: `{page}-{section}-{element}`**\n\nExamples: `home-hero-title`, `about-team-heading`, `contact-form-intro`, `services-cta-button`\n\nRules:\n- Keys must be unique across the **entire site** (not just the page).\n- Use lowercase with hyphens.\n- For different pages, prefix with the page name.\n- Static pages without edit keys will appear in the CMS but have nothing editable.\n\n### Video Embeds\n\n```html\n{{#if video}}\n  \u003Ciframe\n    src=\"{{video}}\"\n    allowfullscreen\n    referrerpolicy=\"strict-origin-when-cross-origin\"\n    title=\"Video\"\n  >\u003C\u002Fiframe>\n{{\u002Fif}}\n```\n\nThe `referrerpolicy=\"strict-origin-when-cross-origin\"` attribute is **required** for YouTube embeds — without it, videos may show Error 150\u002F153.\n\n### Images — Static vs CMS Content\n\nThere are two types of images and they are handled differently:\n\n**1. Static\u002FUI images** — logos, icons, decorative backgrounds bundled with the site:\n```html\n\u003C!-- KEEP these as static \u002Fpublic\u002F paths -->\n\u003Cimg src=\"\u002Fpublic\u002Fimages\u002Flogo.png\" alt=\"Company Logo\">\n\u003Cimg src=\"\u002Fpublic\u002Fimages\u002Ficons\u002Farrow.svg\" alt=\"\">\n```\n\n**2. CMS content images** — post images, team photos, product images managed through the CMS:\n```html\n\u003C!-- USE CMS tokens — NEVER hardcode content image URLs -->\n{{#if image}}\n  \u003Cimg src=\"{{image}}\" alt=\"{{name}}\">\n{{\u002Fif}}\n```\n\n**Rule of thumb:** If it's site branding\u002Fdesign → keep static. If it's content that changes per item → use CMS tokens.\n\n**Always wrap CMS images in `{{#if}}`** — not every item may have an image:\n```html\n{{#if image}}\n  \u003Cimg src=\"{{image}}\" alt=\"{{name}}\">\n{{else}}\n  \u003Cdiv class=\"placeholder-image\">\u003C\u002Fdiv>\n{{\u002Fif}}\n```\n\n**Common mistake — mixing static and CMS images:**\n```html\n\u003C!-- WRONG: hardcoded image inside a CMS loop -->\n{{#each products}}\n  \u003Cimg src=\"\u002Fimages\u002Fproduct-placeholder.jpg\" alt=\"Product\">  \u003C!-- BAD -->\n  \u003Ch2>{{name}}\u003C\u002Fh2>\n{{\u002Feach}}\n\n\u003C!-- CORRECT: all content comes from CMS -->\n{{#each products}}\n  {{#if image}}\n    \u003Cimg src=\"{{image}}\" alt=\"{{name}}\">\n  {{\u002Fif}}\n  \u003Ch2>{{name}}\u003C\u002Fh2>\n{{\u002Feach}}\n```\n\n### Forms\n\n```html\n\u003Cform data-form-name=\"contact\" action=\"\u002F_forms\u002Fcontact\" method=\"POST\">\n  \u003Cinput type=\"text\" name=\"name\" placeholder=\"Your name\" required>\n  \u003Cinput type=\"email\" name=\"email\" placeholder=\"Your email\" required>\n  \u003Ctextarea name=\"message\" placeholder=\"Your message\" required>\u003C\u002Ftextarea>\n  \u003Cbutton type=\"submit\">Send Message\u003C\u002Fbutton>\n\u003C\u002Fform>\n```\n\nRules:\n- `data-form-name` attribute is required.\n- `action` must point to `\u002F_forms\u002F{formName}`.\n- All inputs must have `name` attributes.\n- A submit button is required.\n\n**CRITICAL: Remove Original Form Handlers**\n\nIf the source site has JavaScript that handles form submissions, you **MUST** remove or replace it. Original site JS often does `e.preventDefault()` and shows a \"fake\" success toast — the data goes nowhere.\n\n```javascript\n\u002F\u002F PROBLEM: This blocks real submissions!\nform.addEventListener('submit', (e) => {\n  e.preventDefault();\n  showToast('Message sent!');  \u002F\u002F FAKE! Data not saved!\n});\n```\n\n**Option A (simplest):** Remove the original JavaScript form handler entirely. The native `\u003Cform action=\"\u002F_forms\u002Fcontact\" method=\"POST\">` will submit correctly.\n\n**Option B (keep JS UX):** Replace the handler with one that actually POSTs to FastMode:\n```javascript\nform.addEventListener('submit', async (e) => {\n  e.preventDefault();\n  const formName = form.dataset.formName;\n  const response = await fetch('\u002F_forms\u002F' + formName, {\n    method: 'POST',\n    headers: { 'Content-Type': 'application\u002Fjson' },\n    body: JSON.stringify(Object.fromEntries(new FormData(form)))\n  });\n  if (response.ok) {\n    form.reset();\n    alert('Message sent!');  \u002F\u002F NOW it's real!\n  }\n});\n```\n\n---\n\n## Deployment & Build Status\n\n### How Deployment Works\n\n1. **Upload:** `fastmode deploy site.zip` reads the zip, validates it, and uploads it to the server.\n2. **Build:** The server processes the package (renders templates, publishes pages). This happens asynchronously.\n3. **Wait:** By default, `deploy` polls for build status every 3 seconds until the build completes or times out (default 2 minutes).\n4. **Result:** Success message with page count and version, or failure message with error details.\n\n### Deploy Flags\n\n| Flag | Description |\n|------|-------------|\n| `--force` | Skip the GitHub connection check. Use if the project has GitHub connected but you want to deploy via CLI anyway. |\n| `--no-wait` | Upload only — don't wait for the build to finish. Useful for fire-and-forget. |\n| `--timeout \u003Cms>` | Custom build timeout in milliseconds. Default: `120000` (2 minutes). |\n\n### Checking Build Status\n\n**After every deploy or content change, check the build status:**\n\n```bash\nfastmode status\n```\n\nIf the build failed, `status` shows:\n- The error message\n- Build logs\n- What went wrong\n\n**Always run `fastmode status` after deploying to verify the build succeeded.**\n\nIf a build fails:\n1. Run `fastmode status` to see the error\n2. Fix the issue (template errors, invalid tokens, missing files, etc.)\n3. Re-deploy with `fastmode deploy site.zip`\n\n### Deploy History\n\n```bash\nfastmode deploys                # Show last 10 deployments\nfastmode deploys --limit 5     # Show last 5\n```\n\nShows status, version, duration, source, and errors for each deployment.\n\n### Exit Codes\n\n- `deploy`: Exits 1 if the build fails (when waiting).\n- `status`: Exits 1 if the latest deploy shows \"Failed\".\n- Both: Exit 1 if no project is specified.\n\n---\n\n## Validation\n\nAlways validate before deploying. Validation catches errors that would cause build failures.\n\n### Validation Workflow\n\n```bash\n# 1. Validate the manifest\nfastmode validate manifest manifest.json\n\n# 2. Validate each template\nfastmode validate template pages\u002Findex.html -t static_page\nfastmode validate template templates\u002Fposts_index.html -t custom_index -c posts\nfastmode validate template templates\u002Fposts_detail.html -t custom_detail -c posts\n\n# 3. Validate the complete package\nfastmode validate package site.zip\n```\n\n### What Gets Checked\n\n**Manifest validation:**\n- Valid JSON syntax\n- `pages` array exists and is not empty\n- Homepage (path `\u002F`) exists\n- All file paths are valid\n- `cmsTemplates` format is correct (flat keys, not nested)\n\n**Template validation:**\n- Balanced tags: `{{#each}}` has matching `{{\u002Feach}}`, `{{#if}}` has `{{\u002Fif}}`\n- Index templates have at least one `{{#each}}` loop\n- Detail templates have CMS tokens\n- Rich text fields use triple braces `{{{field}}}`\n- Loop variables only used inside loops\n- Asset paths use `\u002Fpublic\u002F` prefix\n- Forms have required attributes\n- YouTube iframes have `referrerpolicy`\n\n**Package validation:**\n- manifest.json exists at root\n- All referenced files exist in the zip\n- Assets are in `public\u002F` (not `assets\u002F` or root)\n- Templates are in `templates\u002F` (not `collections\u002F`)\n- All templates pass individual validation\n\n### Validation with Schema Check\n\nAdd `-p` to validate tokens against the actual project schema:\n\n```bash\nfastmode validate template templates\u002Fposts_detail.html -t custom_detail -c posts -p \"My Project\"\n```\n\nThis reports which tokens reference fields that don't exist in the schema yet, with instructions to create them via `fastmode schema sync`.\n\n---\n\n## Common Mistakes & How to Fix Them\n\n### 1. Assets return 404\n\n**Problem:** CSS, JS, or images don't load.\n**Cause:** Files are in `\u002Fassets\u002F` instead of `\u002Fpublic\u002F`, or paths don't include `\u002Fpublic\u002F`.\n**Fix:** Move all static files to the `public\u002F` folder. Reference them as `\u002Fpublic\u002Fcss\u002Fstyle.css`.\n\n### 2. Rich text shows as raw HTML\n\n**Problem:** Content displays `\u003Cp>Hello\u003C\u002Fp>` as text instead of rendering it.\n**Cause:** Using double braces `{{body}}` on a rich text field.\n**Fix:** Use triple braces `{{{body}}}` for all richText fields.\n\n### 3. Collection listing page is blank\n\n**Problem:** Index template shows no items.\n**Cause:** Missing `{{#each collectionSlug}}` loop.\n**Fix:** Add a loop: `{{#each posts}}...{{\u002Feach}}`.\n\n### 4. All detail pages look the same\n\n**Problem:** Every item page shows identical content.\n**Cause:** Detail template has no CMS tokens — just static HTML.\n**Fix:** Use tokens like `{{name}}`, `{{{body}}}`, `{{image}}` in the detail template.\n\n### 5. Manifest uses wrong format\n\n**Problem:** Build fails with manifest errors.\n**Cause:** Using nested objects or `\"collections\"` instead of flat `\"cmsTemplates\"` keys.\n**Fix:** Use flat format: `\"postsIndex\"`, `\"postsIndexPath\"`, `\"postsDetail\"`, `\"postsDetailPath\"`.\n\n### 6. Relation field is empty after create\n\n**Problem:** Created an item with a relation field but it's null.\n**Cause:** Used the item's name instead of its UUID.\n**Fix:** Run `fastmode items relations \u003Ccollection> --field \u003Cfield>` to get the UUID, then use that.\n\n### 7. Forms don't submit\n\n**Problem:** Form appears to submit (shows toast\u002Falert) but no data is received.\n**Cause:** Original JavaScript calls `preventDefault()` and shows a fake success message.\n**Fix:** Remove any form JavaScript that blocks submission. Use `data-form-name` and `action=\"\u002F_forms\u002FformName\"`.\n\n### 8. Static pages can't be edited in CMS\n\n**Problem:** Pages appear in the CMS but have no editable content.\n**Cause:** Missing `data-edit-key` attributes on text elements.\n**Fix:** Add `data-edit-key=\"unique-key\"` to every text element that should be editable.\n\n### 9. Deploy blocked by GitHub\n\n**Problem:** `deploy` refuses to upload, says GitHub is connected.\n**Cause:** Project has GitHub auto-deploy enabled.\n**Fix:** Use `--force` flag: `fastmode deploy site.zip --force`.\n\n### 10. Build fails after deploy\n\n**Problem:** Upload succeeds but build fails.\n**Fix:** Run `fastmode status` to see the error. Common causes: invalid tokens, missing template files, malformed manifest. Fix the issue and re-deploy.\n\n### 11. Template URLs don't match manifest\n\n**Problem:** Links in templates point to wrong paths.\n**Cause:** Template hardcodes `\u002Fposts\u002F` but manifest sets `\"postsIndexPath\": \"\u002Fblog\"`.\n**Fix:** Make sure hardcoded links in templates match the paths defined in `manifest.json`.\n\n### 12. Loop variables undefined\n\n**Problem:** `{{@index}}` or `{{@first}}` shows nothing.\n**Cause:** Used outside of a `{{#each}}` block.\n**Fix:** Only use loop variables inside `{{#each}}...{{\u002Feach}}`.\n\n### 13. Duplicate SEO meta tags\n\n**Problem:** SEO tags show up twice in the rendered HTML.\n**Cause:** HTML templates include `\u003Ctitle>`, `\u003Cmeta name=\"description\">`, or Open Graph tags.\n**Fix:** Remove all SEO tags from templates. FastMode manages them automatically via CMS Settings. See the [SEO Tags section](#seo-tags--do-not-include) above.\n\n### 14. CSS background images and fonts broken\n\n**Problem:** Background images or custom fonts don't load.\n**Cause:** CSS files use relative paths like `url('..\u002Fimages\u002Fbg.jpg')` or `url('..\u002Ffonts\u002Fcustom.woff')`.\n**Fix:** Update all paths inside CSS files to use `\u002Fpublic\u002F` prefix: `url('\u002Fpublic\u002Fimages\u002Fbg.jpg')`, `url('\u002Fpublic\u002Ffonts\u002Fcustom.woff2')`.\n\n### 15. Hardcoded example content instead of CMS tokens\n\n**Problem:** Index page shows static placeholder cards instead of real CMS data.\n**Cause:** Template has hardcoded HTML cards instead of `{{#each}}` loops with CMS tokens.\n**Fix:** Replace hardcoded content blocks with `{{#each collection}}...{{\u002Feach}}` loops using CMS field tokens.\n\n---\n\n## Pre-Deployment Checklist\n\nRun through this checklist before every deploy:\n\n**Structure:**\n- [ ] `manifest.json` at package root\n- [ ] Static pages in `pages\u002F` folder\n- [ ] CMS templates in `templates\u002F` folder\n- [ ] ALL assets in `public\u002F` folder (not `assets\u002F`)\n\n**SEO (CRITICAL):**\n- [ ] NO `\u003Ctitle>` tags in HTML\n- [ ] NO `\u003Cmeta name=\"description\">` tags\n- [ ] NO `\u003Cmeta property=\"og:*\">` tags\n- [ ] NO `\u003Clink rel=\"icon\">` tags\n\n**Manifest:**\n- [ ] Homepage page with `\"path\": \"\u002F\"` exists\n- [ ] CMS templates use flat `cmsTemplates` keys (NOT nested, NOT `collections`)\n- [ ] Paths match original site URLs\n\n**Templates:**\n- [ ] Index templates have `{{#each}}` loops\n- [ ] Detail templates have CMS tokens (`{{name}}`, `{{{body}}}`, etc.)\n- [ ] Rich text fields use triple braces `{{{field}}}`\n- [ ] All `{{#each}}` have matching `{{\u002Feach}}`\n- [ ] All `{{#if}}` have matching `{{\u002Fif}}`\n- [ ] Static UI images use `\u002Fpublic\u002F` paths\n- [ ] Content images use CMS tokens with `{{#if}}` wrappers\n\n**Static Pages:**\n- [ ] `data-edit-key` on every editable text element\n- [ ] Keys are unique across the entire site\n- [ ] Forms have `data-form-name` and `action=\"\u002F_forms\u002F{name}\"`\n- [ ] Original form JavaScript handlers removed or replaced\n\n**Assets:**\n- [ ] All HTML asset paths use `\u002Fpublic\u002F` prefix\n- [ ] CSS `background-image` and font `url()` paths use `\u002Fpublic\u002F` prefix\n- [ ] External URLs (Google Fonts, CDNs) unchanged\n\n**Validation:**\n```bash\nfastmode validate manifest manifest.json\nfastmode validate template \u003Ceach-template> -t \u003Ctype> [-c \u003Ccollection>]\nfastmode validate package site.zip\n```\n\n---\n\n## Error Handling & Exit Codes\n\nAll commands exit with code **0** on success and code **1** on failure.\n\n### Commands that exit 1\n\n| Scenario | Commands |\n|----------|----------|\n| No project specified | All project-scoped commands |\n| File not found | `schema sync`, `items create -f`, `validate *` |\n| Invalid JSON | `schema sync`, `items create -d`, `items update -d` |\n| Validation errors | `validate manifest`, `validate template`, `validate package` |\n| Build failed | `deploy` (when waiting), `status` |\n| Delete without `--confirm` | `items delete` |\n\n### Error Messages\n\n```\nError: No project specified.\nUse -p \u003Cid-or-name>, set FASTMODE_PROJECT env var, or run: fastmode use \u003Cproject>\n```\n\n```\nError: File not found: schema.json\n```\n\n```\nError: Invalid JSON in --data argument\n```\n\n```\nError: Deletion requires the --confirm flag. This action cannot be undone.\n```\n\n### Authentication Errors\n\nMost commands auto-trigger `fastmode login` if credentials are missing or expired. If authentication fails:\n1. Run `fastmode login` manually\n2. Complete the browser flow\n3. Retry the command\n\n### File Locations\n\n| Path | Purpose |\n|------|---------|\n| `~\u002F.fastmode\u002Fcredentials.json` | OAuth tokens (auto-created by `login`) |\n| `~\u002F.fastmode\u002Fconfig.json` | Default project setting (created by `use`) |\n\nBoth files have restricted permissions (0o600 — owner read\u002Fwrite only).\n\n---\n\n## Notes\n\n- All project-scoped commands use your default project (set with `fastmode use`). Override with `-p \u003Cname-or-id>`.\n- Item data (`-d`) must be valid JSON. For complex data, write a file and use `-f data.json`.\n- Rich text fields accept HTML content (e.g. `\u003Cp>`, `\u003Ch2>`, `\u003Cul>`, `\u003Ca>`). Always use triple braces in templates.\n- Relation fields require item IDs (UUIDs). Use `fastmode items relations` to find available IDs.\n- The `--draft` flag creates unpublished items. Use `--publish`\u002F`--unpublish` to change status.\n- Every site gets free hosting, free SSL, and a `.fastmode.ai` subdomain. Custom domains can be configured.\n- After deploying or making content changes, always run `fastmode status` to verify the build succeeded.\n- Use `fastmode examples \u003Ctype>` and `fastmode guide [section]` for built-in documentation and code snippets.\n\n---\n\n## Package Provenance\n\n- **npm package:** [fastmode-cli](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Ffastmode-cli)\n- **Source code:** [github.com\u002Farihgoldstein\u002Ffastmode-mcp](https:\u002F\u002Fgithub.com\u002Farihgoldstein\u002Ffastmode-mcp)\n- **Website:** [fastmode.ai](https:\u002F\u002Ffastmode.ai)\n- **Author:** Arih Goldstein\n- **License:** MIT\n","# FastMode CLI — Complete Agent Reference\n\nFastMode lets you create a live website, deploy it to the cloud, and manage all its content — entirely from the command line. One-time browser login for OAuth authentication, then every operation runs in the terminal. No local servers, no manual dashboards.\n\n- **Free cloud hosting** — every site gets a live URL at `yoursite.fastmode.ai`\n- **Free SSL** — HTTPS included automatically\n- **Custom domains** — connect any domain (e.g. `www.example.com`)\n- **Full CMS** — any content structure (blog, team, products, portfolios, anything)\n- **Agent-native** — every operation works via CLI, zero human intervention needed\n\n---\n\n## Table of Contents\n\n1. [End-to-End Workflow](#end-to-end-workflow)\n2. [CRITICAL: Before You Build Anything](#critical-before-you-build-anything)\n3. [Website Analysis](#website-analysis-do-this-before-writing-code)\n4. [Command Reference](#command-reference)\n5. [Project Resolution](#project-resolution)\n6. [Schema & Field Types](#schema--field-types)\n7. [Content Items](#content-items)\n8. [Client Portal Management](#client-portal-management)\n9. [Package Structure](#package-structure)\n10. [Manifest Format](#manifest-format)\n11. [Template Syntax](#template-syntax) (includes SEO rules, image handling, forms, inline editing)\n12. [Deployment & Build Status](#deployment--build-status)\n13. [Validation](#validation)\n14. [Common Mistakes & How to Fix Them](#common-mistakes--how-to-fix-them)\n15. [Pre-Deployment Checklist](#pre-deployment-checklist)\n15. [Error Handling & Exit Codes](#error-handling--exit-codes)\n\n---\n\n## End-to-End Workflow\n\nThis is the complete sequence to go from nothing to a live website.\n\n```bash\n# 1. Authenticate (one-time — credentials persist at ~\u002F.fastmode\u002Fcredentials.json)\nfastmode login\n\n# 2. Create a project (gets a free hosted URL instantly)\nfastmode projects create \"Acme Corp\"\nfastmode use \"Acme Corp\"\n\n# 3. Define content structure (write schema.json, then sync it)\nfastmode schema sync -f schema.json\n\n# 4. Add content\nfastmode items create posts -n \"Welcome\" -d '{\"title\": \"Welcome to Acme\", \"body\": \"\u003Cp>We build great things.\u003C\u002Fp>\"}'\nfastmode items create team -n \"Jane Doe\" -d '{\"role\": \"Founder\", \"bio\": \"\u003Cp>Visionary leader.\u003C\u002Fp>\"}'\n\n# 5. Build HTML templates with {{tokens}}, package into a zip, validate, deploy\nfastmode validate package site.zip\nfastmode deploy site.zip\n# Deploy waits for build to finish and reports success or failure with error details\n\n# 6. If the build failed, check what went wrong\nfastmode status\n# Fix the issue, then re-deploy\n```\n\n---\n\n## CRITICAL: Before You Build Anything\n\n**STOP. Before writing ANY HTML, templates, or manifest.json, complete these steps.**\n\n### Step 1: Check for Existing Projects\n\n```bash\nfastmode projects\n```\n\nThis lists all the user's existing FastMode projects.\n\n### Step 2: Decide — Existing or New Project\n\n**If projects exist:** Ask the user: \"Is this website for one of your existing projects, or should I create a new one?\" Let the user choose.\n\n**If NO projects exist:** This is a new user — ask: \"What would you like to name your new project?\"\n\n### Step 3a: For EXISTING Projects\n\n1. User selects the project from the list\n2. Run `fastmode use \"Project Name\"` to set it as default\n3. Run `fastmode schema show` to get the current collections and fields\n4. **Use this schema to build templates with the correct field names**\n\n### Step 3b: For NEW Projects\n\n1. Ask for the project name if you don't have it\n2. Run `fastmode projects create \"Project Name\"`\n3. Run `fastmode use \"Project Name\"`\n4. You'll create the schema later with `fastmode schema sync`\n5. Optionally generate sample content: `fastmode generate-samples`\n\n### Checkpoint — Confirm Before Continuing\n\n| Requirement | How to Get It |\n|-------------|---------------|\n| Project selected\u002Fcreated | `fastmode projects` \u002F `fastmode projects create` |\n| Default set | `fastmode use \"Project Name\"` |\n| Schema known (existing) | `fastmode schema show` |\n\n**If you don't have a project set, DO NOT PROCEED.** Go back to Step 1.\n\n**WHY THIS MATTERS:**\n- For existing projects: The schema determines which fields to use in templates — get it wrong and the build fails\n- For new projects: You need the project before you can deploy\n- Always: The user must confirm which project to use — never assume\n\n---\n\n## Website Analysis (Do This Before Writing Code)\n\nBefore writing any HTML or templates, analyze the site:\n\n1. **Map ALL URLs** — document every page path (`\u002F`, `\u002Fabout`, `\u002Fblog`, `\u002Fblog\u002Fpost-slug`, etc.)\n2. **Categorize each page** — Static (fixed content), List (shows multiple items), or Detail (single item from a collection)\n3. **Identify collections** — repeating content that should be CMS-managed (blog posts, team members, products, testimonials, etc.)\n4. **Document assets** — all CSS, JS, image, and font file locations\n5. **PRESERVE original URLs** — if the site uses `\u002Fresources` for articles, keep `\u002Fresources`. Do NOT change it to `\u002Fblog`. Use the manifest's path configuration.\n\n---\n\n## Command Reference\n\n### Authentication\n\n```bash\nfastmode login                          # Open browser for OAuth device flow\nfastmode logout                         # Delete ~\u002F.fastmode\u002Fcredentials.json\nfastmode whoami                         # Show current user email and name\n```\n\n- `login` uses OAuth 2.0 device authorization flow: opens a browser window where the user approves access on `fastmode.ai`, then credentials are saved automatically. The browser is only needed for this one-time login step.\n- **OAuth scopes:** The token grants access to the user's FastMode projects only (project management, schema editing, content CRUD, deployments). No third-party service access is requested.\n- Credentials persist at `~\u002F.fastmode\u002Fcredentials.json` with restricted file permissions (`0o600` — owner read\u002Fwrite only). Treat this file as a sensitive secret.\n- Tokens auto-refresh. If a token expires, the next command will refresh it silently using the stored refresh token.\n- If credentials are missing or invalid, most commands will trigger the login flow automatically.\n- `logout` deletes `~\u002F.fastmode\u002Fcredentials.json` and revokes the stored tokens.\n\n### Projects\n\n```bash\nfastmode projects                       # List all projects (default action)\nfastmode projects list                  # Same as above\nfastmode projects create \"Name\"         # Create a new project\nfastmode projects create \"Name\" --subdomain custom-sub  # Custom subdomain\nfastmode projects create \"Name\" --force                  # Skip similar-name check\nfastmode use \u003Cproject>                  # Set default project for all commands\n```\n\n- `projects create` checks for existing projects with similar names. Use `--force` to skip.\n- Subdomain auto-generated from name if not provided (lowercase, hyphens, max 30 chars).\n- `use` stores the default in `~\u002F.fastmode\u002Fconfig.json`. Does NOT validate the project exists.\n\n### Schema\n\n```bash\nfastmode schema show                    # Show all collections and fields\nfastmode schema show -p \"Project Name\"  # Specify project\nfastmode schema sync -f schema.json     # Create collections and fields from JSON file\nfastmode schema field-types             # List all available field types (no auth needed)\n```\n\n- `schema show` requires authentication and a project.\n- `schema sync` reads a local JSON file and creates\u002Fupdates the schema. Skips duplicates. Two-phase: creates collections first, then fields (handles relation dependencies).\n- `schema field-types` works without authentication.\n\n### Content Items\n\n```bash\nfastmode items list \u003Ccollection>                          # List all items\nfastmode items list posts --limit 10 --sort publishedAt --order desc\nfastmode items get \u003Ccollection> \u003Cslug>                    # Get single item\nfastmode items create \u003Ccollection> -n \"Name\" -d '{\"field\": \"value\"}'\nfastmode items create posts -n \"Title\" -f data.json       # Data from file\nfastmode items create posts -n \"Draft Post\" -d '{}' --draft\nfastmode items update \u003Ccollection> \u003Cslug> -d '{\"field\": \"new value\"}'\nfastmode items update posts my-post -n \"New Title\"\nfastmode items update posts my-post --publish             # Publish a draft\nfastmode items update posts my-post --unpublish           # Revert to draft\nfastmode items delete \u003Ccollection> \u003Cslug> --confirm       # REQUIRES --confirm\nfastmode items relations \u003Ccollection>                     # Show linkable items for relation fields\nfastmode items relations posts --field author             # Options for specific field\n```\n\nSee the [Content Items](#content-items) section below for detailed rules on data formats, relation fields, and drafts.\n\n### Client Portal Management\n\n```bash\nfastmode clients list                              # List portal clients with access\nfastmode clients invite client@example.com         # Invite with default permissions\nfastmode clients invite client@example.com -n \"Jane\" --permissions cms.read,cms.write\nfastmode clients invitations                       # List pending invitations\nfastmode clients update-permissions \u003CaccessId> --permissions cms.read,editor\nfastmode clients revoke \u003CaccessId> --confirm       # REQUIRES --confirm\nfastmode clients cancel-invite \u003CinvitationId> --confirm  # REQUIRES --confirm\n```\n\nSee the [Client Portal Management](#client-portal-management) section below for details on permissions, invite flow, and examples.\n\n### Deployment & Build Status\n\n```bash\nfastmode deploy site.zip                # Deploy and wait for build to finish\nfastmode deploy site.zip --force        # Skip GitHub sync check\nfastmode deploy site.zip --no-wait      # Upload only, don't wait for build\nfastmode deploy site.zip --timeout 300000  # Custom timeout in ms (default: 120000)\nfastmode status                         # Check current build\u002Fdeploy status\nfastmode deploys                        # List deployment history\nfastmode deploys --limit 5             # Limit number of results\n```\n\nSee [Deployment & Build Status](#deployment--build-status) below for the full deploy lifecycle.\n\n### Validation\n\n```bash\nfastmode validate manifest manifest.json\nfastmode validate template index.html -t custom_index\nfastmode validate template post.html -t custom_detail -c posts\nfastmode validate template post.html -t custom_detail -c posts -p \"My Project\"\nfastmode validate template about.html -t static_page\nfastmode validate package site.zip\n```\n\n- Template types: `custom_index` (collection listing), `custom_detail` (single item), `static_page` (fixed page).\n- `-c` specifies the collection slug (required for `custom_index` and `custom_detail`).\n- `-p` validates tokens against the actual project schema (reports missing fields).\n- All validation commands exit with code 1 on errors — safe for CI\u002FCD pipelines.\n\n### Documentation & Examples\n\n```bash\nfastmode examples \u003Ctype>                # Code examples for a specific pattern\nfastmode guide                          # Full website conversion guide\nfastmode guide templates                # Template syntax guide\nfastmode guide common_mistakes          # Common pitfalls to avoid\nfastmode generate-samples               # Generate placeholder content for empty collections\nfastmode generate-samples -c posts team # Specific collections only\n```\n\nAvailable example types: `manifest_basic`, `manifest_custom_paths`, `blog_index_template`, `blog_post_template`, `team_template`, `downloads_template`, `form_handling`, `asset_paths`, `data_edit_keys`, `each_loop`, `conditional_if`, `nested_fields`, `featured_posts`, `parent_context`, `equality_comparison`, `comparison_helpers`, `youtube_embed`, `nested_collection_loop`, `loop_variables`, `common_mistakes`.\n\nAvailable guide sections: `full`, `first_steps`, `analysis`, `structure`, `seo`, `manifest`, `templates`, `tokens`, `forms`, `assets`, `checklist`, `common_mistakes`.\n\n---\n\n## Project Resolution\n\nEvery project-scoped command (schema, items, deploy, status, etc.) needs a project. Resolution order:\n\n1. **`-p` \u002F `--project` flag** — explicit on the command: `-p \"My Project\"` or `-p abc123-uuid`\n2. **`FASTMODE_PROJECT` environment variable** — set in shell: `export FASTMODE_PROJECT=\"My Project\"`\n3. **Default project** — saved by `fastmode use \"My Project\"` in `~\u002F.fastmode\u002Fconfig.json`\n\nIf none is set, the command prints an error and exits with code 1:\n```\nError: No project specified.\nUse -p \u003Cid-or-name>, set FASTMODE_PROJECT env var, or run: fastmode use \u003Cproject>\n```\n\nProject identifiers can be:\n- **UUID** — used directly (e.g. `550e8400-e29b-41d4-a716-446655440000`)\n- **Project name** — resolved via API (exact match first, then partial match, case-insensitive)\n\n---\n\n## Schema & Field Types\n\n### Creating a Schema\n\nWrite a `schema.json` file and sync it:\n\n```bash\nfastmode schema sync -f schema.json\n```\n\n### schema.json Format\n\n```json\n{\n  \"collections\": [\n    {\n      \"slug\": \"posts\",\n      \"name\": \"Blog Posts\",\n      \"nameSingular\": \"Blog Post\",\n      \"fields\": [\n        { \"slug\": \"title\", \"name\": \"Title\", \"type\": \"text\", \"isRequired\": true },\n        { \"slug\": \"excerpt\", \"name\": \"Excerpt\", \"type\": \"textarea\" },\n        { \"slug\": \"body\", \"name\": \"Body\", \"type\": \"richText\" },\n        { \"slug\": \"featured-image\", \"name\": \"Featured Image\", \"type\": \"image\" },\n        { \"slug\": \"category\", \"name\": \"Category\", \"type\": \"select\", \"options\": \"News, Tutorial, Update\" },\n        { \"slug\": \"tags\", \"name\": \"Tags\", \"type\": \"multiSelect\", \"options\": \"JavaScript, Python, DevOps, AI\" },\n        { \"slug\": \"featured\", \"name\": \"Featured\", \"type\": \"boolean\" },\n        { \"slug\": \"author\", \"name\": \"Author\", \"type\": \"relation\", \"referenceCollection\": \"team\" }\n      ]\n    },\n    {\n      \"slug\": \"team\",\n      \"name\": \"Team Members\",\n      \"nameSingular\": \"Team Member\",\n      \"fields\": [\n        { \"slug\": \"role\", \"name\": \"Role\", \"type\": \"text\" },\n        { \"slug\": \"bio\", \"name\": \"Bio\", \"type\": \"richText\" },\n        { \"slug\": \"photo\", \"name\": \"Photo\", \"type\": \"image\" },\n        { \"slug\": \"email\", \"name\": \"Email\", \"type\": \"email\" }\n      ]\n    }\n  ]\n}\n```\n\nTo add fields to existing collections, use `fieldsToAdd`:\n\n```json\n{\n  \"fieldsToAdd\": [\n    {\n      \"collectionSlug\": \"posts\",\n      \"fields\": [\n        { \"slug\": \"reading-time\", \"name\": \"Reading Time\", \"type\": \"number\" }\n      ]\n    }\n  ]\n}\n```\n\nYou can combine `collections` and `fieldsToAdd` in the same file. Duplicate collections and fields are automatically skipped.\n\n### Available Field Types\n\n| Type | Description | Template Usage | Notes |\n|------|-------------|----------------|-------|\n| `text` | Single-line text | `{{field}}` | Titles, names, short strings |\n| `textarea` | Multi-line plain text | `{{field}}` | Descriptions, excerpts |\n| `richText` | Formatted HTML content | `{{{field}}}` | **MUST use triple braces** |\n| `number` | Numeric value | `{{field}}` | Prices, counts, order |\n| `boolean` | True\u002Ffalse toggle | `{{#if field}}` | Toggles, flags |\n| `date` | Date only | `{{field}}` | Birth dates, event dates |\n| `datetime` | Date and time | `{{field}}` | Timestamps |\n| `image` | Image file\u002FURL | `{{field}}` | Renders as URL |\n| `file` | Downloadable file (max 10MB) | `{{field}}` | Link as `\u003Ca href=\"{{field}}\" download>` |\n| `url` | Web link | `{{field}}` | External URLs |\n| `videoEmbed` | YouTube\u002FVimeo\u002FWistia\u002FLoom | `{{field}}` | Embed URL |\n| `email` | Email with validation | `{{field}}` | Validated email addresses |\n| `select` | Single dropdown | `{{field}}` | Requires `\"options\": \"A, B, C\"` |\n| `multiSelect` | Multiple selections | `{{field}}` | Requires `\"options\": \"A, B, C\"` |\n| `relation` | Link to another collection | `{{field.name}}` | Requires `\"referenceCollection\": \"slug\"` |\n\n### Relation Fields — CRITICAL\n\nRelation fields link items between collections (e.g. a post has an author from the team collection). When creating or updating items with relation fields:\n\n- **You MUST use the item's UUID**, not its name or slug\n- Use `fastmode items relations \u003Ccollection>` to get the available IDs\n- Example: `fastmode items relations posts --field author` shows team member IDs\n\n```bash\n# First, find the author's item ID\nfastmode items relations posts --field author\n# Output shows: ID: 550e8400-..., Name: Jane Doe, Slug: jane-doe\n\n# Then use that ID when creating a post\nfastmode items create posts -n \"My Post\" -d '{\"title\": \"My Post\", \"author\": \"550e8400-e29b-41d4-a716-446655440000\"}'\n```\n\n**WRONG:** `\"author\": \"Jane Doe\"` — this will NOT work.\n**CORRECT:** `\"author\": \"550e8400-e29b-41d4-a716-446655440000\"` — use the UUID.\n\n---\n\n## Content Items\n\n### Creating Items\n\n```bash\nfastmode items create \u003Ccollection> -n \"Item Name\" -d '{\"field\": \"value\"}'\n```\n\n| Flag | Description |\n|------|-------------|\n| `-n, --name \u003Cname>` | **Required.** Item name\u002Ftitle. |\n| `-s, --slug \u003Cslug>` | URL slug. Auto-generated from name if omitted. |\n| `-d, --data \u003Cjson>` | Field data as JSON string. |\n| `-f, --file \u003Cpath>` | Read field data from a JSON file (takes precedence over `-d`). |\n| `-p, --project \u003Cid>` | Project ID or name. |\n| `--draft` | Create as unpublished draft. |\n\n**Data rules:**\n- `-d` value must be valid JSON. Keys are field slugs.\n- `-f` reads from a JSON file. If both `-f` and `-d` are given, `-f` wins.\n- If neither `-d` nor `-f` is given, the item is created with just the name (no field data).\n- Rich text fields accept raw HTML: `\"body\": \"\u003Ch2>Title\u003C\u002Fh2>\u003Cp>Content here.\u003C\u002Fp>\"`\n- Relation fields require UUIDs (see above).\n- Without `--draft`, items are published immediately (`publishedAt` set to now).\n\n### Updating Items\n\n```bash\nfastmode items update \u003Ccollection> \u003Cslug> -d '{\"field\": \"new value\"}'\n```\n\n| Flag | Description |\n|------|-------------|\n| `-n, --name \u003Cname>` | New name\u002Ftitle. |\n| `-d, --data \u003Cjson>` | Updated fields as JSON. Only provided fields change — others are preserved. |\n| `-f, --file \u003Cpath>` | Read updated data from a JSON file. |\n| `-p, --project \u003Cid>` | Project ID or name. |\n| `--publish` | Set `publishedAt` to now (make item live). |\n| `--unpublish` | Set `publishedAt` to null (revert to draft). |\n\n**Update is a partial merge.** Only the fields you provide in `-d` are changed. All other fields remain as they are.\n\n### Deleting Items\n\n```bash\nfastmode items delete \u003Ccollection> \u003Cslug> --confirm\n```\n\nThe `--confirm` flag is **required**. Without it, the command refuses to run and exits with code 1. This is a safety measure — deletion is permanent and cannot be undone.\n\n**Always ask the user for confirmation before deleting.**\n\n### Draft \u002F Publish Mechanics\n\n| Action | Command |\n|--------|---------|\n| Create as published (default) | `fastmode items create posts -n \"Title\" -d '{...}'` |\n| Create as draft | `fastmode items create posts -n \"Title\" -d '{...}' --draft` |\n| Publish a draft | `fastmode items update posts my-slug --publish` |\n| Unpublish (revert to draft) | `fastmode items update posts my-slug --unpublish` |\n\n- Draft items have `publishedAt: null` and are not visible on the live site.\n- Published items have a `publishedAt` timestamp and appear on the live site.\n- Without `--draft`, new items are published immediately.\n\n---\n\n## Client Portal Management\n\nThe client portal lets you give external clients (your customers, collaborators) limited access to manage content on your FastMode site. Clients get their own login, separate from your admin account, with configurable permissions.\n\n### How It Works\n\n1. **You invite a client** by email — they receive a unique invite link\n2. **Client clicks the link** — creates a password and gets portal access\n3. **Client manages content** — based on the permissions you assigned\n4. **You control access** — update permissions or revoke access at any time\n\nThe portal is **auto-enabled** on the project when you send the first invitation. No manual setup needed.\n\n### Available Permissions\n\n| Permission | Description |\n|------------|-------------|\n| `cms.read` | View collection items |\n| `cms.write` | Create, edit, archive, and delete items |\n| `editor` | Access the visual editor |\n| `forms.read` | View form submissions |\n| `dns` | Manage DNS settings |\n| `api` | Access API and integrations |\n| `notifications` | Manage notification rules |\n| `billing` | View plans and manage billing |\n\n**Default permissions** (used when none specified): `cms.read`, `cms.write`, `editor`, `forms.read`\n\n### Inviting Clients\n\n```bash\n# Invite with default permissions\nfastmode clients invite client@example.com\n\n# Invite with a name\nfastmode clients invite client@example.com -n \"Jane Smith\"\n\n# Invite with specific permissions\nfastmode clients invite client@example.com -n \"Jane Smith\" --permissions cms.read,forms.read\n\n# Invite with all permissions\nfastmode clients invite client@example.com --permissions cms.read,cms.write,editor,forms.read,dns,api,notifications,billing\n```\n\nThe command returns an **invite URL** — share this with the client. The link expires in 7 days.\n\n**Important:**\n- Each email can only be invited once per project\n- If a client already has access, the invite will fail\n- If a pending invitation already exists for the email, the invite will fail\n\n### Listing Clients and Invitations\n\n```bash\n# See who has portal access\nfastmode clients list\n\n# See pending (unaccepted) invitations\nfastmode clients invitations\n```\n\n`clients list` shows the **access ID** for each client — you need this ID to update permissions or revoke access.\n\n### Updating Permissions\n\n```bash\n# First, get the access ID from the list\nfastmode clients list\n\n# Update permissions (replaces ALL existing permissions)\nfastmode clients update-permissions \u003CaccessId> --permissions cms.read,cms.write,editor\n```\n\n**Permissions are replaced entirely** — if a client had `cms.read,cms.write,editor,forms.read` and you set `--permissions cms.read`, they will ONLY have `cms.read`.\n\n### Revoking Access\n\n```bash\n# Revoke a client's portal access (requires --confirm)\nfastmode clients revoke \u003CaccessId> --confirm\n```\n\nThe `--confirm` flag is **required**. Without it, the command refuses to run.\n\n**Always ask the user for confirmation before revoking access.**\n\nRevoking access is a soft delete — the client's account still exists but they cannot access this project's portal. Their active sessions are terminated immediately.\n\n### Canceling Invitations\n\n```bash\n# Cancel a pending invitation (requires --confirm)\nfastmode clients cancel-invite \u003CinvitationId> --confirm\n```\n\nThe invitation link will no longer work. Use `fastmode clients invitations` to get the invitation ID.\n\n### Typical Workflow\n\n```bash\n# 1. Invite your client\nfastmode clients invite designer@agency.com -n \"Design Agency\" --permissions cms.read,cms.write,editor\n\n# 2. Share the invite URL from the output with the client\n\n# 3. Later, check who has access\nfastmode clients list\n\n# 4. Restrict a client to read-only\nfastmode clients update-permissions abc12345 --permissions cms.read\n\n# 5. Remove a client who no longer needs access\nfastmode clients revoke abc12345 --confirm\n```\n\n---\n\n## Package Structure\n\nThe deployment package is a `.zip` file with this exact structure:\n\n```\nsite.zip\n├── manifest.json              # REQUIRED — defines pages and CMS templates\n├── pages\u002F                     # Static HTML pages\n│   ├── index.html             # Homepage (REQUIRED — must have path \"\u002F\")\n│   ├── about.html\n│   └── contact.html\n├── templates\u002F                 # CMS-powered templates (if using collections)\n│   ├── posts_index.html       # Blog listing page\n│   ├── posts_detail.html      # Single blog post page\n│   └── team_index.html        # Team listing page\n└── public\u002F                    # ALL static assets (CSS, JS, images, fonts)\n    ├── css\u002F\n    │   └── style.css\n    ├── js\u002F\n    │   └── main.js\n    └── images\u002F\n        ├── logo.png\n        └── favicon.ico\n```\n\n### Strict Rules\n\n1. **`manifest.json` MUST be at the root of the zip.**\n2. **Static pages go in `pages\u002F`.** One HTML file per page.\n3. **CMS templates go in `templates\u002F`.** Convention: `{collection}_index.html` and `{collection}_detail.html`.\n4. **ALL static assets go in `public\u002F`.** CSS, JavaScript, images, fonts — everything.\n5. **Reference assets with `\u002Fpublic\u002F` prefix in HTML.** Example: `\u003Clink href=\"\u002Fpublic\u002Fcss\u002Fstyle.css\" rel=\"stylesheet\">`.\n6. **A homepage is required.** One page must have `\"path\": \"\u002F\"` in the manifest.\n\n### Critical: Asset Paths\n\n**WRONG — will 404:**\n```html\n\u003Clink href=\"\u002Fassets\u002Fcss\u002Fstyle.css\" rel=\"stylesheet\">\n\u003Clink href=\"\u002Fcss\u002Fstyle.css\" rel=\"stylesheet\">\n\u003Clink href=\"..\u002Fcss\u002Fstyle.css\" rel=\"stylesheet\">\n\u003Cscript src=\"js\u002Fmain.js\">\u003C\u002Fscript>\n```\n\n**CORRECT:**\n```html\n\u003Clink href=\"\u002Fpublic\u002Fcss\u002Fstyle.css\" rel=\"stylesheet\">\n\u003Cscript src=\"\u002Fpublic\u002Fjs\u002Fmain.js\">\u003C\u002Fscript>\n\u003Cimg src=\"\u002Fpublic\u002Fimages\u002Flogo.png\" alt=\"Logo\">\n```\n\nThis also applies **inside CSS files** — background images AND fonts:\n```css\n\u002F* WRONG *\u002F\nbackground-image: url('..\u002Fimages\u002Fbg.jpg');\nbackground-image: url('images\u002Fbg.jpg');\nsrc: url('..\u002Ffonts\u002Fcustom.woff2');\n\n\u002F* CORRECT *\u002F\nbackground-image: url('\u002Fpublic\u002Fimages\u002Fbg.jpg');\nsrc: url('\u002Fpublic\u002Ffonts\u002Fcustom.woff2');\n```\n\n**Asset path conversion table:**\n\n| Original Path | Converted Path |\n|---------------|----------------|\n| `css\u002Fstyle.css` | `\u002Fpublic\u002Fcss\u002Fstyle.css` |\n| `..\u002Fcss\u002Fstyle.css` | `\u002Fpublic\u002Fcss\u002Fstyle.css` |\n| `.\u002Fimages\u002Flogo.png` | `\u002Fpublic\u002Fimages\u002Flogo.png` |\n| `\u002Fimages\u002Flogo.png` | `\u002Fpublic\u002Fimages\u002Flogo.png` |\n| `..\u002Ffonts\u002Fcustom.woff` | `\u002Fpublic\u002Ffonts\u002Fcustom.woff` |\n\nExternal URLs (Google Fonts, CDNs, etc.) stay unchanged.\n\n---\n\n## Manifest Format\n\nThe `manifest.json` file defines the site structure. It uses a FLAT format for CMS templates (not nested).\n\n### Basic Example (Static Only)\n\n```json\n{\n  \"pages\": [\n    { \"path\": \"\u002F\", \"file\": \"pages\u002Findex.html\", \"title\": \"Home\" },\n    { \"path\": \"\u002Fabout\", \"file\": \"pages\u002Fabout.html\", \"title\": \"About\" },\n    { \"path\": \"\u002Fcontact\", \"file\": \"pages\u002Fcontact.html\", \"title\": \"Contact\" }\n  ]\n}\n```\n\n### With CMS Collections\n\n```json\n{\n  \"pages\": [\n    { \"path\": \"\u002F\", \"file\": \"pages\u002Findex.html\", \"title\": \"Home\" },\n    { \"path\": \"\u002Fabout\", \"file\": \"pages\u002Fabout.html\", \"title\": \"About\" }\n  ],\n  \"cmsTemplates\": {\n    \"postsIndex\": \"templates\u002Fposts_index.html\",\n    \"postsIndexPath\": \"\u002Fblog\",\n    \"postsDetail\": \"templates\u002Fposts_detail.html\",\n    \"postsDetailPath\": \"\u002Fblog\",\n    \"teamIndex\": \"templates\u002Fteam_index.html\",\n    \"teamIndexPath\": \"\u002Fteam\"\n  }\n}\n```\n\n### CMS Template Keys — FLAT Format\n\nEach collection needs 2-4 keys in `cmsTemplates`. The format is `{collectionSlug}Index`, `{collectionSlug}IndexPath`, `{collectionSlug}Detail`, `{collectionSlug}DetailPath`.\n\n| Key | Required | Description |\n|-----|----------|-------------|\n| `{slug}Index` | Yes | Path to the collection listing template file |\n| `{slug}IndexPath` | Yes | URL path for the listing page (e.g. `\u002Fblog`) |\n| `{slug}Detail` | No | Path to the single item template file |\n| `{slug}DetailPath` | No | URL path prefix for item pages (e.g. `\u002Fblog` → `\u002Fblog\u002Fitem-slug`) |\n\n**Example for a \"services\" collection:**\n```json\n\"cmsTemplates\": {\n  \"servicesIndex\": \"templates\u002Fservices_index.html\",\n  \"servicesIndexPath\": \"\u002Fservices\",\n  \"servicesDetail\": \"templates\u002Fservices_detail.html\",\n  \"servicesDetailPath\": \"\u002Fservices\"\n}\n```\n\n### Common Manifest Mistakes — AI Agents Frequently Get This Wrong\n\n**AI agents frequently use a nested object format or \"collections\" key that FastMode does NOT support.** Read carefully.\n\n**WRONG — using \"collections\" key (MOST COMMON AI MISTAKE):**\n```json\n{\n  \"collections\": {\n    \"posts\": {\n      \"indexPath\": \"\u002Fblog\",\n      \"indexFile\": \"collections\u002Fposts\u002Findex.html\",\n      \"detailPath\": \"\u002Fblog\u002F:slug\",\n      \"detailFile\": \"collections\u002Fposts\u002Fdetail.html\"\n    }\n  }\n}\n```\n\n**WRONG — nested objects inside cmsTemplates:**\n```json\n\"cmsTemplates\": {\n  \"posts\": {\n    \"indexPath\": \"\u002Fblog\",\n    \"detailPath\": \"\u002Fblog\"\n  }\n}\n```\n\n**WRONG — singular slug names:**\n```json\n\"postIndex\": \"...\"   \u002F\u002F Should be \"postsIndex\"\n\"postDetail\": \"...\"  \u002F\u002F Should be \"postsDetail\"\n```\n\n**CORRECT — flat keys using `cmsTemplates`, matching the collection slug exactly:**\n```json\n\"cmsTemplates\": {\n  \"postsIndex\": \"templates\u002Fposts_index.html\",\n  \"postsIndexPath\": \"\u002Fblog\",\n  \"postsDetail\": \"templates\u002Fposts_detail.html\",\n  \"postsDetailPath\": \"\u002Fblog\"\n}\n```\n\nKey rules:\n- Use `cmsTemplates`, **NOT** `collections`\n- Use **FLAT** keys: `{slug}Index`, `{slug}Detail`, `{slug}IndexPath`, `{slug}DetailPath`\n- Do **NOT** nest objects inside collection names\n- Use `fastmode validate manifest manifest.json` to catch these errors before deploying\n\n### Optional: Head\u002FBody Injection\n\n```json\n{\n  \"pages\": [...],\n  \"cmsTemplates\": {...},\n  \"defaultHeadHtml\": \"\u003Clink rel=\\\"stylesheet\\\" href=\\\"\u002Fpublic\u002Fcss\u002Fglobal.css\\\">\",\n  \"defaultBodyEndHtml\": \"\u003Cscript src=\\\"\u002Fpublic\u002Fjs\u002Fanalytics.js\\\">\u003C\u002Fscript>\"\n}\n```\n\n---\n\n## Template Syntax\n\nFastMode templates use Handlebars-style tokens. There are three types of templates:\n\n- **Static pages** (`pages\u002F`): Fixed HTML with optional `data-edit-key` attributes for inline CMS editing and optional `{{#each}}` loops for dynamic content.\n- **Index templates** (`templates\u002F`): Collection listing pages. **MUST** contain at least one `{{#each collectionSlug}}` loop.\n- **Detail templates** (`templates\u002F`): Single item pages. **MUST** contain CMS tokens like `{{name}}`, `{{{body}}}`, etc.\n\n### SEO Tags — Do NOT Include\n\nFastMode automatically manages all SEO meta tags. Including them in your HTML will cause duplicate tags (bad for SEO ranking). **Remove ALL of these from your templates:**\n\n| Tag | Why to Remove |\n|-----|---------------|\n| `\u003Ctitle>...\u003C\u002Ftitle>` | Managed via CMS Settings |\n| `\u003Cmeta name=\"description\">` | Managed via CMS Settings |\n| `\u003Cmeta name=\"keywords\">` | Managed via CMS Settings |\n| `\u003Cmeta property=\"og:*\">` | Open Graph auto-generated |\n| `\u003Cmeta name=\"twitter:*\">` | Twitter cards auto-generated |\n| `\u003Clink rel=\"icon\">` | Favicon managed in settings |\n| `\u003Clink rel=\"shortcut icon\">` | Favicon managed in settings |\n| `\u003Clink rel=\"apple-touch-icon\">` | Managed by FastMode |\n| `\u003Cmeta name=\"google-site-verification\">` | Managed in settings |\n\n**Correct `\u003Chead>` structure:**\n```html\n\u003Chead>\n  \u003Cmeta charset=\"UTF-8\">\n  \u003Cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  \u003C!-- SEO managed by Fast Mode — do not add title, description, or OG tags -->\n  \u003Clink rel=\"stylesheet\" href=\"\u002Fpublic\u002Fcss\u002Fstyle.css\">\n  \u003C!-- External fonts, scripts, etc. are fine -->\n  \u003Clink href=\"https:\u002F\u002Ffonts.googleapis.com\u002Fcss2?family=Inter:wght@400;600&display=swap\" rel=\"stylesheet\">\n\u003C\u002Fhead>\n```\n\n### Built-in Fields (Every Item Has These)\n\n| Token | Description | Example |\n|-------|-------------|---------|\n| `{{name}}` | Item name\u002Ftitle | `\u003Ch1>{{name}}\u003C\u002Fh1>` |\n| `{{slug}}` | URL slug | `\u003Ca href=\"\u002Fposts\u002F{{slug}}\">` |\n| `{{url}}` | Full URL to detail page | `\u003Ca href=\"{{url}}\">Read more\u003C\u002Fa>` |\n| `{{publishedAt}}` | Publish date | `\u003Ctime>{{publishedAt}}\u003C\u002Ftime>` |\n| `{{createdAt}}` | Creation date | |\n| `{{updatedAt}}` | Last modified date | |\n\n### Regular Fields — Double Braces `{{field}}`\n\nUsed for text, number, date, image, url, email, select, boolean fields:\n\n```html\n\u003Ch1>{{name}}\u003C\u002Fh1>\n\u003Cp>{{excerpt}}\u003C\u002Fp>\n\u003Cimg src=\"{{featured-image}}\" alt=\"{{name}}\">\n\u003Cspan>Category: {{category}}\u003C\u002Fspan>\n\u003Ca href=\"{{website-url}}\">Visit\u003C\u002Fa>\n```\n\n### Rich Text Fields — Triple Braces `{{{field}}}`\n\n**CRITICAL:** Rich text fields contain HTML. You **MUST** use triple braces `{{{ }}}` so the HTML renders correctly. Double braces will escape the HTML and display raw tags as text.\n\n```html\n\u003C!-- CORRECT — HTML renders properly -->\n\u003Cdiv class=\"content\">{{{body}}}\u003C\u002Fdiv>\n\u003Cdiv class=\"bio\">{{{bio}}}\u003C\u002Fdiv>\n\n\u003C!-- WRONG — HTML appears as escaped text like &lt;p&gt;Hello&lt;\u002Fp&gt; -->\n\u003Cdiv class=\"content\">{{body}}\u003C\u002Fdiv>\n```\n\n### Loops — `{{#each collection}}`\n\nUsed in index templates and static pages to iterate over collection items.\n\n**Basic loop:**\n```html\n{{#each posts}}\n  \u003Carticle>\n    \u003Ch2>\u003Ca href=\"{{url}}\">{{name}}\u003C\u002Fa>\u003C\u002Fh2>\n    \u003Cp>{{excerpt}}\u003C\u002Fp>\n  \u003C\u002Farticle>\n{{\u002Feach}}\n```\n\n**Loop modifiers:**\n\n| Modifier | Description | Example |\n|----------|-------------|---------|\n| `limit=N` | Maximum items | `{{#each posts limit=6}}` |\n| `sort=\"field\"` | Sort by field | `{{#each posts sort=\"publishedAt\"}}` |\n| `order=\"asc\\|desc\"` | Sort direction | `{{#each posts sort=\"name\" order=\"asc\"}}` |\n| `featured=true` | Only featured items | `{{#each posts featured=true limit=3}}` |\n| `where=\"field.slug:{{slug}}\"` | Filter by relation | `{{#each posts where=\"author.slug:{{slug}}\"}}` |\n\n**Combined modifiers:**\n```html\n\u003C!-- Latest 3 featured posts, newest first -->\n{{#each posts featured=true limit=3 sort=\"publishedAt\" order=\"desc\"}}\n  \u003Carticle>{{name}}\u003C\u002Farticle>\n{{\u002Feach}}\n```\n\n### Loop Variables\n\nAvailable only inside `{{#each}}` blocks:\n\n| Variable | Description | Example |\n|----------|-------------|---------|\n| `{{@index}}` | Zero-based index (0, 1, 2...) | `Item {{@index}}` |\n| `{{@first}}` | True for the first item | `{{#if @first}}hero{{\u002Fif}}` |\n| `{{@last}}` | True for the last item | `{{#unless @last}},{{\u002Funless}}` |\n| `{{@length}}` | Total number of items | `Showing {{@length}} items` |\n\n**Do NOT use loop variables outside `{{#each}}` blocks** — they will produce warnings and undefined values.\n\n```html\n{{#each posts}}\n  {{#if @first}}\n    \u003Cdiv class=\"hero\">\n      \u003Ch1>{{name}}\u003C\u002Fh1>\n    \u003C\u002Fdiv>\n  {{else}}\n    \u003Cdiv class=\"card\">\n      \u003Ch3>{{name}}\u003C\u002Fh3>\n    \u003C\u002Fdiv>\n  {{\u002Fif}}\n{{\u002Feach}}\n```\n\n### Conditionals — `{{#if}}`, `{{#unless}}`\n\n```html\n\u003C!-- Show if field has a value -->\n{{#if image}}\n  \u003Cimg src=\"{{image}}\" alt=\"{{name}}\">\n{{\u002Fif}}\n\n\u003C!-- Show if field has a value, with fallback -->\n{{#if thumbnail}}\n  \u003Cimg src=\"{{thumbnail}}\" alt=\"\">\n{{else}}\n  \u003Cdiv class=\"placeholder\">No image\u003C\u002Fdiv>\n{{\u002Fif}}\n\n\u003C!-- Show if field is empty\u002Fmissing -->\n{{#unless posts}}\n  \u003Cp>No posts yet.\u003C\u002Fp>\n{{\u002Funless}}\n```\n\n### Equality & Comparison Helpers\n\n```html\n\u003C!-- Equal -->\n{{#if (eq status \"published\")}}\n  \u003Cspan class=\"badge\">Published\u003C\u002Fspan>\n{{\u002Fif}}\n\n\u003C!-- Not equal — useful for \"Related Items\" excluding current item -->\n{{#unless (eq slug ..\u002Fslug)}}\n  \u003Ca href=\"{{url}}\">{{name}}\u003C\u002Fa>\n{{\u002Funless}}\n\n\u003C!-- Numeric comparisons -->\n{{#if (lt @index 1)}}   \u003C!-- Less than -->\n{{#if (gt @index 0)}}   \u003C!-- Greater than -->\n{{#if (lte price 100)}} \u003C!-- Less than or equal -->\n{{#if (gte stock 5)}}   \u003C!-- Greater than or equal -->\n{{#if (ne status \"draft\")}} \u003C!-- Not equal -->\n```\n\n**Hero + grid layout pattern:**\n```html\n{{#each posts}}\n  {{#if (lt @index 1)}}\n    \u003Cdiv class=\"hero\">\u003Ch1>{{name}}\u003C\u002Fh1>\u003C\u002Fdiv>\n  {{else}}\n    {{#if (lt @index 4)}}\n      \u003Cdiv class=\"featured\">\u003Ch3>{{name}}\u003C\u002Fh3>\u003C\u002Fdiv>\n    {{else}}\n      \u003Cdiv class=\"list-item\">{{name}}\u003C\u002Fdiv>\n    {{\u002Fif}}\n  {{\u002Fif}}\n{{\u002Feach}}\n```\n\n### Relation Fields — Dot Notation\n\nAccess fields on related items using dot notation:\n\n```html\n{{#each posts}}\n  \u003Carticle>\n    \u003Ch2>{{name}}\u003C\u002Fh2>\n    {{#if author}}\n      \u003Cspan class=\"author\">By {{author.name}}\u003C\u002Fspan>\n      {{#if author.photo}}\n        \u003Cimg src=\"{{author.photo}}\" alt=\"{{author.name}}\">\n      {{\u002Fif}}\n    {{\u002Fif}}\n  \u003C\u002Farticle>\n{{\u002Feach}}\n```\n\nAvailable: `{{relation.name}}`, `{{relation.slug}}`, `{{relation.url}}`, `{{relation.anyField}}`.\n\n### Parent Context — `..\u002F`\n\nInside a loop, access the parent scope (the current page's item) with `..\u002F`:\n\n```html\n\u003C!-- On an author detail page, show only THIS author's posts -->\n\u003Ch1>{{name}}\u003C\u002Fh1>\n\n\u003Ch2>Posts by {{name}}\u003C\u002Fh2>\n{{#each posts}}\n  {{#if (eq author.name ..\u002Fname)}}\n    \u003Carticle>\n      \u003Ch2>\u003Ca href=\"{{url}}\">{{name}}\u003C\u002Fa>\u003C\u002Fh2>\n    \u003C\u002Farticle>\n  {{\u002Fif}}\n{{\u002Feach}}\n```\n\n### Nested Loops with `@root.`\n\nWhen nesting loops, use `@root.` to reference root-level collections:\n\n```html\n{{#each categories}}\n  \u003Ch3>{{name}}\u003C\u002Fh3>\n  {{#each @root.posts where=\"category.slug:{{slug}}\"}}\n    \u003Ca href=\"{{url}}\">{{name}}\u003C\u002Fa>\n  {{\u002Feach}}\n{{\u002Feach}}\n```\n\n### Inline Editing — `data-edit-key` (CRITICAL for Static Pages)\n\n**Without `data-edit-key` attributes, static pages have NO editable content in the CMS dashboard.** Every text element that should be editable MUST have one.\n\n```html\n\u003C!-- Static pages — REQUIRED for editable content -->\n\u003Ch1 data-edit-key=\"home-hero-title\">Welcome to Our Site\u003C\u002Fh1>\n\u003Cp data-edit-key=\"home-hero-subtitle\">We build amazing things.\u003C\u002Fp>\n\u003Cp data-edit-key=\"home-about-text\">Our story began in 2020...\u003C\u002Fp>\n\n\u003C!-- Hierarchical naming for sections -->\n\u003Csection class=\"about\">\n  \u003Ch2 data-edit-key=\"about-section-title\">About Us\u003C\u002Fh2>\n  \u003Cp data-edit-key=\"about-section-paragraph-1\">First paragraph...\u003C\u002Fp>\n  \u003Cp data-edit-key=\"about-section-paragraph-2\">Second paragraph...\u003C\u002Fp>\n\u003C\u002Fsection>\n\n\u003C!-- CMS templates — optional, for hardcoded headers -->\n\u003Ch1 data-edit-key=\"blog-page-title\">Our Blog\u003C\u002Fh1>\n```\n\n**Naming convention: `{page}-{section}-{element}`**\n\nExamples: `home-hero-title`, `about-team-heading`, `contact-form-intro`, `services-cta-button`\n\nRules:\n- Keys must be unique across the **entire site** (not just the page).\n- Use lowercase with hyphens.\n- For different pages, prefix with the page name.\n- Static pages without edit keys will appear in the CMS but have nothing editable.\n\n### Video Embeds\n\n```html\n{{#if video}}\n  \u003Ciframe\n    src=\"{{video}}\"\n    allowfullscreen\n    referrerpolicy=\"strict-origin-when-cross-origin\"\n    title=\"Video\"\n  >\u003C\u002Fiframe>\n{{\u002Fif}}\n```\n\nThe `referrerpolicy=\"strict-origin-when-cross-origin\"` attribute is **required** for YouTube embeds — without it, videos may show Error 150\u002F153.\n\n### Images — Static vs CMS Content\n\nThere are two types of images and they are handled differently:\n\n**1. Static\u002FUI images** — logos, icons, decorative backgrounds bundled with the site:\n```html\n\u003C!-- KEEP these as static \u002Fpublic\u002F paths -->\n\u003Cimg src=\"\u002Fpublic\u002Fimages\u002Flogo.png\" alt=\"Company Logo\">\n\u003Cimg src=\"\u002Fpublic\u002Fimages\u002Ficons\u002Farrow.svg\" alt=\"\">\n```\n\n**2. CMS content images** — post images, team photos, product images managed through the CMS:\n```html\n\u003C!-- USE CMS tokens — NEVER hardcode content image URLs -->\n{{#if image}}\n  \u003Cimg src=\"{{image}}\" alt=\"{{name}}\">\n{{\u002Fif}}\n```\n\n**Rule of thumb:** If it's site branding\u002Fdesign → keep static. If it's content that changes per item → use CMS tokens.\n\n**Always wrap CMS images in `{{#if}}`** — not every item may have an image:\n```html\n{{#if image}}\n  \u003Cimg src=\"{{image}}\" alt=\"{{name}}\">\n{{else}}\n  \u003Cdiv class=\"placeholder-image\">\u003C\u002Fdiv>\n{{\u002Fif}}\n```\n\n**Common mistake — mixing static and CMS images:**\n```html\n\u003C!-- WRONG: hardcoded image inside a CMS loop -->\n{{#each products}}\n  \u003Cimg src=\"\u002Fimages\u002Fproduct-placeholder.jpg\" alt=\"Product\">  \u003C!-- BAD -->\n  \u003Ch2>{{name}}\u003C\u002Fh2>\n{{\u002Feach}}\n\n\u003C!-- CORRECT: all content comes from CMS -->\n{{#each products}}\n  {{#if image}}\n    \u003Cimg src=\"{{image}}\" alt=\"{{name}}\">\n  {{\u002Fif}}\n  \u003Ch2>{{name}}\u003C\u002Fh2>\n{{\u002Feach}}\n```\n\n### Forms\n\n```html\n\u003Cform data-form-name=\"contact\" action=\"\u002F_forms\u002Fcontact\" method=\"POST\">\n  \u003Cinput type=\"text\" name=\"name\" placeholder=\"Your name\" required>\n  \u003Cinput type=\"email\" name=\"email\" placeholder=\"Your email\" required>\n  \u003Ctextarea name=\"message\" placeholder=\"Your message\" required>\u003C\u002Ftextarea>\n  \u003Cbutton type=\"submit\">Send Message\u003C\u002Fbutton>\n\u003C\u002Fform>\n```\n\nRules:\n- `data-form-name` attribute is required.\n- `action` must point to `\u002F_forms\u002F{formName}`.\n- All inputs must have `name` attributes.\n- A submit button is required.\n\n**CRITICAL: Remove Original Form Handlers**\n\nIf the source site has JavaScript that handles form submissions, you **MUST** remove or replace it. Original site JS often does `e.preventDefault()` and shows a \"fake\" success toast — the data goes nowhere.\n\n```javascript\n\u002F\u002F PROBLEM: This blocks real submissions!\nform.addEventListener('submit', (e) => {\n  e.preventDefault();\n  showToast('Message sent!');  \u002F\u002F FAKE! Data not saved!\n});\n```\n\n**Option A (simplest):** Remove the original JavaScript form handler entirely. The native `\u003Cform action=\"\u002F_forms\u002Fcontact\" method=\"POST\">` will submit correctly.\n\n**Option B (keep JS UX):** Replace the handler with one that actually POSTs to FastMode:\n```javascript\nform.addEventListener('submit', async (e) => {\n  e.preventDefault();\n  const formName = form.dataset.formName;\n  const response = await fetch('\u002F_forms\u002F' + formName, {\n    method: 'POST',\n    headers: { 'Content-Type': 'application\u002Fjson' },\n    body: JSON.stringify(Object.fromEntries(new FormData(form)))\n  });\n  if (response.ok) {\n    form.reset();\n    alert('Message sent!');  \u002F\u002F NOW it's real!\n  }\n});\n```\n\n---\n\n## Deployment & Build Status\n\n### How Deployment Works\n\n1. **Upload:** `fastmode deploy site.zip` reads the zip, validates it, and uploads it to the server.\n2. **Build:** The server processes the package (renders templates, publishes pages). This happens asynchronously.\n3. **Wait:** By default, `deploy` polls for build status every 3 seconds until the build completes or times out (default 2 minutes).\n4. **Result:** Success message with page count and version, or failure message with error details.\n\n### Deploy Flags\n\n| Flag | Description |\n|------|-------------|\n| `--force` | Skip the GitHub connection check. Use if the project has GitHub connected but you want to deploy via CLI anyway. |\n| `--no-wait` | Upload only — don't wait for the build to finish. Useful for fire-and-forget. |\n| `--timeout \u003Cms>` | Custom build timeout in milliseconds. Default: `120000` (2 minutes). |\n\n### Checking Build Status\n\n**After every deploy or content change, check the build status:**\n\n```bash\nfastmode status\n```\n\nIf the build failed, `status` shows:\n- The error message\n- Build logs\n- What went wrong\n\n**Always run `fastmode status` after deploying to verify the build succeeded.**\n\nIf a build fails:\n1. Run `fastmode status` to see the error\n2. Fix the issue (template errors, invalid tokens, missing files, etc.)\n3. Re-deploy with `fastmode deploy site.zip`\n\n### Deploy History\n\n```bash\nfastmode deploys                # Show last 10 deployments\nfastmode deploys --limit 5     # Show last 5\n```\n\nShows status, version, duration, source, and errors for each deployment.\n\n### Exit Codes\n\n- `deploy`: Exits 1 if the build fails (when waiting).\n- `status`: Exits 1 if the latest deploy shows \"Failed\".\n- Both: Exit 1 if no project is specified.\n\n---\n\n## Validation\n\nAlways validate before deploying. Validation catches errors that would cause build failures.\n\n### Validation Workflow\n\n```bash\n# 1. Validate the manifest\nfastmode validate manifest manifest.json\n\n# 2. Validate each template\nfastmode validate template pages\u002Findex.html -t static_page\nfastmode validate template templates\u002Fposts_index.html -t custom_index -c posts\nfastmode validate template templates\u002Fposts_detail.html -t custom_detail -c posts\n\n# 3. Validate the complete package\nfastmode validate package site.zip\n```\n\n### What Gets Checked\n\n**Manifest validation:**\n- Valid JSON syntax\n- `pages` array exists and is not empty\n- Homepage (path `\u002F`) exists\n- All file paths are valid\n- `cmsTemplates` format is correct (flat keys, not nested)\n\n**Template validation:**\n- Balanced tags: `{{#each}}` has matching `{{\u002Feach}}`, `{{#if}}` has `{{\u002Fif}}`\n- Index templates have at least one `{{#each}}` loop\n- Detail templates have CMS tokens\n- Rich text fields use triple braces `{{{field}}}`\n- Loop variables only used inside loops\n- Asset paths use `\u002Fpublic\u002F` prefix\n- Forms have required attributes\n- YouTube iframes have `referrerpolicy`\n\n**Package validation:**\n- manifest.json exists at root\n- All referenced files exist in the zip\n- Assets are in `public\u002F` (not `assets\u002F` or root)\n- Templates are in `templates\u002F` (not `collections\u002F`)\n- All templates pass individual validation\n\n### Validation with Schema Check\n\nAdd `-p` to validate tokens against the actual project schema:\n\n```bash\nfastmode validate template templates\u002Fposts_detail.html -t custom_detail -c posts -p \"My Project\"\n```\n\nThis reports which tokens reference fields that don't exist in the schema yet, with instructions to create them via `fastmode schema sync`.\n\n---\n\n## Common Mistakes & How to Fix Them\n\n### 1. Assets return 404\n\n**Problem:** CSS, JS, or images don't load.\n**Cause:** Files are in `\u002Fassets\u002F` instead of `\u002Fpublic\u002F`, or paths don't include `\u002Fpublic\u002F`.\n**Fix:** Move all static files to the `public\u002F` folder. Reference them as `\u002Fpublic\u002Fcss\u002Fstyle.css`.\n\n### 2. Rich text shows as raw HTML\n\n**Problem:** Content displays `\u003Cp>Hello\u003C\u002Fp>` as text instead of rendering it.\n**Cause:** Using double braces `{{body}}` on a rich text field.\n**Fix:** Use triple braces `{{{body}}}` for all richText fields.\n\n### 3. Collection listing page is blank\n\n**Problem:** Index template shows no items.\n**Cause:** Missing `{{#each collectionSlug}}` loop.\n**Fix:** Add a loop: `{{#each posts}}...{{\u002Feach}}`.\n\n### 4. All detail pages look the same\n\n**Problem:** Every item page shows identical content.\n**Cause:** Detail template has no CMS tokens — just static HTML.\n**Fix:** Use tokens like `{{name}}`, `{{{body}}}`, `{{image}}` in the detail template.\n\n### 5. Manifest uses wrong format\n\n**Problem:** Build fails with manifest errors.\n**Cause:** Using nested objects or `\"collections\"` instead of flat `\"cmsTemplates\"` keys.\n**Fix:** Use flat format: `\"postsIndex\"`, `\"postsIndexPath\"`, `\"postsDetail\"`, `\"postsDetailPath\"`.\n\n### 6. Relation field is empty after create\n\n**Problem:** Created an item with a relation field but it's null.\n**Cause:** Used the item's name instead of its UUID.\n**Fix:** Run `fastmode items relations \u003Ccollection> --field \u003Cfield>` to get the UUID, then use that.\n\n### 7. Forms don't submit\n\n**Problem:** Form appears to submit (shows toast\u002Falert) but no data is received.\n**Cause:** Original JavaScript calls `preventDefault()` and shows a fake success message.\n**Fix:** Remove any form JavaScript that blocks submission. Use `data-form-name` and `action=\"\u002F_forms\u002FformName\"`.\n\n### 8. Static pages can't be edited in CMS\n\n**Problem:** Pages appear in the CMS but have no editable content.\n**Cause:** Missing `data-edit-key` attributes on text elements.\n**Fix:** Add `data-edit-key=\"unique-key\"` to every text element that should be editable.\n\n### 9. Deploy blocked by GitHub\n\n**Problem:** `deploy` refuses to upload, says GitHub is connected.\n**Cause:** Project has GitHub auto-deploy enabled.\n**Fix:** Use `--force` flag: `fastmode deploy site.zip --force`.\n\n### 10. Build fails after deploy\n\n**Problem:** Upload succeeds but build fails.\n**Fix:** Run `fastmode status` to see the error. Common causes: invalid tokens, missing template files, malformed manifest. Fix the issue and re-deploy.\n\n### 11. Template URLs don't match manifest\n\n**Problem:** Links in templates point to wrong paths.\n**Cause:** Template hardcodes `\u002Fposts\u002F` but manifest sets `\"postsIndexPath\": \"\u002Fblog\"`.\n**Fix:** Make sure hardcoded links in templates match the paths defined in `manifest.json`.\n\n### 12. Loop variables undefined\n\n**Problem:** `{{@index}}` or `{{@first}}` shows nothing.\n**Cause:** Used outside of a `{{#each}}` block.\n**Fix:** Only use loop variables inside `{{#each}}...{{\u002Feach}}`.\n\n### 13. Duplicate SEO meta tags\n\n**Problem:** SEO tags show up twice in the rendered HTML.\n**Cause:** HTML templates include `\u003Ctitle>`, `\u003Cmeta name=\"description\">`, or Open Graph tags.\n**Fix:** Remove all SEO tags from templates. FastMode manages them automatically via CMS Settings. See the [SEO Tags section](#seo-tags--do-not-include) above.\n\n### 14. CSS background images and fonts broken\n\n**Problem:** Background images or custom fonts don't load.\n**Cause:** CSS files use relative paths like `url('..\u002Fimages\u002Fbg.jpg')` or `url('..\u002Ffonts\u002Fcustom.woff')`.\n**Fix:** Update all paths inside CSS files to use `\u002Fpublic\u002F` prefix: `url('\u002Fpublic\u002Fimages\u002Fbg.jpg')`, `url('\u002Fpublic\u002Ffonts\u002Fcustom.woff2')`.\n\n### 15. Hardcoded example content instead of CMS tokens\n\n**Problem:** Index page shows static placeholder cards instead of real CMS data.\n**Cause:** Template has hardcoded HTML cards instead of `{{#each}}` loops with CMS tokens.\n**Fix:** Replace hardcoded content blocks with `{{#each collection}}...{{\u002Feach}}` loops using CMS field tokens.\n\n---\n\n## Pre-Deployment Checklist\n\nRun through this checklist before every deploy:\n\n**Structure:**\n- [ ] `manifest.json` at package root\n- [ ] Static pages in `pages\u002F` folder\n- [ ] CMS templates in `templates\u002F` folder\n- [ ] ALL assets in `public\u002F` folder (not `assets\u002F`)\n\n**SEO (CRITICAL):**\n- [ ] NO `\u003Ctitle>` tags in HTML\n- [ ] NO `\u003Cmeta name=\"description\">` tags\n- [ ] NO `\u003Cmeta property=\"og:*\">` tags\n- [ ] NO `\u003Clink rel=\"icon\">` tags\n\n**Manifest:**\n- [ ] Homepage page with `\"path\": \"\u002F\"` exists\n- [ ] CMS templates use flat `cmsTemplates` keys (NOT nested, NOT `collections`)\n- [ ] Paths match original site URLs\n\n**Templates:**\n- [ ] Index templates have `{{#each}}` loops\n- [ ] Detail templates have CMS tokens (`{{name}}`, `{{{body}}}`, etc.)\n- [ ] Rich text fields use triple braces `{{{field}}}`\n- [ ] All `{{#each}}` have matching `{{\u002Feach}}`\n- [ ] All `{{#if}}` have matching `{{\u002Fif}}`\n- [ ] Static UI images use `\u002Fpublic\u002F` paths\n- [ ] Content images use CMS tokens with `{{#if}}` wrappers\n\n**Static Pages:**\n- [ ] `data-edit-key` on every editable text element\n- [ ] Keys are unique across the entire site\n- [ ] Forms have `data-form-name` and `action=\"\u002F_forms\u002F{name}\"`\n- [ ] Original form JavaScript handlers removed or replaced\n\n**Assets:**\n- [ ] All HTML asset paths use `\u002Fpublic\u002F` prefix\n- [ ] CSS `background-image` and font `url()` paths use `\u002Fpublic\u002F` prefix\n- [ ] External URLs (Google Fonts, CDNs) unchanged\n\n**Validation:**\n```bash\nfastmode validate manifest manifest.json\nfastmode validate template \u003Ceach-template> -t \u003Ctype> [-c \u003Ccollection>]\nfastmode validate package site.zip\n```\n\n---\n\n## Error Handling & Exit Codes\n\nAll commands exit with code **0** on success and code **1** on failure.\n\n### Commands that exit 1\n\n| Scenario | Commands |\n|----------|----------|\n| No project specified | All project-scoped commands |\n| File not found | `schema sync`, `items create -f`, `validate *` |\n| Invalid JSON | `schema sync`, `items create -d`, `items update -d` |\n| Validation errors | `validate manifest`, `validate template`, `validate package` |\n| Build failed | `deploy` (when waiting), `status` |\n| Delete without `--confirm` | `items delete` |\n\n### Error Messages\n\n```\nError: No project specified.\nUse -p \u003Cid-or-name>, set FASTMODE_PROJECT env var, or run: fastmode use \u003Cproject>\n```\n\n```\nError: File not found: schema.json\n```\n\n```\nError: Invalid JSON in --data argument\n```\n\n```\nError: Deletion requires the --confirm flag. This action cannot be undone.\n```\n\n### Authentication Errors\n\nMost commands auto-trigger `fastmode login` if credentials are missing or expired. If authentication fails:\n1. Run `fastmode login` manually\n2. Complete the browser flow\n3. Retry the command\n\n### File Locations\n\n| Path | Purpose |\n|------|---------|\n| `~\u002F.fastmode\u002Fcredentials.json` | OAuth tokens (auto-created by `login`) |\n| `~\u002F.fastmode\u002Fconfig.json` | Default project setting (created by `use`) |\n\nBoth files have restricted permissions (0o600 — owner read\u002Fwrite only).\n\n---\n\n## Notes\n\n- All project-scoped commands use your default project (set with `fastmode use`). Override with `-p \u003Cname-or-id>`.\n- Item data (`-d`) must be valid JSON. For complex data, write a file and use `-f data.json`.\n- Rich text fields accept HTML content (e.g. `\u003Cp>`, `\u003Ch2>`, `\u003Cul>`, `\u003Ca>`). Always use triple braces in templates.\n- Relation fields require item IDs (UUIDs). Use `fastmode items relations` to find available IDs.\n- The `--draft` flag creates unpublished items. Use `--publish`\u002F`--unpublish` to change status.\n- Every site gets free hosting, free SSL, and a `.fastmode.ai` subdomain. Custom domains can be configured.\n- After deploying or making content changes, always run `fastmode status` to verify the build succeeded.\n- Use `fastmode examples \u003Ctype>` and `fastmode guide [section]` for built-in documentation and code snippets.\n\n---\n\n## Package Provenance\n\n- **npm package:** [fastmode-cli](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Ffastmode-cli)\n- **Source code:** [github.com\u002Farihgoldstein\u002Ffastmode-mcp](https:\u002F\u002Fgithub.com\u002Farihgoldstein\u002Ffastmode-mcp)\n- **Website:** [fastmode.ai](https:\u002F\u002Ffastmode.ai)\n- **Author:** Arih Goldstein\n- **License:** MIT\n",{},"master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Ff\u002Ffastmode",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":7,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill fastmode",{"tool":38,"command":39},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill fastmode",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill fastmode","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Ff\u002Ffastmode\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":18},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]