Quickstart Guide: CLI

Explore the Abridged CLI's core functionality in two minutes with the help of the SDK Playground.

Overview

The easiest way to see how you can get an application up and running locally with Abridged is to couple the capabilities of the Abridged CLI with the SDK Playground.

If it's your first time interacting with the Abridged CLI, we recommend going through the flow below for setting up a template application to quickly explore the CLI's functionality in two minutes.

To continue with the CLI quickstart guide, you'll need to have the Abridged CLI installed on your machine.

The Abridged CLI is still in pre-release version and is distributed under the codename "Archanova".

5 easy steps

Step 1: Set up your Abridged CLI project

Create a new project folder to house your CLI demo app in by typing the following command in your shell:

$ mkdir abridged-cli-project && cd abridged-cli-project

The Abridged CLI conveniently generates a device address for you to connect to an existing account contract.

Start the development process and generate a device address for the Ropsten testnet by typing the following command in your shell:

$ archanova-cli develop -e ropsten

You can make sure you're set up properly by checking to see if your device address is printed in your shell as well as a giant QR code that represents your device address.

Step 2: Set up the SDK Playground with an account contract

Open the SDK Playground and initialize it on the Ropsten testnet.

Click on the create account tab in the ACCOUNT section.

Click the Random button or enter a custom username that is at least 7 characters long to associate your account address with a username (also referred to as an ENS label/name).

Click on the Run button to create your account contract.

You can make sure your account contract is created by checking that theACCOUNT STATEsection in your header shows the value "Created". Your console will also print information about your newly created account contract, including the account address and ENS name.

Step 3: Connect the Abridged CLI with the SDK Playground

Click on the create account device tab in the ACCOUNT DEVICES section.

Copy the printed device address from your CLI, paste it into the parameter input, and click on the Run button.

You can make sure you're connected by checking to see if you see an account address printed in your shell that matches the account address shown in the header of your SDK Playground.

Since the Abridged CLI is still in pre-release version, you are required to enter a developer program invite code to continue using the CLI from this point. You can enter the invite code cliD3M0 to gain access.

Step 4: Set up your application

Enter your application name when prompted in your shell.

The Abridged CLI will install a number of requisite source files and a Dockerfile in your project folder for you to now spin up your application . The installed source files are barebones so the template application won't do anything particularly interesting (yet!) until you add in custom app logic yourself.

The Abridged CLI will also generate a temporary callback URL where you can view the output from your handlers.js file.

You can make sure your application is set up properly by copying the temporary callback URL printed in your shell and pasting it into your browser to view the output.

Step 5: Run your application

Install the required npm packages into your project folder by typing the following command in your shell:

npm i

Run your application by typing the following command in your shell:

npm start

You can make sure your application is running by copying the port number printed in your shell and navigating to the corresponding localhost port in your browser.

Congratulations! You just used the Abridged CLI to get an application up and running locally with the account contract integration!

Next steps to level up

If you're ready to dive deeper into what is possible with Abridged, you can do the following:‌

  1. Walk through the remaining SDK Playground recommended flows

  2. Go through the SDK reference for information about each available method

  3. Read through the various Web 3 components you can access with the Abridged SDK

  4. (COMING SOON) Complete the in-depth tutorials to integrate the SDK into an example app

  5. (COMING SOON) Create a Web 3 app with our drag-and-drop, no-code Web Portal interface

We're always happy to help with code or other questions you might have. Pose a question to our developer community in the Abridged chat channel. We'd also love to hear from you if you want to give us feedback or experience any bugs or issues!