Skip to main content


This is a Command-Line Interface (CLI) to develop dynamic og:images. Behind the scenes this package starts a development server with Parcel.js and enables developers to create Flayyer Templates using their favorite apps and technologies.

It is recommended to install it as a development dependency (devDependencies):
yarn add --dev @flayyer/cli

This module is included when creating a project with create-flayyer-app


This file is loaded when submitting the bundled file to Flayyer servers through flayyer deploy.

Basic file structure is:

module.exports = {
engine: "react",
key: process.env.FLAYYER_KEY,
deck: "my-project",

Here is the expected format of the file using a Typescript Type notation:

// Typescript type for reference
type FlayyerConfigType = {
* Engine/framework used to develop the templates
engine: "react" | "react-typescript" | "vue" | "vue-typescript";
* Flayyer API key.
* @default process.env.FLAYYER_KEY
key: string;
* Project name in slug format.
* Beware this can override other project under your account if you use the same value here.
* Eg: project-name โœ…
* Eg: Project Name โŒ
deck: string;


This is the API key required to authenticate before uploading your project to our cloud.


Every script here assumes you have the following package.json:

"scripts": {
"start": "flayyer start",
"build": "flayyer build",
"deploy": "flayyer deploy",

flayyer start#


Please use Google Chrome, Firefox or Opera. Safari is not widely supported.

This command starts a development server using Parcel.js. Then open Flayyer Studio in your browser for a better developer experience.

Flayyer Studio screenshot

To run the server at the default host and port http://localhost:7777 just execute:
yarn run start

You can change the port using the -p flag and the host with -H:
yarn run start -H -p 8000

You should get a message like this on your terminal:

๐ŸŒ  FLAYYER dev server running at http://localhost:7777
๐Ÿ’ก Pass variables as query-params in the URL.
Example: http://localhost:7777/hello.html?title=Hello+world
๐Ÿ’ก This dev server sometimes fails or sometimes the UI does not update accordingly.
Please restart the server if something goes wrong.
๐Ÿ“„ Found template 'main' at: http://localhost:7777/main.html
Go to:
๐Ÿ’ป Remember to preview and develop your templates at:

Visit Flayyer Studio to preview your template while developing.


  • The development server is under heavy development and might have some issues while running.
  • If the server crashes: you need to restart it.
  • If hot-reloading is not working: Move your components to the same file as your template

flayyer build#

Before deploying to production via flayyer deploy, you must run this build command:
NODE_ENV=production yarn run build

flayyer deploy#


You must run flayyer build before running this command.

To upload the final bundled templates to our cloud you must have an API Key.

Click here to manage your keys ๐Ÿ”‘

Set your API key as FLAYYER_KEY and an environment variables or directly in your flayyer.config.js if you are working on a private repository.
export FLAYYER_KEY=...

Dotenv files are supported via dotenv:


When you are ready to deploy run:
yarn run deploy

If everything is correct, you should see an output with your templates' URLs.

๐Ÿ–ผ Created template with URL: