{"_id":"59e14cc9a7c18b001afa437c","project":"568bdc1483d2061900d86cdc","version":{"_id":"59a72290d61777001b6c42c3","project":"568bdc1483d2061900d86cdc","__v":21,"createdAt":"2017-08-30T20:39:44.453Z","releaseDate":"2017-08-30T20:39:44.453Z","categories":["59a7236e3fe4d90025117c10","59a72eb6cb0db3001b84cfe2","59a734eb757d030019b85af8","59c0243b1b2d07001a9d2b76","59c035e42126e10028effb12","59c06c40df5b3c0010584a13","59c1a5852cabe5002641a3e7","59c2fb00b2b45c0010b7a3d7","59c32ceb9aea850010ac4130","59c32e6e190c90003cb0d12f","59c33affb2b45c0010b7aa23","59c7dfa457bd8200105444dc","59c7e975c50cf30010d712a0","59cffdef0cd4dd0010294d54","59d0622ca91a810032c8f60c","59d06733c1aec60026253065","59d174d44ac471001a07b123","59d5a5e323e6e800103defb2","59ecf1d8ed507c001c52b255","59f76fef8581dc0010593e6f","5a0c003680a35b0012c35db0"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"0.0.0","version":"0"},"category":{"_id":"59a72eb6cb0db3001b84cfe2","project":"568bdc1483d2061900d86cdc","version":"59a72290d61777001b6c42c3","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-08-30T21:31:34.201Z","from_sync":false,"order":0,"slug":"knowledge-base","title":"Getting Started"},"user":"58cc41f21751ce2f003be3b7","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-10-13T23:31:21.168Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"# Overview\n\nInstalling the Droplit CLI follows a similar process on all operating systems which Droplit supports.\n\nUse the following two commands to install the [Droplit command line interface (CLI)](https://www.npmjs.com/package/droplit-cli) globally, and to check its version number, which should prove that it installed correctly. The images below are from a Windows system, but the console content should be the same, regardless of the operating system used. After installation, the Droplit CLI should be available from any directory.\n\n```\nnpm install -g droplit-cli\n```\n\n![droplit console download](https://droplit.box.com/shared/static/7fr7zp5h6tdyx3qmt59cbo1zbyi0kcy2.png)\n\n```\ndroplit -v\n```\n\n![droplit console check](https://droplit.box.com/shared/static/b75rxrkcsbhb1x5kinvqdafhteac0cho.png)\n\n# Handling Unix Errors\n\nOn Mac OS or Linux/Embedded systems, when installing the CLI, an error like the following may occur. The example image is on a Linux system, but the content is the same on Mac OS and embedded systems.\n\n![droplit install error](https://droplit.box.com/shared/static/9yk97d99kh17ox6u3h5j3q9x63btci58.png)\n\nThis error is due to a permissions problem in NPM, and can be fixed multiple ways, as described at [docs.npmjs.com](https://docs.npmjs.com/getting-started/fixing-npm-permissions). Option 2 is the preferred option for the Droplit CLI, as it does not require changing directory ownership, which may be a security risk.\n\nFirst, change the install location of global packages.\n\n```\nmkdir ~/.npm-global\nnpm config set prefix '~/.npm-global'\n```\n\nThen, create/edit `.bashrc` to add the new directory to the system `PATH`. `.bash_profle` can also be used for this purpose. `.bash_profile` is executed for a login shell, while `.bashrc` is executed for every new shell instance.\n\n```\necho \"export PATH=~/.npm-global/bin:\\$PATH\" >> ~/.bashrc\n```\n\nFinally, restart the terminal. Once the terminal restarts, one should be able to install and use global packages.","excerpt":"","slug":"droplit-console-setup","type":"basic","title":"Droplit Command Line Console Setup"}

Droplit Command Line Console Setup


# Overview Installing the Droplit CLI follows a similar process on all operating systems which Droplit supports. Use the following two commands to install the [Droplit command line interface (CLI)](https://www.npmjs.com/package/droplit-cli) globally, and to check its version number, which should prove that it installed correctly. The images below are from a Windows system, but the console content should be the same, regardless of the operating system used. After installation, the Droplit CLI should be available from any directory. ``` npm install -g droplit-cli ``` ![droplit console download](https://droplit.box.com/shared/static/7fr7zp5h6tdyx3qmt59cbo1zbyi0kcy2.png) ``` droplit -v ``` ![droplit console check](https://droplit.box.com/shared/static/b75rxrkcsbhb1x5kinvqdafhteac0cho.png) # Handling Unix Errors On Mac OS or Linux/Embedded systems, when installing the CLI, an error like the following may occur. The example image is on a Linux system, but the content is the same on Mac OS and embedded systems. ![droplit install error](https://droplit.box.com/shared/static/9yk97d99kh17ox6u3h5j3q9x63btci58.png) This error is due to a permissions problem in NPM, and can be fixed multiple ways, as described at [docs.npmjs.com](https://docs.npmjs.com/getting-started/fixing-npm-permissions). Option 2 is the preferred option for the Droplit CLI, as it does not require changing directory ownership, which may be a security risk. First, change the install location of global packages. ``` mkdir ~/.npm-global npm config set prefix '~/.npm-global' ``` Then, create/edit `.bashrc` to add the new directory to the system `PATH`. `.bash_profle` can also be used for this purpose. `.bash_profile` is executed for a login shell, while `.bashrc` is executed for every new shell instance. ``` echo "export PATH=~/.npm-global/bin:\$PATH" >> ~/.bashrc ``` Finally, restart the terminal. Once the terminal restarts, one should be able to install and use global packages.