In this section, learn how to:
• Install eWizard CLI, a command-line interface for eWizard.js.
• Log in to your eWizard instance.
Overview
eWizard CLI is a globally installed npm package that provides the wiz
commands and options in your terminal. Use eWizard CLI to scaffold a new project with the wiz init
command or instantly view changes you add to the project code with the wiz dev --live
command.
Prerequisites for Windows
nvm
To check if you have nvm installed:
nvm -v
Node.js
To check if you have Node.js installed:
node -v
WARNING: To guarantee the stable work of eWizard CLI, use the Node.js version 14 or later. For example, Node.js 14.19.1.
You can download Node.js here.
When installing Node.js with an installer, check the Automatically install the necessary tools checkbox.
Or you can install Node.js with nvm, for example, version 14.19.1.
For this:
1) Download the latest version of the nvm installer.
2) Open PowerShell with admin rights and run:
nvm install 14.19.1
3) Run:
nvm use 14.19.1
C++ and Python compilers
To compile native Addon modules for Node.js version earlier than v6.13.0, the node-gyp npm package requires Microsoft Visual C++ build environment and Python compilers.
To set dependencies and configuration, install:
TIP: Python 3 isn't supported.
To compile native Addon modules in Windows environment, see Microsoft guidelines.
Git
To check if you have Git installed:
git --version
To download Git, click here.
Prerequisites for Ubuntu
To install eWizard CLI for Ubuntu, make sure you have the following items installed locally.
curl
To check if you have curl installed:
curl --version
If curl isn't installed, run:
sudo apt-get install curl
Node.js
To check if you have Node.js installed:
node -v
WARNING: To guarantee the stable work of eWizard CLI, use the Node.js version 14 or later. For example, Node.js 14.19.1.
If Node.js isn't installed, use nvm or binary distribution to install it.
• To install Node.js with nvm:
Run:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
Install the required Node.js version. For example,
14.7.0
:
nvm install 14.7.0
• To install Node.js with binary distribution:
Run:
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
Install Node.js:
sudo apt-get install -y nodejs
Python 2.7
To compile native Addon modules for Node.js version earlier than v6.13.0, the node-gyp npm package requires Python compilers.
To check your python version, run:
python --version
To install Python:
1) Run:
sudo apt install python2
2) Change priority so that the python2
binary executable has priority over python3
:
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 2
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
3) Switch to the Python 2.7 alternative:
sudo update-alternatives --config python
Git
To check if you have Git installed:
git --version
To install Git, run:
sudo apt-get install git
Install eWizard CLI
To install the eWizard CLI globally on your Windows computer:
npm install -g ewizard-cli
To install eWizard CLI on Ubuntu:
1) Set dependencies and configuration:
sudo apt install build-essential
2) Install the eWizard CLI npm package:
sudo npm install -g ewizard-cli
To check your version of eWizard CLI, run:
wiz --version
To update eWizard CLI to the latest version, run:
npm i -g ewizard-cli@latest
TIP: To find out the current version of eWizard CLI, go to eWizard CLI npm package.
Run npm i -g ewizard-cli@0.23.8
to install the specific version of eWizard CLI.
Login
Once eWizard CLI is installed, log in to your eWizard instance.
wiz login
If it's your first login, enter your eWizard instance:
TIP: You receive your eWizard instance link with your user name and password credentials. The eWizard instance follows this pattern: https://[company].ewizard.io
.
For example, https://viseven.ewizard.io.
The eWizard login window opens in your default browser. Enter your login and password here.
You may close the login window after you've logged in.
WARNING: When you log in for the first time, eWizard CLI creates the .wiz
service directory in the root directory where you've installed eWizard CLI. This directory contains the config.json
file with your eWizard instance URL, token, etc. If you delete this directory, you must log in and enter your instance again.
What's next
Now that you've logged in to your eWizard instance:
• Create an e-Detailer
• Create an email
• Create a site
• Create a messenger ad
• Create a component
• Create a block
• Create a module
Continue to eWizard CLI commands for the full list of the CLI commands for creating your projects with eWizard.js.