fastly compute init

Initialize a new Compute@Edge package locally.

Syntax

fastly compute init

Options

KeyRequired?DefaultDescription
--nameNoName of package, falls back to --directory
--descriptionNoDescription of the package
--directoryNoDestination to write the new package, defaulting to the current directory
--authorNoAuthor(s) of the package
--languageNoLanguage of the package
--fromNoGit repository URL, or URL referencing a .zip/.tar.gz file, containing a package template
--forceNoSkip non-empty directory verification step and force new project creation

Global options

KeyRequired?DefaultDescription
--helpNoShow context-sensitive help.
--tokenNoFastly API token (or via FASTLY_API_TOKEN)
--verboseNoVerbose logging

Examples

Initialize a new Compute@Edge package locally

To initialize a new Compute@Edge package you must select a supported language. The language can be provided using the optional --language flag, which supports tab completion hints, or the flag can be omitted and you'll be prompted interactively. The --name flag can also be omitted, which will result in the CLI prompting you interactively.

$ fastly compute init --name example --language rust

Initialize a new Compute@Edge package locally using a remote package template

Any Compute@Edge examples can be used as a source template for your new package.

$ fastly compute init --from=https://fiddle.fastlydemo.net/fiddle/0220c0d2

Initialize a new Compute@Edge package locally in a different directory

We recommend that you change to the new project directory after running this command, before executing further CLI commands.

$ fastly compute init --directory ./example