Setup Enviroment for Dasha on Windows OS
Content
Installing Node.js
- Check installed Node.js version:
- Open terminal, for example,
cmd
(Win+R
, writecmd
and pressEnter
); - Execute command:
node --version
- Open terminal, for example,
- 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;
- Download LTS release from Node.js for Windows and following Node.js installing instruction. Go to step 6;
- Installing Node.js using
nvm
:- Open terminal as Admin, for example,
cmd
(Win+R and write cmd and press Ctrl+Shift+Enter to run it as administrator). Attention: we need to open another terminal then in step 1 - Execute command:
nvm install lts
- Execute command:
nvm use lts
- Open terminal as Admin, for example,
- 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 the terminal, for example,
cmd
(Win+R
, writecmd
and pressEnter
); - 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.
- Open the terminal, for example,
Install
@dasha.ai/cli@latest
package:- Open the terminal, for example,
cmd
(Win+R
, writecmd
and pressEnter
); - Execute command:
npm install --global --force "@dasha.ai/cli@latest"
- Reload terminal.
- Open the terminal, for example,
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, for example,
cmd
(Win+R
, writecmd
and pressEnter
); - 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 6.
- Open terminal, for example,
Another way to do login is to run the below command:
- Open terminal, for example,
cmd
(Win+R
, writecmd
and pressEnter
); - 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.
- Open terminal, for example,
Check success login via a command in step 1
Select needed account returning in step 6 by the following command
- Open terminal, for example,
cmd
(Win+R
, writecmd
and pressEnter
); - Execute command:
dasha account use <YOUR_ACCOUNT_NAME>
- Open terminal, for example,
You have successfully installed "@dasha.ai/cli@latest" package.
Installing Visual Studio Code (Optional)
- Check installed
Visual Studio Code
:- Open terminal, for example,
cmd
(Win+R
, writecmd
and pressEnter
); - Execute command:return version of installed
code --version
Visual Stuido Code
or"code" command not found
.
- Open terminal, for example,
- 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, for example,
cmd
(Win+R
, writecmd
and pressEnter
); - Execute command:
code --install-extension dasha-ai.dashastudio --force
- Open terminal, for example,
- 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, else go to step 4; - Go to step 1 to check corrected installing;
- You have successfully installed
Git
.
Found a mistake? Let us know.