Skip to main content

Flow CLI

Installation

Follow these steps to install the Flow CLI on macOS, Linux, and Windows.

Create your first project

The Flow CLI is Flow’s primary development and testing environment, similar to Hardhat and Foundry for developers familiar with writing in Solidity. With the Flow CLI super commands, initiating your new project becomes effortless. Execute the flow setup command and make a selection from a variety of accessible scaffolds.


_19
> flow setup hello-world --scaffold
_19
_19
🔨 General Scaffolds
_19
[1] Empty Cadence Project - Empty project containing only basic folder structure and flow.json configuration.
_19
[2] Simple Cadence Project - Scaffold contains required folder structure as well as some example Cadence code.
_19
[3] Cadence NFT Project - Scaffold contains the ExampleNFT sample NFT contract.
_19
[4] Hybrid Custody Project - Starter for exploring & implementing Hybrid Custody.
_19
_19
💻 Web Scaffolds
_19
[5] FCL Web Dapp - Simple TypeScript web application using next.js, FCL, and Cadence.
_19
_19
📱 Mobile Scaffolds
_19
[6] Swift iOS simple example - iOS example demonstrating usage of FCL and Flow interactions.
_19
[7] Android simple example - Android example demonstrating usage of FCL and Flow interactions.
_19
[8] FCL React Native Mobile Dapp - React Native (Expo) mobile dapp example demonstrating FCL and Flow interactions.
_19
_19
🏀 Unity Scaffolds
_19
[9] Simple Unity - Simple example demonstrating how to interact with the Flow network using Unity SDK.
_19
[10] Mobile Unity Game - Example words game built on Flow using the Unity SDK.

After you have created your new project you can proceed writing contracts and by running dev command the CLI will make sure they are deployed to the Flow emulator for you. Flow emulator is a simplified version of Flow network you can use locally to develop.

So proceed by starting the emulator:


_10
> flow emulator

After creating your new project you are ready to start writing contracts. The Flow emulator is a simplified local simulation of the Flow network. Running the dev command in the CLI ensures that the contracts are deployed to the Flow emulator for you.

And then the flow dev:


_10
> flow dev

Next steps

As part of the next steps you can read more about flow dev command.