npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

lw3-cli

v1.1.5

Published

LW3 CLI to kickstart your web3 project

Downloads

28

Readme

lw3-cli

Micro CLI for web3 developers to automate the dependencies installation process and generate essential code required by common projects in both backend and frontend.

lw3-cli

Getting Started

npm version

Introduction

lw3-cli is a micro CLI that makes the life of web3 developers easier who use hardhat in the backend and next.js in the frontend. To set up a project using hardhat in the backend and next.js in the frontend we need to install a bunch of dependencies and generate some essential common code used in almost every project for both hardhat and next.js repetitively. This is why lw3-cli is made to avoid such repetition to save time and instead spend more time on the core functionality of our project.

Anything that you do more than twice has to be automated.

-Adam Stone, CEO, D-Tools

The cli is developed using the following tools:

  • arg
  • chalk
  • clear
  • esm
  • figlet
  • handlebars
  • inquirer
  • listr
  • pkg-install

Prerequisites

  • You need to install node.js before using the CLI. If you don't have it installed in your computer, download it from here

Installation

To install the package execute the following command

  • npm install -g lw3-cli

Note: Run the command with sudo permission if you are using linux/macOS operating system and open up CMD with administrator permission if you are using windows operating system.

CLI Usage

Once the cli npm package is installed globally, Run the following command to use the CLI.

  • lw3-cli!

After the execution of the command you should be able to see 5 commands shown in the following image:

Option 1

Choosing the first option will install hardhat with essential dependencies.

After the execution of this command you will be asked whether if you want to install the other dependencies which consist of:

  • Your hardhat folder name which you can either choose the custom one or change it to whatever you want.

  • You will also be asked if you want to install the dotenv package. Pressing Y/y or enter will result in dotenv package's installation wheras pressing N will not.

  • And the openzeppelin package.

After the installation of the packages and folder creation you should see something like this on your terminal screen.

You can now begin by typing the following commands to initiate the hardhat project as shown in the image above:

  • cd hardhat-tutorial

  • npx hardhat

Once the hardhat project is initiated,You can either run lw3-cli again and choose the 2nd option or type the following shortcut command to generate common files!

  • lw3-cli --gen:hardhat

Option 2

Now that you have installed hardhat you need to generate the hardhat common files which you can do with the second option.

Similarly like the first option, You need to provide your contract name, and the network you want to deploy your contract to.

And now the following files will be created.

  • contract -.env
  • hardhat.config.js/ts
  • deploy.js/ts

Here's how your terminal screen should look like:

Option 3

Now you need to generate your front end and selecting this option will again trigger some questions such as providing your folder name, and whether if you want to add tailwind css to your project.

And now the following dependencies will be installed.

  • Next.js/ts

  • ethers

  • web3modal

  • tailwind if selected by the user

  • Here's how the terminal screen should look like:

Option 4

After entering the folder which in the picture above is (my-app) you need to install Next.js common files with the fourth option.

You will again be asked about the deployed contract and the network name and your screen should look like this after the creation of the two files:

Well here's your dapp-starter pack :)

But that's not all. There's also an option for people who just want to get things done even faster.

Option 5

For people who will get used to the CLI option 5 will show all the shortcut commands to save even more time.

Contribution

Licence