A [.NET Core Global Tool](/dotnet/core/tools/global-tools#install-a-global-tool) is installed from the [Microsoft.Web.LibraryManager.Cli](https://www.nuget.org/packages/Microsoft.Web.LibraryManager.Cli/) NuGet package.
To install the LibMan CLI from a specific NuGet package source:
In the preceding example, a .NET Core Global Tool is installed from the local Windows machine's *C:\Temp\Microsoft.Web.LibraryManager.Cli.1.0.94-g606058a278.nupkg* file.
## Usage
After successful installation of the CLI, the following command can be used:
```console
libman
```
To view the installed CLI version:
```console
libman --version
```
To view the available CLI commands:
```console
libman --help
```
The preceding command displays output similar to the following:
```console
1.0.163+g45474d37ed
Usage: libman [options] [command]
Options:
--help|-h Show help information
--version Show version information
Commands:
cache List or clean libman cache contents
clean Deletes all library files defined in libman.json from the project
init Create a new libman.json
install Add a library definition to the libman.json file, and download the
library to the specified location
restore Downloads all files from provider and saves them to specified
destination
uninstall Deletes all files for the specified library from their specified
destination, then removes the specified library definition from
libman.json
update Updates the specified library
Use "libman [command] --help" for more information about a command.
```
The following sections outline the available CLI commands.
## Initialize LibMan in the project
The `libman init` command creates a *libman.json* file if one doesn't exist. The file is created with the default item template content.
The following options are available for the `libman init` command:
*`-d|--default-destination <PATH>`
A path relative to the current folder. Library files are installed in this location if no `destination` property is defined for a library in *libman.json*. The `<PATH>` value is written to the `defaultDestination` property of *libman.json*.
*`-p|--default-provider <PROVIDER>`
The provider to use if no provider is defined for a given library. The `<PROVIDER>` value is written to the `defaultProvider` property of *libman.json*. Replace `<PROVIDER>` with one of the following values:
A *libman.json* file is added to the project root with the following content:
```json
{
"version": "1.0",
"defaultProvider": "cdnjs",
"libraries": []
}
```
## Add library files
The `libman install` command downloads and installs library files into the project. A *libman.json* file is added if one doesn't exist. The *libman.json* file is modified to store configuration details for the library files.
The name of the library to install. This name may include version number notation (for example, `@1.2.0`).
### Options
The following options are available for the `libman install` command:
*`-d|--destination <PATH>`
The location to install the library. If not specified, the default location is used. If no `defaultDestination` property is specified in *libman.json*, this option is required.
Specify the name of the file to install from the library. If not specified, all files from the library are installed. Provide one `--files` option per file to be installed. Relative paths are supported too. For example: `--files dist/browser/signalr.js`.
If not specified, the `defaultProvider` property in *libman.json* is used. If no `defaultProvider` property is specified in *libman.json*, this option is required.
To restore the library files defined in *libman.json*:
```console
libman restore
```
## Delete library files
The `libman clean` command deletes library files previously restored via LibMan. Folders that become empty after this operation are deleted. The library files' associated configurations in the `libraries` property of *libman.json* aren't removed.
### Synopsis
```console
libman clean [--verbosity]
libman clean [-h|--help]
```
### Options
The following options are available for the `libman clean` command: