devinit configuration file

The .devinit.json file defines the system-wide dependencies that your application needs in order to run and build. System-wide dependencies are things like Node.js, SQL Server, IIS, RabbitMQ, Docker, etc. These are the sort of things you would normally install on your dev box that aren't installed by a specific repo. It's not a place to define application-specific dependencies like you would in package managers such as NuGet or NPM. It is, however, a place to define that you need those package managers.

File location

The devinit init command is driven via the .devinit.json file. By default, devinit looks for the file in the following locations:

  • {current-directory}\.devinit.json
  • {current-directory}\devinit.json
  • {current-directory}\.devinit\.devinit.json
  • {current-directory}\.devinit\devinit.json
  • {current-directory}\devinit\.devinit.json
  • {current-directory}\devinit\devinit.json
  • {current-directory}\.devcontainer\.devinit.json
  • {current-directory}\.devcontainer\devinit.json

Note

If multiple default files are found, then devinit will use the file that appears first in the above list.

The .devinit.json file can also be specified explicitly via the --file/-f option.

Directories and relative paths

Paths are relative to the location where devinit is running. This is typically the current working directory from which devinit was executed.

File Format

In a .devinit.json, you can specify more than one tool to run. In the run section, you can put any number of objects. An example of this is seen in our sample .devinit.json with all of our tools.

{
    "$schema": "https://json.schemastore.org/devinit.schema-3.0",
    "comments": "string",
    "run": [
        {
            "comments": "string",
            "tool": "string",
            "input": "string|null|undefined",
            "additionalOptions": "string|null|undefined"
        }
    ]
}

Property values

Name Type Required Value
comments string No Comments for the file.
run array Yes RunTool object

Run tool object

Name Type Required Value
comments string No Comments for the tool entry.
tool string Yes The tool name. See the devinit list command for a listing of available tools.
input string No The tool input. Varies by tool. For example, the required version, the package ID, the filename, or folder.
additionalOptions string No Additional command-line arguments to be passed to the tool.

Examples

For more examples of using devinit, see the Samples section.