It is really simple to get started with the Lx2 stack. All you need to do is to run the following command, and answer the prompts:
Installation
pnpm create lx2-app@latest
It is as simple as that. Once you have answered all the prompts, you can checkout the First Steps section to learn more about how to use the Lx2 App.
Advanced Installation
The CLI comes with several flags that can be used to customize the installation process, or skip certain prompts.
Flags | Description |
---|---|
[dir] | The name of the application, as well as the name of the directory to create. |
--noGit | Explicitly tell the CLI to not initialize a new git repo in the project. |
--noInstall | Generate project without installing dependencies. |
-y , --default | Bypass the CLI and bootstrap a new Lx2 App project with all default options selected. |
Experimental CI flags
The CI flag can be used to scaffold a new project without prompts. This is useful for CI/CD pipelines.
Flags | Description |
---|---|
--CI | Set the CLI to run in CI mode. |
--backend [framework] | Specify which backend framework to scaffold with. |
--authProvider [provider] | Specify which auth provider to scaffold with. |
--databaseORM [orm] | Specify which orm to scaffold with. |
--formatter [formatter] | Specify which formatter to scaffold with. |
--linter [linter] | Specify which linter to scaffold with. |
-i, --import-alias [alias] | Specify which import alias to scaffold with. |
--dbProvider [provider] | Specify which database engine to scaffold with. |
If you don't provide the CI flag, the rest of these flags have no effect.
Examples
Most flags will require a value, which can be passed in after the flag. For example, to scaffold a project with Prisma, you would run:
pnpm create lx2-app@latest --CI --databaseORM prisma
You can use the CI flags to skip the entire prompt process like this:
pnpm create lx2-app@latest my-app \ --CI \ --backend nextjs \ --authProvider authjs \ --databaseORM prisma \ --dbProvider postgresql \ --linter eslint/prettier