FlowCMS 💻 CLI
The official command-line interface for managing FlowCMS projects locally. Initialize, sync, preview, and deploy content with speed and precision.
~/projects/my-site
➜ npm install -g @flowcms/cli
added 42 packages in 2.1s
➜ flow init my-blog
✓ Project scaffolded successfully
✓ Connected to FlowCMS workspace
✓ Ready to develop. Run
flow dev➜ _
📦 Installation
Install globally via npm. Node.js 18+ is required.
npm
npm install -g @flowcms/cli
verify
flow --version
⌨️ Core Commands
Essential commands for day-to-day content management workflows.
flow init
Scaffold a new FlowCMS project with default structure.
flow init [project-name] [--template <slug>]
flow auth login
Authenticate with your FlowCMS workspace via OAuth.
flow auth login [--env <production|staging>]
flow pull
Download content, media, and schema from the cloud.
flow pull [--dry-run] [--verbose]
flow push
Publish local changes to the selected environment.
flow push [--env <prod|staging>] [--force]
flow dev
Start local preview server with hot reloading.
flow dev [--port 3000] [--no-open]
flow env
Manage environment variables and workspace tokens.
flow env [get|set|list] [--key <name>]
flow config
View or modify CLI configuration settings.
flow config [get|set] <key> [--value <string>]
flow help
Display comprehensive command documentation.
flow help [command]
⚙️ Configuration
Configure your project via .flowcmsrc.json in the project root.
.flowcmsrc.json
{
"project": "my-awesome-site",
"workspace": "acme-corp",
"environment": "development",
"sync": {
"auto-pull": true,
"ignore": ["*.log", ".git/"]
},
"preview": {
"port": 3000,
"open": true
}
}
| Key | Type | Description | Default |
|---|---|---|---|
project |
string | Project identifier in FlowCMS | dirname |
workspace |
string | Organization/workspace slug | required |
auto-pull |
boolean | Sync on git checkout | false |
port |
number | Local dev server port | 3000 |
🌍 Environment Variables
Override CLI behavior and authentication using environment variables.
bash
export FLOWCMS_TOKEN="your-secure-token" export FLOWCMS_ENV="production" export FLOWCMS_LOG_LEVEL="debug" # Then run commands flow --verbose pull
| Variable | Description |
|---|---|
FLOWCMS_TOKEN |
Authentication token for CI/CD pipelines |
FLOWCMS_ENV |
Default target environment (development/staging/production) |
FLOWCMS_LOG_LEVEL |
Verbosity: silent, info, debug, trace |
FLOWCMS_TIMEOUT |
Request timeout in milliseconds (default: 30000) |