The Vyuh CLI is a new tool that allows you to quickly scaffold projects,
features, and schemas for the Vyuh framework. It is built on top of the Mason
package and includes a few other utilities to make it easier to generate
projects and features.
Activate the Vyuh CLI
The first step is to activate the package
globally. This gives you access to the vyuh command that can be used to
generate the initial structure. Run this command in your terminal:
Create your new project
In the folder where you plan to build your mono-repo project for the Vyuh
Application, run the following. The <project_name> tag is the one where you
should specify your own name for the project.
The above command will create a complete folder structure under <project-name>
which is described in more detail in the
Project Structure article.
More parameters
There are more details you can pass when creating the project as shown below:
Add a new feature
Just like the command for creating projects, we also have a
vyuh create feature <feature-name> that does very similar things in terms of
setting up a new feature for the project.
This will create a new feature package (in Flutter) inside the current folder
of your shell.
Add a new schema
We also have the command for creating a new schema for the CMS. You can use
vyuh create schema <feature-name> to set it up.
This will create a new schema package (in Typescript) inside the current
folder of your shell.
Update the CLI
The Vyuh CLI has an inbuilt mechanism to update itself. You can run the
following command to update the CLI:
This will check for the latest version of the CLI and update it if necessary.
Summary
This guide showed you the steps to set up the Vyuh CLI on your system and
use it to generate various parts of the Application. Currently, there is support
for creating a new Vyuh App, a Vyuh Feature package for Flutter and a Vyuh
schema package for Sanity CMS.
There will be more added in the future to accommodate other aspects of
developing Vyuh Apps.