CLI Setup
What is the FastMode CLI?
The FastMode CLI is a command-line tool that lets you manage your entire FastMode workflow from the terminal. You can create projects, define content structures, manage CMS items, build and deploy websites, and monitor build status — all without opening a browser or dashboard.
The CLI is an alternative to the MCP Server. Use the MCP server if you're working inside an AI-powered IDE (Cursor, Claude Code, etc.). Use the CLI if you prefer direct terminal commands, want to script deployments, or are using an agent that runs shell commands (like OpenClaw).
Installation
Install the CLI globally via npm:
npm install -g fastmode-cli
This installs the fastmode command globally. Verify it's installed:
fastmode --version
Requirements: Node.js 18 or later.
Authentication
Most commands require authentication. Run the login command once — credentials persist across sessions.
Log In
fastmode login
This opens your browser for OAuth authentication. Sign in to your FastMode account and approve access. Your credentials are saved to ~/.fastmode/credentials.json and auto-refresh for 90 days.
Check Who's Logged In
fastmode whoami
Shows your email and name if logged in, or tells you to run fastmode login if not.
Log Out
fastmode logout
Removes stored credentials from ~/.fastmode/credentials.json.
Your First Project
Create a Project
fastmode projects create "My Website"
This creates a new FastMode site with free hosting at my-website.fastmode.ai with automatic SSL. You can also specify a custom subdomain:
fastmode projects create "My Website" --subdomain custom-name
Set a Default Project
fastmode use "My Website"
This saves the project as your default so you don't need to pass -p on every command. The setting is stored in ~/.fastmode/config.json.
List Your Projects
fastmode projects
Shows all projects you have access to with their IDs, subdomains, and status.
Project Resolution
Every project-scoped command needs to know which project to target. The CLI resolves the project in this order:
-pflag — Explicit on the command:fastmode schema show -p "My Website"FASTMODE_PROJECTenvironment variable — Set in your shell- Default project — Saved by
fastmode use
If none is set, the command prints an error with instructions. Project identifiers can be a UUID or a project name (matched case-insensitively).
Next Steps
- CLI Command Reference — Full reference for every command and flag
- Deploying with the CLI — End-to-end build and deploy workflow
- MCP Server Reference — If you prefer working through an AI IDE instead