# Azion CLI link

:::note 
In case one or more required fields aren't informed through the specific flags, an interactive message prompts and asks for the missing information.
:::

## Link

The linking process adapts the project so it's linked to Azion and can be deployed as an application. It creates the necessary configurations for future build and deployment of the application on the edge.

:::note 
It's necessary to run the command in the project's root folder.
:::

### Usage

```sh
azion link
```

### Output 

Confirm the linking of the project to Azion:

```sh 
? Do you want to link /cli-examples/effervescent_moon to Azion? (y/N) 
```

Enter the desired name for your application:

```sh
? (Hit enter to accept the suggested name in parenthesis) Your application's name:  (nimble-tyrion) 
```

Choose a *preset*:

```sh 
? Choose a preset:  [Use arrows to move, type to filter]
> Angular
  Astro
  Docusaurus
  Eleventy
  Emscripten
  Gatsby
  Hexo
  Html
  Hugo
  Javascript
  Jekyll
  Next
  React
  Rustwasm
  Svelte
  Typescript
  Vitepress
  Vue
```

Now, the application will be linked to Azion. Different processes occur based on the selected preset, so you need to answer the interactions that are presented.

Choose if you want to run the application locally or not:

```sh
? Do you want to start a local development server? (y/N) 
```

:::note 
If you want to start a local development server later, run 'azion dev'
:::

```sh
? Do you want to deploy your project? No
```

:::note 
If you want to deploy your application later, run 'azion deploy'. Your application won't be available on the edge until it's deployed.
:::

:::tip
Optionally, you can run `npm i azion` to install [Azion Lib](https://www.npmjs.com/package/azion). These libraries provide tools to interact with Azion services and enable custom configurations for your application. Check the [azion.config.js file reference](/en/documentation/devtools/cli/configs/azion-config-js/) for more information. 
:::

### Optional flags

#### auto

The `--auto` option can be informed, but it isn't mandatory. If informed, the entire flow of the command runs without interruptions.


#### name

The `--name` option can be specified, but it isn't mandatory. If it isn't informed, the name of your project will be autogenerated.

#### mode

The `--mode` option can be specified, but it isn't mandatory. The expected values are `deliver` and `compute`.

#### preset

The `--preset` option can be specified, but it isn't mandatory. The expected values are:

- Angular
- Astro
- Docusaurus
- Eleventy
- Emscripten
- Gatsby
- Hexo
- Html
- Hugo
- Javascript
- Jekyll
- Next
- React
- Rustwasm
- Svelte
- Typescript
- Vitepress
- Vue

#### remote 

The `--remote` flag, followed by a link to a git repository, specifies the project to be cloned and linked to an application during the process.

#### package-manager

The `--package-manager` option allows you to specify the package manager to use. Example: `npm`, `yarn`, `pnpm`. If not informed, the package manager will be set automatically based on `package-lock.json` or `yarn.lock`. If none of these files are found, then `npm` is default.

#### help

The `--help` option displays more information about the `link` command.


Learn how to link and deploy projects on Azion Web Platform. Watch the video below:
<div class="cms-embed">
  <Video src="https://www.youtube.com/embed/Ub2nzz3Ap2U?si=AALxnhtVNuejUEHt" title="Azion CLI link" description="Learn how to link and deploy projects on the Azion Web Platform, using interactive commands for optimal edge computing integration." uploadDate="2023-09-28" />
</div>