Creating a project

To use most Truffle commands, you need to run them against an existing Truffle project. This section will show you how to create a new project.

For those just getting started, we have many boilerplates and example applications available to you through Truffle Boxes. You can use the truffle unbox <box-name> command to download these applications.

If you'd prefer to start from scratch, create a project directory and move into it. You can do this through your favorite file explorer or by running the following on the command line:

mkdir myproject
cd myproject

Next, initialize your Truffle project by running the following command:

truffle init

Once completed, you'll now have a project structure with the following items:

(Looking for the MetaCoin Truffle project that used to be created by running truffle init? It's now a Truffle Box. You can recreate the same project by running truffle unbox metacoin.)