# install

Learn how to install project dependencies.

This action installs project dependencies using the detected package manager.

It is typically run after scaffolding a new project to ensure all dependencies are resolved before further setup.

## Example

The following template scaffolds a project and installs its dependencies:

**template.json5**

```json5
{
  "$schema": "https://schema.croct.com/json/v1/template.json",
  "title": "Project setup",
  "description": "Scaffolds a project and installs dependencies.",
  "options": {
    "name": {
      "type": "string",
      "description": "The project name.",
      "default": "my-app"
    }
  },
  "actions": [
    {
      "name": "execute-package",
      "command": "giget@latest",
      "arguments": [
        "gh:user/starter",
        "${options.name}"
      ]
    },
    {
      "name": "change-directory",
      "path": "${options.name}"
    },
    {
      "name": "install"
    },
    {
      "name": "print",
      "semantics": "success",
      "message": "Project ready."
    }
  ]
}
```

To apply this template, run:

```sh
croct use template.json5 --name my-app
```

## Properties

These are the supported properties:

- `name`: `string`

  The action identifier. Always `install` for this action.

## Explore

- [Add dependency](/reference/cli/templates/actions/add-dependency): Learn how to add a dependency before installing.
- [Execute package](/reference/cli/templates/actions/execute-package): Learn how to run a package binary command.
- [Check dependency](/reference/cli/templates/actions/check-dependency): Learn how to check if a dependency is installed.
- [Run](/reference/cli/templates/actions/run): Learn how to run a group of actions.
