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
{  "$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:

npx croct@latest use template.json5 --name my-app

Properties

These are the supported properties:

name
string

The action identifier. Always install for this action.