# The CLI

Our command line inteface tool is going to help you to:

With this tool, you can start to develop your own application using vyou in your local machine.

In this section we're going to focus on the dev-server, once introduced the Web SDK you'll learn more about the codegen.

# Installation

In order to use our command line interface we just need to have Node.js 14+ (opens new window) installed.

You can install the package locally, but we recommend a global installation. eg. using npm:

npm i -g @vyou/cli

The dev-server run serveral production-ready Docker containers, so you need to have Docker (opens new window) installed.

# Up and running the dev-server

Once you've installed the @vyou/cli package we're ready to spin up the server just running:

vyou dev-server up

The first time you run the server you'll need to answers a few questions in order to configure correctly (eg. superadmin account, license key, etc.)

TIP

Once the dev-server is running the backoffice is found at https://vyou.vyou-dev.com:6120/bo/ (opens new window).

The up command does not run in detached mode, so remember that if you ^C the server will stop.

# Useful dev-server options

You can always run vyou dev-server whenever you need for help. That sub-command will print you available options and sub-commands:

Usage: vyou dev-server <command> [options]

Commands:

   up        Starts the development server 
   stop      Stops the development server  
   logs      Shows development server logs 
   config    Runs configuration wizard     

up options:

   --frontend PORT      The port where your frontend is served          
   --backoffice PORT    The port where your backoffice is served        
   --backend PORT       The port where your backend server is listening 
                                                                        
   --docker-pull        Pull new Docker images and recreates containers 
  • We've provided the --docker-pull option in case you want to force Docker containers pulling new image versions.

# --frontend option (--backend and --backoffice are analog)

In case you are developing your own frontend, you can map it with vyou. By doing this, your frontend is able to communicate with the vyou backend using first-party cookies and you don't need to use tokens to secure your vyou calls to the backend. For example, if you have your frontend running on http://localhost:3000, you can start your dev-server using this command:

vyou dev-server up --frontend 3000

Now, your frontend application is running under https as well.

TIP

If the --frontend option is set the frontend will be live at https://vyou-dev.com:6120 (opens new window) and for --backoffice one: https://mybackoffice.vyou-dev.com:6120 (opens new window) (in case client has a frontend backoffice). :::

If you set the --backend you can also communicate with your backend from your frontend by using first-party cookies.

If you ever want to change some dev-server configuration option, you can run vyou dev-server config (eg. change superadmin credentials or license key).