Skip to main content

Getting Started

Install binaries

You can download static binaries in the Releases tab of the Grid git repository.

To install it:

## One Shot Method:
curl https://raw.githubusercontent.com/deepsquare-io/grid/main/cli/get-dps | bash

## Manual Method:
# Create a local directory to store executable.
mkdir -p ~/.local/bin
# Move executable to install directory.
mv <path/to/dps> ~/.local/bin/dps
# Add executation permission.
chmod +x ~/.local/bin/dps

For Windows users, open cmd.exe (don't use PowerShell) and execute:

:: Create a local directory to store executable.
mkdir "%USERPROFILE%\.local\bin"
:: Move executable to install directory.
move <path/to/dps> "%USERPROFILE%\.local\bin\dps.exe"

Make sure that $HOME/.local/bin (%USERPROFILE%\.local\bin for Windows) is added to the $PATH (%PATH%) environment variable.

Help: Adding to PATH.

Install from source

With Go, it is possible to install from source directly by running:

go install github.com/deepsquare-io/grid/cli/cmd/dps@latest

Make sure that $HOME/go/bin (%HOME%\go\bin for Windows) is added to the $PATH (%PATH%) environment variable.

Help: Adding to PATH.

Usage

  1. Edit the.bashrc (or .zshrc) file and load this environment variable:

    export METASCHEDULER_SMART_CONTRACT=<0x address>

    For Windows users, set User Environment Variable via the Control Panel. Again, see this guide, but instead of changing a path, add a new environment variable.

    You can find the smart-contract address (MetaSchedulerAddr) in the Releases tab of the Grid git repository.

  2. Create a directory at ~/.dps and put your wallet private key at ~/.dps/key:

    mkdir -p ~/.dps
    echo "0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff" > ~/.dps/key
    # Ensure the permission of the key excludes world and group permissions.
    chmod 600 ~/.dps/key

    For Windows users:

    mkdir "%USERPROFILE%\.dps"
    echo "0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff" > "%USERPROFILE%\.dps\key"
    icacls "%USERPROFILE%\.dps\key" /inheritance:r
    icacls "%USERPROFILE%\.dps\key" /grant:r "%username%":"(R)"
    note

    If you want to avoid typing these steps manually, or want to generate a private key instead, you can run dps init.

    You can fetch your private key from MetaMask by following this guide.

    To run on DeepSquare, you need credits. You can fetch free credits by filling this form.

  3. You can run CLI commands by executing:

    dps command [command options] [arguments...]

    The available commands are:

    allowance  Manage allowance.
    credit Manage credits.
    init Bootstrap a job workflow file.
    job Manage jobs.
    provider Manage providers (need to use an admin smart-contract).
    submit Quickly submit a job.
    help, h Shows a list of commands or help for one command
  4. You can run the TUI by simply running dps.

The next pages will explain the commands and their usages.