apps/docs/src/guide/fuels-cli/index.md
The quickest way to build full stack Fuel dApps.
fuels init — Creates a new fuels.config.ts filefuels build — Build forc workspace and generate Typescript types for everythingfuels deploy — Deploy workspace contracts and save their IDs to JSON filefuels dev — Start local Fuel Core node and build + deploy on every file changeImagine you have this file structure:
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
The Fuel Toolchain and its components (namely forc and fuel-core) are pre-requisite for several operations with the Fuels CLI. For example:
fuels build requires forc.fuels deploy requires fuel-core.Follow the installation guide if you don't have them installed already.
Add it to your my-fuel-dapp project:
::: code-group
npm install fuels@{{fuels}} --save
pnpm add fuels@{{fuels}}
bun add fuels@{{fuels}}
:::
npx fuels@{{fuels}} -v
Use fuels init to create a fuel.config.ts file.