Docs / Developers / CLI Command Reference
Back to FastMode

CLI Command Reference

Overview

This is the complete reference for every fastmode CLI command. All project-scoped commands accept -p <project> to specify a project, or use your default project set with fastmode use. See CLI Setup for installation and authentication.


Authentication

fastmode login

Authenticate with FastMode via browser OAuth. Opens a browser window where you sign in and approve access. Credentials are saved to ~/.fastmode/credentials.json and auto-refresh.

fastmode logout

Remove stored credentials from ~/.fastmode/credentials.json.

fastmode whoami

Show the currently authenticated user (email and name), or a message if not logged in.


Projects

fastmode projects

List all projects you have access to. Shows project names, IDs, subdomains, custom domains, roles, and site status. Alias: fastmode projects list.

fastmode projects create <name>

Create a new project with free hosting.

FlagDescription
--subdomain <sub>Custom subdomain (auto-generated from name if omitted)
--forceSkip the similar-name check for existing projects
fastmode projects create "Acme Corp"
fastmode projects create "Acme Corp" --subdomain acme
fastmode projects create "Acme Corp" --force

fastmode use <project>

Set a default project for all subsequent commands. Accepts a project name or UUID. Stored in ~/.fastmode/config.json.

fastmode use "Acme Corp"
fastmode use 550e8400-e29b-41d4-a716-446655440000

Schema

fastmode schema show

Show all collections and fields for the current project. Displays field names, types, slugs, and whether they're required.

fastmode schema show
fastmode schema show -p "Acme Corp"

fastmode schema sync -f <file>

Create collections and fields from a JSON file. Skips duplicates automatically. Handles relation field dependencies (creates referenced collections first).

FlagDescription
-f, --file <path>Required. Path to JSON schema file
-p, --project <id>Project ID or name
fastmode schema sync -f schema.json

The JSON file supports two top-level keys:

{
  "collections": [
    {
      "slug": "posts",
      "name": "Blog Posts",
      "nameSingular": "Blog Post",
      "fields": [
        { "slug": "title", "name": "Title", "type": "text", "isRequired": true },
        { "slug": "body", "name": "Body", "type": "richText" },
        { "slug": "image", "name": "Image", "type": "image" },
        { "slug": "category", "name": "Category", "type": "select", "options": "News, Tutorial, Update" },
        { "slug": "author", "name": "Author", "type": "relation", "referenceCollection": "team" }
      ]
    }
  ],
  "fieldsToAdd": [
    {
      "collectionSlug": "posts",
      "fields": [
        { "slug": "featured", "name": "Featured", "type": "boolean" }
      ]
    }
  ]
}

Available field types: text, textarea, richText, number, boolean, date, datetime, image, file, url, videoEmbed, email, select (requires options), multiSelect (requires options), relation (requires referenceCollection). Run fastmode schema field-types to see the full list.

fastmode schema field-types

List all available field types with descriptions. Does not require authentication.


Content Items

fastmode items list <collection>

List items in a collection.

FlagDescription
-l, --limit <n>Maximum items to return
-s, --sort <field>Sort by field (e.g. publishedAt, name)
-o, --order <dir>asc or desc
fastmode items list posts
fastmode items list posts --limit 10 --sort publishedAt --order desc

fastmode items get <collection> <slug>

Get a single item by its URL slug. Shows all field values.

fastmode items get posts my-first-post

fastmode items create <collection>

Create a new item in a collection.

FlagDescription
-n, --name <name>Required. Item name/title
-s, --slug <slug>URL slug (auto-generated from name if omitted)
-d, --data <json>Field data as a JSON string
-f, --file <path>Read field data from a JSON file (overrides -d)
--draftCreate as unpublished draft
fastmode items create posts -n "Hello World" -d '{"title": "Hello World", "body": "<p>First post.</p>"}'
fastmode items create posts -n "From File" -f post-data.json
fastmode items create posts -n "Draft Post" -d '{}' --draft

Important: Rich text fields accept HTML. Relation fields require item UUIDs, not names — use fastmode items relations to find IDs.

fastmode items update <collection> <slug>

Update an existing item. Only the fields you provide are changed — everything else is preserved.

FlagDescription
-n, --name <name>New name/title
-d, --data <json>Updated field values as JSON
-f, --file <path>Read updated data from JSON file
--publishPublish the item (set publishedAt to now)
--unpublishRevert to draft (set publishedAt to null)
fastmode items update posts my-post -d '{"title": "Updated Title"}'
fastmode items update posts my-post -n "New Name" --publish
fastmode items update posts my-post --unpublish

fastmode items delete <collection> <slug> --confirm

Delete an item. The --confirm flag is required — the command refuses to run without it. This is a safety measure because deletion is permanent.

fastmode items delete posts old-post --confirm

fastmode items relations <collection>

Show available items for relation fields. This is how you find the UUIDs needed to set relation field values.

FlagDescription
--field <slug>Show options for a specific relation field only
fastmode items relations posts
fastmode items relations posts --field author

Deployment

fastmode deploy <zipPath>

Deploy a website package (.zip) to FastMode. By default, waits for the build to complete and reports success or failure with details.

FlagDescription
--forceSkip GitHub connection check
--no-waitUpload only, don't wait for build
--timeout <ms>Build timeout in milliseconds (default: 120000)
fastmode deploy site.zip
fastmode deploy site.zip --force
fastmode deploy site.zip --no-wait

See Deploying with the CLI for the full workflow.

fastmode status

Check the current build/deploy status. Shows whether the site is building, the latest deploy result, and error details if the build failed. Exits with code 1 if the latest deploy failed.

fastmode status

fastmode deploys

List deployment history with status, version, duration, and errors.

FlagDescription
-l, --limit <n>Number of deploys to show (default: 10)
fastmode deploys
fastmode deploys --limit 5

Validation

Validation commands check your files for errors before deploying. They exit with code 1 on errors, making them safe for scripts and CI/CD pipelines.

fastmode validate manifest <path>

Validate a manifest.json file for correct structure, required fields, and page configuration.

fastmode validate manifest manifest.json

fastmode validate template <path>

Validate an HTML template for correct token syntax, balanced tags, and proper field usage.

FlagDescription
-t, --type <type>Required. Template type: custom_index, custom_detail, or static_page
-c, --collection <slug>Collection slug (for index and detail templates)
-p, --project <id>Project to validate tokens against the actual schema
fastmode validate template pages/index.html -t static_page
fastmode validate template templates/posts_index.html -t custom_index -c posts
fastmode validate template templates/posts_detail.html -t custom_detail -c posts -p "My Site"

fastmode validate package <zipPath>

Validate a complete website package. Checks manifest, all templates, folder structure, and asset references.

fastmode validate package site.zip

Documentation & Samples

fastmode examples <type>

Get code examples for specific patterns. No authentication required.

Available 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.

fastmode examples blog_index_template
fastmode examples common_mistakes

fastmode guide [section]

Get the website conversion guide. Defaults to the full guide if no section specified.

Available sections: full, first_steps, analysis, structure, manifest, templates, tokens, forms, assets, checklist, common_mistakes.

fastmode guide
fastmode guide templates
fastmode guide common_mistakes

fastmode generate-samples

Generate placeholder content for empty collections. Useful for testing templates before adding real content. Handles dependencies — collections referenced by relation fields are populated first.

FlagDescription
-c, --collections <slugs...>Specific collections to generate for (default: all empty)
fastmode generate-samples
fastmode generate-samples -c posts team

Exit Codes

All commands exit with 0 on success and 1 on failure. Commands that exit with 1:

  • No project specified (and no default set)
  • File not found (schema sync, items create -f, validate)
  • Invalid JSON (-d or -f arguments)
  • Validation errors (validate manifest, validate template, validate package)
  • Build failed (deploy when waiting, status)
  • Delete without --confirm

Related Docs

Built in Fast Mode