VYou CLI is a central piece of VYou software. With only this tool, you will be able to start developing your own application using VYou on your local machine.
VYou CLI: guide for developers
VYou CLI stands for command line interface which is a text-based user interface (UI) used to run programs, manage computer files and interact with the computer. VYou is a CLI-based shell that offers users a concise and efficient mode of interacting with the OS, without requiring the overhead of a graphical user interface.
VYou CLI can help you to:
- Set up your local development environment with a dev-server as close as possible to production.
- Create ready to use React components with a Codegen tool.
First of all we’re going to focus on the dev-server, once introduced the Web SDK you’ll learn more about the codegen.
In order to use our command line interface we just need to have Node.js 14+ installed. In order to install the package locally, we will be using:
npm i -g @vyou/cli
Once you’ve installed the @vyou/cli package we’re ready to spin up the server just running:
vyou dev-server up
You can always run vyou dev-server whenever you need help. That sub-command will print you available options and sub-commands as:
vyou dev-server <command> [options]
up Starts the development server stop Stops the development server logs Shows development server logs config Runs configuration wizard
--frontend PORT El puerto donde se sirve su frontend
--backoffice PORT El puerto donde se sirve su backoffice
--backend PORT El puerto donde su servidor backend está escuchando
--docker-pull Extrae nuevas imágenes Docker y recrea contenedores
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
Regarding the Codegen, @vyou/cli has the code generation command which we believe is going to help you to scale your app really fast.
The only requirements to do so are:
- Make sure you have @vyou/cli installed
- Make sure you have vyou.config.json file inside your app project directory
Once we have these components, we can run this command:
vyou codegen ./src -o
After running this command VYou will generate ready-to-use React components inside ./src/vyou folder (the -o option overwrites the contents of that folder without asking you to confirm).
In a few seconds you will be able to import the following components:
- Sign up form
- Set password form
- Complete profile form
- Forgot password form
- Login form
- Stripe payment/subscription form
Having VYou CLI you will have access to the sources & components, so you will always be able to use the components as you want, with a fully customized experience. On top of that you will be able to work locally with all VYou features in seconds.
Learn more about VYou asking for a FREE demo here. For more details about integrations & code implementation, check our documentation.