---
title: fastly compute init
summary: Initialize a new Compute package locally
url: https://www.fastly.com/documentation/reference/cli/compute/init
---

Initialize a new Compute package locally

## Flags

| Flag | Description | Required | Default |
|------|-------------|----------|----------|
| `--author` | Author(s) of the package | No | - |
| `--directory` | Destination to write the new package, defaulting to the current directory | No | - |
| `--from` | Local project directory, or Git repository URL, or URL referencing a .zip/.tar.gz file, containing a package template, or an existing service ID created from a starter kit | No | - |
| `--language` | Language of the package | No | - |

## Global options

| Flag | Description | Required | Default |
|------|-------------|----------|----------|
| `--help` | Show context-sensitive help. | No | - |
| `--accept-defaults` | Accept default options for all interactive prompts apart from Yes/No confirmations | No | - |
| `--auto-yes` | Answer yes automatically to all Yes/No confirmations. This may suppress security warnings | No | - |
| `--debug-mode` | Print API request and response details (NOTE: can disrupt the normal CLI flow output formatting) | No | - |
| `--non-interactive` | Do not prompt for user input - suitable for CI processes. Equivalent to --accept-defaults and --auto-yes | No | - |
| `--quiet` | Silence all output except direct command output. This won't prevent interactive prompts (see: --accept-defaults, --auto-yes, --non-interactive) | No | - |
| `--token` | Fastly API token, or name of a stored auth token (use 'default' for the default token). Falls back to FASTLY_API_TOKEN env var | No | - |
| `--verbose` | Verbose logging | No | - |

## Examples

### Initialize a new Compute package locally

To initialize a new Compute 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.

```bash
fastly compute init --name example --language rust
```

### Initialize a new Compute package locally using a remote package template

Any [Compute examples](https://www.fastly.com/documentation/solutions/examples) can be used as a source template for your new package.

```bash
fastly compute init --from=https://fiddle.fastly.dev/fiddle/0220c0d2
```

### Initialize a new Compute 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.

```bash
fastly compute init --directory ./example
```

