Setup Enviroment for Dasha on Linux
Content
Installing Node.js
- Check installed Node.js version:
- Open terminal;
- Execute command:
node --version
- If the output version is less than
v14.0.0
or"node" command not found
read the next step, else go to step 7; - If you use node package manager nvm go to step 5, else go to step 4;
- Linux distribution-specific actions. Also, you can read and follow official guide:
- If Debian or Ubuntu distribution:
- Open terminal;
- Execute command:
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
- Execute command:
sudo apt-get install -y nodejs
- If Arch distribution:
- Open terminal;
- Execute command:
sudo -E pacman -S nodejs npm
- If Enterprise Linux based distributions (CentOS, RHEL, CentOS, CloudLinux, Amazon Linux, or Fedora):
- Open terminal;
- Execute command:
curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash -
- If Debian or Ubuntu distribution:
- Go to step 6.
- Installing Node.js using
nvm
:- Open terminal;
- Execute command:
sudo nvm install --lts
- Execute command:
sudo nvm alias default lts/*
- Execute command:
sudo nvm use default
- Return to step 1;
- You have successfully installed Node.js with the needed version.
Installing Dasha CLI
Requirement:
Installed Node.js v14 or newer.
Check installed "@dasha.ai/cli":
- Open terminal;
- Execute command:
dasha account list
- If the output is
"dasha" command not found
go to step 2 - If the output is empty go to step 4 else go to step 7.
Install
@dasha.ai/cli@latest
package:- Open terminal;
- Execute command:
sudo npm install --global --force "@dasha.ai/cli@latest"
- Reload terminal.
Go to step 1;
Now you need to login via CLI if don’t have access to the GUI browser then go to step 5:
- Open terminal;
- Execute command: or with specified server
dasha account login
(ordasha account login --server app.us.dasha.ai
--server app.ru.dasha.ai
). - Follow output instruction (command in step 4 should open browser or print in terminal action which needs execute);
- Go to step 8.
Another way to do login is to run the below command:
- Open terminal;
- Execute command: or with specified server
dasha account add --api-key <YOUR_EXSISTING_API_KEY> -f <YOUR_ACCOUNT_NAME>
(ordasha account add --api-key <YOUR_EXSISTING_API_KEY> -f --server app.us.dasha.ai <YOUR_ACCOUNT_NAME>
--server app.ru.dasha.ai
). - If you don’t have API key, you can continue the login procedure from current step on another computer or use the following command:Response is json with field
curl -sSL https://auth.dasha.ai/connect/token --ssl-no-revoke -XPOST -F client_id=platform_client -F grant_type=password -F username=<YOUR_EMAIL> -F password=<YOUR_PASSWORD>
access_token
where contains your API key.
Check success login via a command in step 1
Select needed account returning in step 6 by the following command
- Open terminal;
- Execute command:
dasha account use <YOUR_ACCOUNT_NAME>
You have successfully installed "@dasha.ai/cli@latest" package.
Installing Visual Studio Code (Optional)
- Check installed
Visual Studio Code
:- Open terminal;
- Execute command:return version of installed
code --version
Visual Stuido Code
or"code" command not found
.
- If the output is the correct version go to step 5 else read the next step;
- Install
Visual Studio Code
from official site:- Following
Visual Studio Code
installing instruction;
- Following
- Return to step 1
- You have successfully installed
Visual Studio Code
.
Installing DashaStudio extension (Optional)
Requirement:
Installed Visual Studio Code
- You can install using
Visual Studio Code
extensions menu (step 3) or using terminal (step 4) or download it from marketplace; - Install
DashaStudio
usingVisual Studio Code
GUI, more documentation about it can be found there:- Open
Visual Studio Code
; - Press combination
Ctrl+Shift+X
; - Write
DashaStudio
in search panel; - Press
install
.
- Open
- Install
DashaStudio
using terminal:- Open terminal;
- Execute command:
sudo code --install-extension dasha-ai.dashastudio --force
- You have successfully installed
DashaStudio
.
Installing Git (Optional)
- Check installed git by getting its version (execute command in terminal)
git --version
- If the output is
"git" command not found
or equals to it, then install from Git site and follow instructions for your distributive, else go to step 4; - Go to step 1 to check corrected installing;
- You have successfully installed
Git
.
Found a mistake? Email us, and we'll send you a free t-shirt!