The Insites CLI Tool is a command line interface that helps you deploy configuration files and assets to your Insites instance. It expects you to follow a certain file structure to communicate correctly with Insites API's.
The Insites CLI Tool requires Node.js in at least the latest LTS version to work properly. https://www.npmjs.com/package/@insites/insites-cli
Open your terminal and enter the following command:
npm i -g @insites/insites-cli
To verify that the installation was successful, type:
insites-cli
Run all commands in the project root directory - one level above the app or modules directory.
For effective integration between your codebase and its associated instance you will need to authenticate your environement via instance-uuid
.
In order to get the Instance UUID, follow the steps below:
- Login to Insites Console.
- Go to Instances page
- Find and select your instance to view Instance Details page
- Under the General tab, get the Instance UUID
In order to connect your codebase to your instance, open your project in your terminal. Since you can connect multiple instances to a single codebase, to have different environments for development and production, you need to give your instance a name in the parameter.
Enter the following command to authenticate your instance:
insites-cli env add <environment-name> --email <console-user-email> --instance-uuid <instance-uuid>
- Verify that your instance has been added by typing this which will display all the available environments:
insites-cli env list
To deploy changes to your instance, enter the following command to your project's terminal:
insites-cli deploy <environment-name>
To ensure that the instance promptly mirrors the code changes you make on a daily basis with minimal manual intervention and upload code changes automatically when you save the file, enter the following command on the project root directory:
insites-cli sync <environment-name>
This command offers an integrated development environment for drafting and executing your GraphQL queries
and Liquid snippets
as well as an option to view your data
, constants
, and logs
. This command establishes a direct connection to your environment thus you gain access to a live preview of data derived from your application.
This direct communication eliminates the potential for errors that might arise when data traverses other layers and features within the system.
insites-cli gui serve <environment-name>
Runs statical analysis on files in your current application directory to check your code for deprecations, recommendations, or syntax errors.
insites-cli audit
Lists all installed modules on a given environment. This command will not list modules that you deployed via the modules/
directory.
insites-cli module list <environment-name>
Create a new module based on module starter repository.
insites-cli modules init <module-name>
Download the installed modules from a given environment.
insites-cli modules pull <environment-name>
Removes a module from your application.
insites-cli modules remove [environment] <module name>
This is still on the expiremental phase. Please use the GUI to check for logs.
This pulls the logs from the server every couple of seconds and displays them in your command line.
insites-cli logs <environment-name>
Need to use CMD as administrator
npm update -g @insites/insites-cli
-
.insitesignore
- specifies intentionally untracked files to ignore -
.insites
- contains the environment credentials to connect to the instance -
.insites.legacy
- configuration file for legacy instances