# Getting Started

To simply install the latest version of the CLI to your local system and get started, follow the Quick Start instructions. To build and/or develop the CLI from source, follow the Build and Run from Source instructions. In either case, be sure to satisfy the requirements in the Prerequisites section.

# Prerequisites

The following tools must be installed whether performing a Quick Start or Building from Source:

# Git

Some of ArDrive's dependencies are transitively installed via Git. Install it, if necessary, and ensure that it's available within your terminal environment:

Download Git (opens new window)

This project uses the Node Version Manager (NVM) and an .nvmrc file to lock the recommended Node version used by the latest version of ardrive-core-js.

Note for Windows: We recommend using WSL for setting up NVM on Windows using the instructions described here (opens new window)

Follow these steps to get NVM up and running on your system:

  1. Install NVM using these installation instructions (opens new window).
  2. Navigate to this project's root directory
  3. Ensure that the correct version of Node is installed by performing: nvm install
  4. Use the correct version of Node, by performing: nvm use


# Quick Start

Once you've satisfied any necessary prerequisites, the fastest way to get up and running is to globally install the latest version of the ArDrive CLI to your local system via NPM:

# Installing and Starting the CLI From NPM Package

npm install -g ardrive-cli

# then invoke the CLI from anywhere on your system:

# Upgrading to the Latest Version

If you globally installed the CLI via NPM, then upgrade to the latest version by simply performing:

npm update -g ardrive-cli

# Build and Run from Source

# Install Yarn 3

Both the ArDrive CLI and ArDrive Core JS use Yarn 3 to manage dependencies and initiate workflows, so follow the yarn installation instructions (opens new window) in order to get the latest version. In most cases:

# Brew (OSX):
brew install yarn

# Or with NPM (all supported platforms):
npm install -g yarn

# Husky (Developers Only)

We use husky 6.x to manage the git commit hooks that help to improve the quality of our commits. Please run:

yarn husky install

to enable git hooks for your local checkout. Without doing so, you risk committing non-compliant code to the repository.

# Using a custom ArDrive-Core-JS (Optional)

To test a with a custom version of the ardrive-core-js library on your local system, change the "ardrive-core-js" line in package.json to the root of your local ardrive-core-js repo:

- "ardrive-core-js": "1.0.0"
+ "ardrive-core-js": "../ardrive-core-js/"

# Installing and Starting the CLI From Source

Now that your runtime and/or development environment is set up, to install the package simply run:

yarn && yarn build

And then start the CLI (always from the root of this repository):

yarn ardrive

For convenience in the non-developer case, you can install the CLI globally on your system by performing the following step:

yarn pack

# then using the path generated by yarn from the step above:
npm install i -g /path/to/package.tgz

# then invoke the CLI from anywhere on your system:

To ensure your environment is compatible, we also recommend the following VSCode extensions:

# Limitations

Number of files in a bulk upload: Theoretically unlimited
Max individual file size: 2GB (Node.js limitation)
Max file name length: 255 bytes
Max ANS-104 bundled transaction size: 500 MiB per bundle. App will handle creating multiple bundles.
Max ANS-104 data item counts per bundled transaction: 250 Files per bundle (500 Data Items).