Installing the Yalo CLI

The Yalo CLI is the preferred way of setting up and deploying applications that run on Yalo. Consider it your first step into a wider world.

Requirements

You need access to the following:

  • Yalo bitbucket
  • Access to Yalo 1Password "Keys" vault

you will also need the following third-party tools:

🚧

Terraform Version

Be sure that the installed Terraform version should be 0.12.x. Later versions are not supported causing further with the YALO SDK deployments to fail.

To install terraform into your computer run

mv ~/Downloads/terraform /usr/local/bin/

The following instructions are mac-centric, although they work with very little modification on other operating systems.

πŸ“˜

Mac Users

If you are running on a mac, have the OS X developer tools installed. We also recommend Homebrew and "brew cask" to install packaged tools like Terraform.

πŸ“˜

Windows Users

TL;DR: it's not here yet. The Yalo CLI relies on standard tools in POSIX (unix-like) operating systems. WSL is not officially supported yet.

SDK Components

For now, the CLI install requires setup the prior installation of SDK components using git. Clone them to the ~/yalo directory:

git clone https://bitbucket.org/yalochat/sdk.git ~/.yalo

or, if you prefer to use SSH with Bitbucket:

git clone [email protected]:yalochat/sdk.git ~/.yalo

The SDK contains build tools that will help you develop on the Yalo platform. If you want to experiment with the latest changes, check out the develop branch and set the upstream. (SSH version as above.)

git clone https://bitbucket.org/yalochat/sdk.git -b develop ~/.yalo

Some tools that we will use, such as access to Yalo's private NPM registry and Terraform build system, require replacing [email protected] with your actual email address at Yalo, and A3-555555-RESTOFMYKEY with your Secret Key.

πŸ“˜

1Password Secret Key

Your 1Password secret key can be found in your 1Password account under: https://yalochat.1password.com/profile

The following will authorize your device to perform further operations with 1Password:

op signin yalochat.1password.com [email protected] A3-555555-RESTOFMYKEY

To login to your 1password account you should run the following. It will prompt a message asking for your password for your 1Password account>

eval $(op signin yalochat)

Then execute the install script

~/.yalo/install.sh

It will download the required secrets into the ~/.yalo/secrets directory. It will also create a ~/.yalo/env file with the required environment variables to everything related with the Yalo SDK . If you get an error, see the Troubleshooting page. You should see the following message:

********************************* DONE! ****************************************

Place these lines in your '~.bash_profile', '.profile' file or '.zshenv'

  export $(egrep -v '^#' $HOME/.yalo/env | xargs )
  PATH=$YALO_SDK_ROOT/bin:$PATH

Then restart your shell, and install the Yalo CLI by running

npm install -g @engyalo/yalo-cli

Happy coding!
- The Yalo Product Team

The following will export the environment variables in the file yalo/env to your session. In order to persist these variables in any session it is suggested to add the following lines to your .zshrc, .zshenv or similar:

export $(egrep -v '^#' $HOME/.yalo/env | xargs)
  PATH=$YALO_SDK_ROOT/bin:$PATH

Then restart your shell. Check your installation by running yalo doctor.

The Yalo CLI is hosted as a private NPM package. To install it on your machine, first download and install Node.js and npm. We recommend the asdf version manager as an easy way of installing these packages in a cross-platform way. Alternatively, you can use the Node Version Manager (NVM).

You can use other Node version managers such as NVM as well.

npm install -g @engyalo/yalo-cli

Now you should be able to see the welcome screen for the Yalo CLI when you run yalo

β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—      β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—      β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—     β–ˆβ–ˆβ•—
β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—    β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘
 β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘
  β•šβ–ˆβ–ˆβ•”β•  β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘
   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•    β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘
   β•šβ•β•   β•šβ•β•  β•šβ•β•β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•β•β•      β•šβ•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β•
                                                         

The Yalo CLI is used to manage Yalo apps from the command line.

VERSION
  @engyalo/yalo-cli/1.0.2 darwin-x64 node-v12.18.0

USAGE
  $ yalo [COMMAND]

TOPICS
  addon  Add an exist addons for extending storefront

COMMANDS
  config           Displays configuration
  create           Creates projects, packages, and add-ons
  doctor           Checks your system setup
  help             display help for yalo
  login            Logs you in to Yalo
  logout           Logs you out of Yalo
  preview          Shows a preview of the storefront that you have created
  publish          Publishes a package
  update           Checks your system setup
  upload-products  Upload products from csv file. If --dev flag is settled means that the data is going to be published in the
                   development environment and is going to be available only when the preview command is used.

~ without fear of success!

If you see this, you're done! A couple of commands worth noting:

yalo doctor

This command will check your installation point-by-point. If you run into any problems, run this command and send the output to the development team at [email protected]

yalo update

This command will update the SDK at the ~/.yalo directory, and the CLI itself.

🚧

Update Privileges

Be sure to run the update command with enough user privileges. E.g: Root privileges may be required to update the yalo-cli.

yalo login

Logs you into Yalo to use privileged commands as yalo create and yalo deploy.
This will prompt a message asking for your token. The required token is the same as the one used by the environment variable YALO_CLI_ADMIN_TOKEN
The following should be enough to retrieve the value:

echo $YALO_CLI_ADMIN_TOKEN

Did this page help you?