⌘K

Icon SunFilledIcon MoonStars

Icon Linkforc-new

Create a new Forc project at <path>

Icon LinkUSAGE:

forc new [OPTIONS]

Icon LinkARGS:

<PATH>

The path at which the project directory will be created

Icon LinkOPTIONS:

--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

Adding this flag creates an empty library program

--name <NAME>

Set the package name. Defaults to the directory name

--predicate

Adding this flag creates an empty predicate program

-s, --silent

Silence all output

--script

Adding this flag creates an empty script program

-v, --verbose

Use verbose output

--workspace

Adding this flag creates an empty workspace

Icon LinkEXAMPLE

$ 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.