forc-init
Create a new Forc project in an existing directory
USAGE:
forc init [OPTIONS]
OPTIONS:
--contract
The default program type, excluding all flags or adding this flag creates a basic contract program
-h
, --help
Print help information
-L
, --log-level
<LOG_LEVEL>
Set the log level
--library
Create a package with a library target (src/lib.sw)
--name
<NAME>
Set the package name. Defaults to the directory name
--path
<PATH>
The directory in which the forc project will be initialized
--predicate
Create a package with a predicate target (src/predicate.rs)
-s
, --silent
Silence all output
--script
Create a package with a script target (src/main.sw)
-v
, --verbose
Use verbose output
--workspace
Adding this flag creates an empty workspace
EXAMPLE
$ mkdir my-fuel-project
$ cd my-fuel-project
$ forc init
$ 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.