# Installation

In this section, learn how to:

  • Install eWizard CLI, a command-line interface for eWizard.js.

  • Log in to your eWizard instance.

To guarantee the stable work of eWizard CLI, use the LTS Node.js version 18 or later. For example, Node.js 18.17.1. Node.js versions 14 and 16 won't be supported in eWizard.js starting November 2023.

# Overview

eWizard CLI is a globally installed npm package (opens new window) 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

To guarantee the stable work of eWizard CLI, use the LTS Node.js version 18 or later. For example, Node.js 18.17.1.

You can download Node.js here (opens new window).

When installing Node.js with an installer, check the Automatically install the necessary tools checkbox.

Automatically install the necessary tools checkbox

Or you can install Node.js with nvm, for example, version 18.17.1.

For this:

  1. Download (opens new window) the latest version of the nvm installer.

  2. Open PowerShell with admin rights and run:

    nvm install 18.17.1
    
  3. Run:

    nvm use 18.17.1
    

# C++ and Python compilers

To compile native Addon modules for Node.js version earlier than v6.13.0, the node-gyp (opens new window) npm package requires Microsoft Visual C++ build environment and Python compilers.

To set dependencies and configuration, install:

Python 3 isn't supported.

To compile native Addon modules in Windows environment, see Microsoft guidelines (opens new window).

# Git

To check if you have Git installed:

git --version

To download Git, click here (opens new window).

# 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

To guarantee the stable work of eWizard CLI, use the LTS Node.js version 18 or later. For example, Node.js 18.17.1.

If Node.js isn't installed, use nvm or binary distribution to install it.

  • To install Node.js with nvm:

    1. Run:

      curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
      
    2. Install the required Node.js version. For example, 18.17.1:

      nvm install 18.17.1
      
  • To install Node.js with binary distribution:

    1. Run:

      curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
      
    2. 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 (opens new window) 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

To find out the current version of eWizard CLI, go to eWizard CLI npm package (opens new window).

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:

wiz login

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 (opens new window).

The eWizard login window opens in your default browser. Enter your login and password here.

sign in

You may close the login window after you've logged in.

login successful

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:

Continue to eWizard CLI commands for the full list of the CLI commands for creating your projects with eWizard.js.

Last updated: 10/4/2023, 9:36:17 AM