Webthing CLI lets you turn React components into something anyone can use with no code.

For example, this confetti button is a React component published with Webthing's CLI.

🎉 Confetti me

Since it's on Webthing, I can use it without coding:

I just type "Conf" – I don't even have to type "Confetti Button" – and I get a confetti button in this post. And, I can change the colors of the confetti button to be whatever I want (also, with no coding).

I didn't have to import anything. There was no build, install, or configuration step. There was no development server. I didn't even to write JSX. I just typed "Conf", pressed enter, and a confetti button appeared.

When you publish a component on Webthing, anyone else can use it immediately. It shows up in search, like any other component.

Code from your own text editor and debug/test it on https://webthing.com/write. As you edit, Webthing instantly reloads your component.

When you're happy with your component, run webthing publish and anyone else on Webthing will be able to find and use your component.

Installing Webthing CLI

Installing the CLI is absolutely not required to use components – just to build them.

Before we get started, you'll need to you have Node.js (v8+) installed.

To install the CLI, run the following command in your terminal

npm install -g @webthing/cli
npm install -g @webthing/cli

Make a new component

webthing new HelloWebthing
webthing new HelloWebthing

After you enter a filename, this will create two files in the current directory:

- HelloWebthing.js

- HelloWebthing.package.js

The first file is your code. The second file is the metadata required for Webthing to know how to use your component. You might not need to mess with the second file.

Immediately after creating the files, it will open the files in your text editor and then run webthing dev for you, kicking off the development server.

webthing dev