@gdi/cli
v0.5.0
Published
> Note: make sure you have all the [prerequisites](https://usegdi.com/docs/docs/getting-started/prerequisites) prepared before installation
Downloads
53
Readme
Installation
Note: make sure you have all the prerequisites prepared before installation
Install the CLI
Run:
npm install -g @gdi/cli
and rebuild the CLI's commands index:
gdi rebuild
Create a new site
gdi create site [site-name]
Note: this clones the template and installs dependencies and may take a few moments
A new project with two main packages was created:
gdi-admin
: holds the admin UIgdi-site
: holds the public facing site
Change your cwd
to your newly created root
folder:
cd [site-name]
and install the project's dependencies:
npm i
or:
yarn
Connect Firebase
Bootstrap the project:
gdi bootstrap
Note: Before bootstrapping make sure you have firebase-tools installed: npm install -g firebase-tools
Running the Admin UI
In the project's root
run:
gdi start
Navigate to http://localhost:3000
Setting the admin user
Log in to the Admin UI with your Google Account
.
Then, in the project's root
run:
gdi setAdmin
Deploying
In the project's root
run:
gdi deploy
Note: this will deploy both the
Admin UI
and theSite
After a successful deployment, the Admin UI
will be served from the /admin
path.
Note: change your site's favIcons and meta tags before deployment
CLI commands
| Command | Description |
| --------------------------- | --------------------------------------------------------------- |
| gdi create site [site-name] | Creates a new gDI repo with admin + site packages |
| gdi bootstrap | Bootstraps the project, runs these command: connect + apps |
| gdi start | Starts gdi-admin
in development mode |
| gdi setAdmin | Choose an admin for the current site |
| gdi deploy | Builds & deploy both gdi-admin
and gdi-site
|
| gdi connect | Validates and links site to Firebase |
| gdi list projects | Shows Firebase projects. A wrapper for firebase projects:list
|
| gdi preview | Starts gdi-site
in development mode |
| gdi apps | Scans for new apps and sets up the vite
and tsconfig
files |