The gingee-cli is the official, all-in-one command-line interface for the Gingee platform. It is a powerful tool for both developers and system administrators, designed to streamline every phase of the application lifecycle, from initial project creation to ongoing production management.
The gingee-cli is designed to be installed globally on your machine, making it available everywhere.
NOTE: You might need to install pre-requistes based on your setup.
npm install -g gingee-cliAfter installation, you will have access to the gingee-cli command in your terminal.
After the installation is complete, you can verify that it was successful by running the version command:
gingee-cli --versionThis should print the installed version number of the CLI.
For most Windows users, no additional setup is required. The standard Node.js installer from nodejs.org includes everything you need.
For advanced users or those who encounter issues, it's recommended to install the Node.js build tools by running the following command in an Administrator PowerShell:
npm install --global windows-build-tools
macOS users need the Xcode Command Line Tools. Most developer-focused setups will already have this. You can install them by running:
xcode-select --installIf you already have them, this command will report an error, which you can safely ignore.
Linux systems require a C++ compiler toolchain to build some of the CLI's dependencies. You can install the necessary packages by running:
sudo apt-get update && sudo apt-get install -y build-essential pythonFor Red Hat-based distributions, you can install the necessary build tools with:
sudo yum groupinstall "Development Tools" && sudo yum install python3This is the main entry point for starting a new Gingee project.
Scaffolds a complete, new Gingee project in a new directory. It launches an interactive wizard to guide you through the setup.
Usage:
gingee-cli init my-awesome-projectWizard Prompts:
Administrator Username for glade:Sets the initial username for the bundled Glade admin panel. Defaults toadmin.Administrator Password for glade:Securely prompts for the admin password. This is hashed and stored in Glade's configuration.Install npm dependencies automatically?If yes (default), it will runnpm installso the project is ready to run immediately.
These commands should be run from the root directory of an existing Gingee project.
Scaffolds a new, working "hello world" application inside your project's web directory.
Usage:
gingee-cli add-app my-blogWizard Prompts:
What type of app is this?Choose betweenMPA(Multi-Page App, default) orSPA(Single Page Application, for React/Vue/Angular).- If
MPAis chosen, it scaffolds a complete "hello world" application with HTML, CSS, and JS. - If
SPAis chosen, it scaffolds a minimal backend structure (box/,app.json) and provides clear instructions for you to initialize your chosen frontend framework inside the app's directory. Would you like to configure a database connection?If yes, it will guide you through setting up thedbblock in the new app'sapp.json.Generate a JWT secret for this app?If yes, it will automatically generate a secure secret and add it toapp.json.
Quickly creates a new server script file, pre-populated with the standard Gingee boilerplate.
Usage:
gingee-cli add-script my-blog api/postsCreates ./web/my-blog/box/api/posts.js
These commands interact with the API of a live, running glade instance. They require you to be authenticated via the login command.
Authenticates the CLI with a Glade admin panel and saves the session for subsequent commands.
Usage:
- Login to a local server
gingee-cli login- Login to a remote server
gingee-cli login -s http://remote-gingee:7070Options:
-s, --serverUrl <server-url>: The target Gingee server URL. Defaults tohttp://localhost:7070.-u, --username <username>: Provide the username non-interactively. Defaults toadmin.-p, --password <password>: Provide the password non-interactively. If this option is omitted, you will be securely prompted to enter a password.
Logs out of a specific Glade session by deleting the stored credentials.
Usage:
gingee-cli logout -s http://remote-gingee:7070Options:
-s, --serverUrl <server-url>: The target Gingee server URL. Defaults tohttp://localhost:7070
Lists all applications installed on the target server.
Usage:
gingee-cli list-apps -s https://remote-gingee:7070Options:
-s, --server <url>(Optional): The base URL of the target Gingee server. Defaults tohttp://localhost:7070.
These commands allow you to discover and install applications from a decentralized "app store," which is simply a server hosting a store.json manifest file.
Fetches the manifest from a store URL and displays a list of available applications.
Usage:
gingee-cli list-store-apps -g https://my-store.example.comOptions:
-g, --gStoreUrl <gstore-url>(Optional): The Gingee App Store url
Initiates an interactive installation of an application from a store. The CLI will:
- Download the app's
.ginpackage. - Read the app's required permissions from its internal
pmft.jsonmanifest. - Prompt you for consent to grant these permissions.
- Prompt you to configure any requirements (like database connections).
- Repackage the app with your configuration and securely install it on your target Gingee server.
Usage:
gingee-cli install-store-app my-blog-app -g https://my-store.example.com -s http://<remote-gingee>Options:
-g, --gStoreUrl <gstore-url>(Optional): The Gingee App Store url-s, --server <url>(Optional): The base URL of the target Gingee server. Defaults tohttp://localhost:7070
Initiates an interactive installation of an application from a store. The CLI will:
- Download the app's
.ginpackage. - Read the app's required permissions from its internal
pmft.jsonmanifest. - Create the new set of permissions that are requested. (auto assigns previous version grants)
- Prompt you for consent to grant these permissions.
- Prompt you to configure any requirements (like database connections).
- Repackage the app with your configuration and securely install it on your target Gingee server.
Usage:
gingee-cli install-store-app my-blog-app -g https://my-store.example.com -s http://<remote-gingee>Options:
-g, --gStoreUrl <gstore-url>(Optional): The Gingee App Store url-s, --server <url>(Optional): The base URL of the target Gingee server. Defaults tohttp://localhost:7070
These powerful commands allow for remote deployment and management of your applications.
| Command | Description |
|---|---|
package-app |
Packages a live application from the server into a distributable .gin archive file. |
install-app |
Installs a new application onto a server from a local .gin package file. |
upgrade-app |
Upgrades an existing application on a server using a new .gin package file. |
delete-app |
Permanently deletes an application and all its content from the server. |
Common Options for Lifecycle Commands:
-s, --server <url>(Optional): The URL of the target server. Defaults to the last-logged-in server.-a, --appName <app-name>(Required): The name of the target application.-p, --ginPath <path>(Required for install/upgrade): The path to the local.ginpackage file.-f, --file <path>(Automation): Provide a preset file for non-interactive execution.
Example Usage:
# Upgrade the 'my-blog' app on a production server
gingee-cli upgrade-app --appName my-blog --ginPath ./builds/my-blog-v2.gin --server https://prod.serverCommands for the disaster recovery and rollback features.
| Command | Description |
|---|---|
list-app-backups |
Lists all available .gin backup files for an application stored on the server. |
rollback-app |
Rolls an application back to its most recently created backup on the server. |
Common Options for Recovery Commands:
-s, --server <url>(Optional): The URL of the target server.-a, --appName <app-name>(Required): The name of the target application.-f, --file <path>(Automation): Provide a preset file for non-interactive execution.
For use in CI/CD pipelines or other automated scripts, the lifecycle commands (install-app, upgrade-app, rollback-app, delete-app) can be run in a non-interactive mode by providing a preset file using the -f, --file <path> option.
The preset file is a simple JSON file that contains the configuration for the action you want to perform. The CLI will use the values from this file instead of showing interactive prompts.
Example myapp-deploy-presets.json:
{
"upgrade": {
"ginPath": "./build/my-blog-app-v2.gin",
"consent": {
"grantPermissions": ["db", "fs", "httpclient"]
},
"config": {
"db": [
{
"name": "main_db",
"host": "prod-db.cluster.internal",
"user": "prod_user",
"password": "$DB_PASSWORD_PROD",
"database": "blog_production"
}
]
}
},
"rollback": {
"consent": {
"grantPermissions": ["db", "fs"]
}
},
"delete": {
"confirm": true
}
}Security with Environment Variables:
For sensitive values like passwords, you can use environment variable placeholders (a string starting with $). The CLI will automatically substitute $VAR_NAME with the value of the process.env.VAR_NAME variable at runtime.
Example Usage in a CI/CD script:
# The server URL and app name are still passed as arguments for safety
export DB_PASSWORD_PROD="a-very-secret-password"
gingee-cli upgrade-app --appName my-blog-app --serverUrl https://prod.server --file ./deploy.jsonCommands for running Gingee as a native background service. These commands must be run from a project's root directory and typically require sudo or Administrator privileges.
service install: Installs and starts the server as a background service.service uninstall: Stops and removes the background service.service start: Manually starts the installed service.service stop: Manually stops the installed service.
reset-pwd: A local recovery tool. Prompts for a new admin user password forgladeadmin panel.reset-glade: A local recovery tool that performs a clean re-installation or reset of thegladeadmin panel.