arihgoldstein-fastmode
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install clawskills:clawskills~arihgoldstein-fastmodecURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/clawskills%3Aclawskills~arihgoldstein-fastmode/file -o arihgoldstein-fastmode.md---
name: fastmode
description: 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.
metadata: {"openclaw":{"emoji":"⚡","homepage":"https://fastmode.ai","requires":{"bins":["fastmode"]},"install":[{"id":"npm","kind":"npm","package":"fastmode-cli","bins":["fastmode"]}]}}
user-invokable: true
---
# FastMode CLI — Complete Agent Reference
FastMode 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.
- **Free cloud hosting** — every site gets a live URL at `yoursite.fastmode.ai`
- **Free SSL** — HTTPS included automatically
- **Custom domains** — connect any domain (e.g. `www.example.com`)
- **Full CMS** — any content structure (blog, team, products, portfolios, anything)
- **Agent-native** — every operation works via CLI, zero human intervention needed
---
## Table of Contents
1. [End-to-End Workflow](#end-to-end-workflow)
2. [CRITICAL: Before You Build Anything](#critical-before-you-build-anything)
3. [Website Analysis](#website-analysis-do-this-before-writing-code)
4. [Command Reference](#command-reference)
5. [Project Resolution](#project-resolution)
6. [Schema & Field Types](#schema--field-types)
7. [Content Items](#content-items)
8. [Client Portal Management](#client-portal-management)
9. [Package Structure](#package-structure)
10. [Manifest Format](#manifest-format)
11. [Template Syntax](#template-syntax) (includes SEO rules, image handling, forms, inline editing)
12. [Deployment & Build Status](#deployment--build-status)
13. [Validation](#validation)
14. [Common Mistakes & How to Fix Them](#common-mistakes--how-to-fix-them)
15. [Pre-Deployment Checklist](#pre-deployment-checklist)
15. [Error Handling & Exit Codes](#error-handling--exit-codes)
---
## End-to-End Workflow
This is the complete sequence to go from nothing to a live website.
```bash
# 1. Authenticate (one-time — credentials persist at ~/.fastmode/credentials.json)
fastmode login
# 2. Create a project (gets a free hosted URL instantly)
fastmode projects create "Acme Corp"
fastmode use "Acme Corp"
# 3. Define content structure (write schema.json, then sync it)
fastmode schema sync -f schema.json
# 4. Add content
fastmode items create posts -n "Welcome" -d '{"title": "Welcome to Acme", "body": "<p>We build great things.</p>"}'
fastmode items create team -n "Jane Doe" -d '{"role": "Founder", "bio": "<p>Visionary leader.</p>"}'
# 5. Build HTML templates with {{tokens}}, package into a zip, validate, deploy
fastmode validate package site.zip
fastmode deploy site.zip
# Deploy waits for build to finish and reports success or failure with error details
# 6. If the build failed, check what went wrong
fastmode status
# Fix the issue, then re-deploy
```
---
## CRITICAL: Before You Build Anything
**STOP. Before writing ANY HTML, templates, or manifest.json, complete these steps.**
### Step 1: Check for Existing Projects
```bash
fastmode projects
```
This lists all the user's existing FastMode projects.
### Step 2: Decide — Existing or New Project
**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.
**If NO projects exist:** This is a new user — ask: "What would you like to name your new project?"
### Step 3a: For EXISTING Projects
1. User selects the project from the list
2. Run `fastmode use "Project Name"` to set it as default
3. Run `fastmode schema show` to get the current collections and fields
4. **Use this schema to build templates with the correct field names**
### Step 3b: For NEW Projects
1. Ask for the project name if you don't have it
2. Run `fastmode projects create "Project Name"`
3. Run `fastmode use "Project Name"`
4. You'll create the schema later with `fastmode schema sync`
5. Optionally generate sample content: `fastmode generate-samples`
### Checkpoint — Confirm Before Continuing
| Requirement | How to Get It |
|-------------|---------------|
| Project selected/created | `fastmode projects` / `fastmode projects create` |
| Default set | `fastmode use "Project Name"` |
| Schema known (existing) | `fastmode schema show` |
**If you don't have a project set, DO NOT PROCEED.** Go back to Step 1.
**WHY THIS MATTERS:**
- For existing projects: The schema determines which fields to use in templates — get it wrong and the build fails
- For new projects: You need the project before you can deploy
- Always: The user must confirm which project to use — never assume
---
## Website Analysis (Do This Before Writing Code)
Before writing any HTML or templates, analyze the site:
1. **Map ALL URLs** — document every page path (`/`, `/about`, `/blog`, `/blog/post-slug`, etc.)
2. **Categorize each page** — Static (fixed content), List (shows multiple items), or Detail (single item from a collection)
3. **Identify collections** — repeating content that should be CMS-managed (blog posts, team members, products, testimonials, etc.)
4. **Document assets** — all CSS, JS, image, and font file locations
5. **PRESERVE original URLs** — if the site uses `/resources` for articles, keep `/resources`. Do NOT change it to `/blog`. Use the manifest's path configuration.
---
## Command Reference
### Authentication
```bash
fastmode login # Open browser for OAuth device flow
fastmode logout # Delete ~/.fastmode/credentials.json
fastmode whoami # Show current user email and name
```
- `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.
- **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.
- Credentials persist at `~/.fastmode/credentials.json` with restricted file permissions (`0o600` — owner read/write only). Treat this file as a sensitive secret.
- Tokens auto-refresh. If a token expires, the next command will refresh it silently using the stored refresh token.
- If credentials are missing or invalid, most commands will trigger the login flow automatically.
- `logout` deletes `~/.fastmode/credentials.json` and revokes the stored tokens.
### Projects
```bash
fastmode projects # List all projects (default action)
fastmode projects list # Same as above
fastmode projects create "Name" # Create a new project
fastmode projects create "Name" --subdomain custom-sub # Custom subdomain
fastmode projects create "Name" --force # Skip similar-name check
fastmode use <project> # Set default project for all commands
```
- `projects create` checks for existing projects with similar names. Use `--force` to skip.
- Subdomain auto-generated from name if not provided (lowercase, hyphens, max 30 chars).
- `use` stores the default in `~/.fastmode/config.json`. Does NOT validate the project exists.
### Schema
```bash
fastmode schema show # Show all collections and fields
fastmode schema show -p "Project Name" # Specif