Create
Usage: forc new [OPTIONS]
Arguments:
<PATH>
The path at which the project directory will be created
Options:
--contract
The default program type. Excluding all flags or adding this flag creates a basic contract program
--script
Adding this flag creates an empty script program
--predicate
Adding this flag creates an empty predicate program
--library
Adding this flag creates an empty library program
--workspace
Adding this flag creates an empty workspace
--name
<NAME>
Set the package name. Defaults to the directory name
-v
, --verbose...
Use verbose output
-s
, --silent
Silence all output
-L
, --log-level
<LOG_LEVEL>
Set the log level
-h
, --help
Print help
-V
, --version
Print version
EXAMPLES:
Create a new project
forc new --contract --name my_project
Create a new workspace
forc new --workspace --name my_workspace
Create a new Forc project with a predicate
forc new
Create a new Forc library project
forc new
EXAMPLE
$ forc new my-fuel-project
$ cd my-fuel-project
$ tree
.
├── Forc.toml
└── src
└── main.sw
Forc.toml
is the Forc manifest file, containing information about the project and dependencies.
A src/
directory is created, with a single main.sw
Sway file in it.