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 start with our MetaCoin example by running the following on the command line:

mkdir MetaCoin
cd MetaCoin
truffle unbox metacoin

See the project structure as shown at the bottom of this page.

Note: The MetaCoin Truffle project used to be created by running truffle init. Now it exists as a Truffle Box.

You can use the truffle unbox <box-name> command to download any of the other 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: