✨What Is DeCent-CLI?✨
Published: 2023-10-03 23:20:00


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ev681doh220xrix2l62r.png)
DeCent-CLI is a command line interface application for Node.js-compatible runtimes. The application assists with developing, testing, validating, and publishing Decentralized Web Apps (<a href="">DWAs</a>).

There are several unique aspects of DeCent-CLI; the application features a DWA validator, and an integrated DCNT server implementation, as well as many other conveniences for shortcutting routine tasks. Just as an HTML validator validates markup, the DeCent-CLI validator helps developers ensure that application packages fulfill the criteria to be considered a valid DWA. The embedded DCNT server provides both manual and automated DWA testing for applications through a local WebSocket server which implements the DCNT protocol. The server also provides a secure host for locally installed applications, granting the ability to connect to WSS WebSockets and create WebRTC peer connections.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/25j2bpyx2eukquwlspbx.png)

<hr>

## How Is DeCent-CLI Installed?

Installing DeCent-CLI is a few commands away:

    $ git clone https://github.com/futurehood/DeCent-CLI

    $ cd DeCent-CLI

    $ npm install decent-cli


You can also download the files directly here: https://github.com/futurehood/DeCent-CLI/archive/refs/heads/main.zip

<hr>

## What Does This Mean For Developers?

DeCent-CLI offers new functionality for developers that was previously unavailable. The application improves the workflow of DWA developers in a number of ways, most notably:

<hr>

### 🔥 Accessibility 🔥

DeCent-CLI makes DWA development more accessible. Now, any web developer with experience using **git** and **npm** can quickly and easily dive in to DWA development. Let's take a look at how simple it is to set up a new DWA project:

<pre>$ decent-cli install <a href="https://github.com/futurehood/DCNT-JS-DWA-Template">https://github.com/futurehood/DCNT-JS-DWA-Template</a> my-first-dwa-project</pre>

This command will download the files at the given repository URL, and validate that the package contains a valid DWA. If everything checks out, the application files will be stored locally in the specified location, in this case a folder name ***my-first-dwa-project***. DWA packages may also be downloaded using repository aliases, ZIP archives, and will also soon be installable directly from live, traditionally-hosted web apps.

<hr>

### 🔥 Get started quickly 🔥

Now the environment is prepared for development. The template files can be used as a jump-off for building a new DWA. There's also an in-depth tutorial on using the <a href="">DCNT-JS-DWA-Template</a> available which goes through the entire process in finer detail.

Much of the complexity surrounding DCNT-powered peer connection signaling is removed by using DeCent-CLI as a development hub. Between the integrated DCNT server and self-hosted apps for testing, and the availability of helper libraries like DCNT-JS and templates, getting started with development has never been easier.

<hr>

### 🔥 Hands-on experience 🔥

Once an application is ready to be previewed, the ***launch*** command will start the integrated server and then open the locally-hosted DWA in the given browser:

    $ decent-cli launch my-first-dwa-project firefox

An option for hot reload functionality while the server is running is also on the way.

<hr>

### 🔥 Standardized output 🔥

Though the template package will be validated during installation by default, once the application files have been installed, they can also be manually validated at any time with the validate command:
    
    $ decent-cli validate my-first-dwa-project

This allows developers to quickly check if everything is in order with the given package. Soon, this feature will also be utilized by a testing framework that automates testing web apps involving DCNT-signaled WebRTC connections.

<hr>

### 🔥 Easy publishing 🔥

When the application is ready for release, the ***publish*** command (coming soon) can be used to publish the DWA package with a single command:

    $ decent-cli publish my-first-dwa-project github

If the package passes validation, DeCent-CLI will attempt to use **git** create a new Github repository and upload the package to it using your credentials. At this point, your DWA has been published and is available for distribution directly from it's repository. The package can be installed and self-hosted by anyone as easily as the template package was installed above, for example:

<pre>$ decent-cli install <a href="https://github.com/USERNAME/my-first-dwa-project">https://github.com/USERNAME/my-first-dwa-project</a></pre>

<hr>

## What Does This Mean For The Internet? 💞

By significantly lowering the bar to entry for DWA development, DeCent-CLI supports an expanded DWA ecosystem at a time when decentralized solutions to the problems created by centralization are urgently needed.

The toolset provided by DeCent-CLI puts the possibility of creating a completely decentralized, <a href="">infrastructureless</a>, peer-to-peer web application well within reach of any frontend developer.

Ultimately, DeCent-CLI assists in giving humanity a chance for a better web by offering users a new variety of overlay network (WebRTC-based) with huge advantages in privacy, security, and usability. The networks created by DWAs operate across the Internet using standard web technologies, while being impervious to all of the issues that plague our current webs.

<hr>

## More Information

For more information of DeCent-CLI, take a look at the <a href="https://github.com/futurehood/DeCent-CLI">project repository</a> or the <a href="https://github.com/futurehood/DeCent-CLI/blob/main/readme/usage-guide.md">Usage Guide</a>

For more information on the DeCent project, have a look at the <a href="https://github.com/futurehood/DeCent">project repository</a>.

☮️