Skip to content

Fuels CLI

The quickest way to build full stack Fuel dApps.

  • fuels init — Creates a new fuels.config.ts file
  • fuels build — Build forc workspace and generate Typescript types for everything
  • fuels deploy — Deploy workspace contracts and save their IDs to JSON file
  • fuels dev — Start local Fuel Core node and build + deploy on every file change

Getting started

Imagine you have this file structure:

sh
my-fuel-dapp # NextJS app or similar
├── sway-programs # Forc's workspace
│   ├── src
│   ├── ...
│   └── Forc.toml
├── public
│   └── ...
├── src
│   ├── app
│   ├── ...
├   └── sway-programs-api # Type-safe generated API
└── package.json

Installation

Add it to your my-fuel-dapp project:

console
npm install fuels@0.84.0 --save
console
pnpm add fuels@0.84.0

Double-checking

console
npx fuels@0.84.0 -v

Next Step

Use pnpm fuels init to create a fuel.config.ts file.