dfx new
Use the dfx new command to create a new project for the Internet Computer blockchain.
This command creates a default project structure with template files that you can modify to suit your application.
You must specify the name of the project to you want to create.
You can use the --dry-run option to preview the directories and files to be created without adding them to the file system.
Flags
You can use the following optional flags with the dfx new command:
| Flag | Description |
|---|---|
|
Generates a preview the directories and files to be created for a new project without adding them to the file system. |
|
Installs the template frontend code for the default project canister.
The default value for the flag is |
|
Displays usage information. |
|
Displays version information. |
Arguments
You must specify the following argument for the dfx new command.
| Argument | Description |
|---|---|
|
Specifies the name of the project to create. This argument is required. |
Examples
You can use dfx new to create a new project named my_social_network by running the following command:
dfx new my_social_network
The command creates a new project, including a default project directory structure under the new project name and a Git repository for your project.
If you want to preview the directories and files to be created without adding them to the file system, you can run the following command:
dfx new my_social_network --dry-run