# thirdweb CLI

## thirdweb CLI

thirdweb provides an interactive command line interface, allowing you to create, build and deploy your smart contracts and apps.

You can use the thirdweb CLI to create and deploy smart contracts to the Pivotal network.

Visit the [thirdweb documentation](https://portal.thirdweb.com/cli) for more instructions on using the thirdweb CLI.

***

### Creating a project[​](https://docs.base.org/docs/tools/thirdweb-cli#creating-a-project) <a href="#creating-a-project" id="creating-a-project"></a>

Create a new project with thirdweb installed and configured:

```
npx thirdweb create
```

INFO

When you create a project for smart contracts or web3 apps there are various configurable options.

**For contracts, some options are:**

* Create a new contract project using [Hardhat](https://hardhat.org/) or [Forge](https://book.getfoundry.sh/)
* Add a new contract to an existing project
* Start from an audited contract base, and add optional [extensions](https://portal.thirdweb.com/contractkit/extensions)

**For contracts, some options are:**

* Front end applications using Next, CRA or Vite
* Backend applications using Node.js or Express.js
* Choice of TypeScript or JavaScript variants

***

### Deploying a smart contract[​](https://docs.base.org/docs/tools/thirdweb-cli#deploying-a-smart-contract) <a href="#deploying-a-smart-contract" id="deploying-a-smart-contract"></a>

[Deploy](https://portal.thirdweb.com/deploy) your smart contracts to the Pivotal network:

```
npx thirdweb deploy
```

{% hint style="info" %}
To deploy to the Pivotal network, after running `npx thirdweb deploy`, visit the provided dashboard URL and select Pivotal from the Network dropdown.
{% endhint %}

{% hint style="info" %}
For a complete guide on using the thirdweb CLI to create and deploy contracts on Pivotal, see [Deploy a smart contract on Pivotal testnet.](/pivotal-docs/build-on-pivotalchain/pivotal-contracts.md)
{% endhint %}

***

### Publishing a smart contract[​](https://docs.base.org/docs/tools/thirdweb-cli#publishing-a-smart-contract) <a href="#publishing-a-smart-contract" id="publishing-a-smart-contract"></a>

[Publish](https://portal.thirdweb.com/publish) and share a versioned release of your contract onto thirdweb’s registry:

```
npx thirdweb publish
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pivotalchain.io/pivotal-docs/pivotalchain-tools/toolchains/thirdweb-cli.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
