Installing Dat
This page will guide how to install Dat for the command line or javascript applications. There is also Dat Desktop and Beaker Browser, which provide a graphical user interface and much more.
Dat can be used as a command line tool, or as s JS library for Node.js and web browsers:
- See below to install the
datcommand line tool. - Node.js -
npm i dat-sdkand read more - Web -
<script src="https://bundle.run/dat-sdk@1"></script>and read more
Installing Dat on the Command Line
To install Dat, you can use wget or curl to download and get started:
wget -qO- https://raw.githubusercontent.com/datproject/dat/master/download.sh | bash
curl -o- https://raw.githubusercontent.com/datproject/dat/master/download.sh | bash
Once the install finishes, you should be able to run the $ dat command in your terminal.
If not, see the installation troubleshooting for tips.
Using npm
If you have npm, you can install Dat with it:
npm install -g dat
Make sure you have node and npm installed first.
If not, see the prerequisites section below. We recommend npm because it makes it easy to install new versions of dat when they are released.
Once npm install finishes, you should be able to run the $ dat command.
If not, see the installation troubleshooting for tips.
NPM Prerequisites
- Node: You'll need to install Node.js before installing Dat. Dat needs
nodeversion 6 or above andnpminstalled. You can runnode -vto check your version. Dat follows the Node.js LTS schedule for Node support. - npm:
npmis installed with node. You can runnpm -vto make sure it is installed.
Once you have npm ready, install dat from npm with the --global option, like npm install -g dat.
