Skip to content

Commit f694eae

Browse files
mairawBillWagner
authored andcommitted
Global tools - Part 1 (#5036)
* first draft of global tools * some updates * feedback * feedback * fix link test * added linux/mac samples * consistent capitalization * fixed include path * command updates * updates what's new
1 parent e951002 commit f694eae

File tree

7 files changed

+479
-17
lines changed

7 files changed

+479
-17
lines changed
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
title: dotnet tool install command - .NET Core CLI
3+
description: The dotnet tool install command installs the specified .NET Core Global Tool on your machine.
4+
author: mairaw
5+
ms.author: mairaw
6+
ms.date: 05/29/2018
7+
---
8+
# dotnet tool install
9+
10+
[!INCLUDE [topic-appliesto-net-core-21plus.md](../../../includes/topic-appliesto-net-core-21plus.md)]
11+
12+
## Name
13+
14+
`dotnet tool install` - Installs the specified [.NET Core Global Tool](global-tools.md) on your machine.
15+
16+
## Synopsis
17+
18+
```
19+
dotnet tool install <PACKAGE_NAME> <-g|--global> [--add-source] [--configfile] [--framework] [-v|--verbosity] [--version]
20+
dotnet tool install <PACKAGE_NAME> <--tool-path> [--add-source] [--configfile] [--framework] [-v|--verbosity] [--version]
21+
dotnet tool install <-h|--help>
22+
```
23+
24+
## Description
25+
26+
The `dotnet tool install` command provides a way for you to install .NET Core Global Tools on your machine. To use the command, you either have to specify that you want a user-wide installation using the `--global` option or you specify a path to install it using the `--tool-path` option.
27+
28+
Global Tools are installed in the following directories by default when you specify the `-g` (or `--global`) option:
29+
30+
| OS | Path |
31+
|-------------|-------------------------------|
32+
| Linux/macOS | `$HOME/.dotnet/tools` |
33+
| Windows | `%USERPROFILE%\.dotnet\tools` |
34+
35+
## Arguments
36+
37+
`PACKAGE_NAME`
38+
39+
Name/ID of the NuGet package that contains the .NET Core Global Tool to install.
40+
41+
## Options
42+
43+
`--add-source <SOURCE>`
44+
45+
Adds an additional NuGet package source to use during installation.
46+
47+
`--configfile <FILE>`
48+
49+
The NuGet configuration (*nuget.config*) file to use.
50+
51+
`--framework <FRAMEWORK>`
52+
53+
Specifies the [target framework](../../standard/frameworks.md) to install the tool for. By default, the .NET Core SDK tries to choose the most appropriate target framework.
54+
55+
`-g|--global`
56+
57+
Specifies that the installation is user wide. Can't be combined with the `--tool-path` option. If you don't specify this option, you must specify the `--tool-path` option.
58+
59+
`-h|--help`
60+
61+
Prints out a short help for the command.
62+
63+
`--tool-path <PATH>`
64+
65+
Specifies the location where to install the Global Tool. PATH can be absolute or relative. If PATH doesn't exist, the command tries to create it. Can't be combined with the `--global` option. If you don't specify this option, you must specify the `--global` option.
66+
67+
`-v|--verbosity <LEVEL>`
68+
69+
Sets the verbosity level of the command. Allowed values are `q[uiet]`, `m[inimal]`, `n[ormal]`, `d[etailed]`, and `diag[nostic]`.
70+
71+
`--version <VERSION_NUMBER>`
72+
73+
The version of the tool to install. By default, the latest stable package version is installed. Use this option to install preview or older versions of the tool.
74+
75+
## Examples
76+
77+
Installs the [dotnetsay](https://www.nuget.org/packages/dotnetsay/) Global Tool in the default location:
78+
79+
`dotnet tool install -g dotnetsay`
80+
81+
Installs the [dotnetsay](https://www.nuget.org/packages/dotnetsay/) Global Tool on a specific Windows folder:
82+
83+
`dotnet tool install dotnetsay --tool-path c:\global-tools`
84+
85+
Installs the [dotnetsay](https://www.nuget.org/packages/dotnetsay/) Global Tool on a specific Linux/macOS folder:
86+
87+
`dotnet tool install dotnetsay --tool-path ~/bin`
88+
89+
Installs version 2.0.0 of the [dotnetsay](https://www.nuget.org/packages/dotnetsay/) Global Tool:
90+
91+
`dotnet tool install -g dotnetsay --version 2.0.0`
92+
93+
## See also
94+
95+
[.NET Core Global Tools](global-tools.md)
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: dotnet tool list command - .NET Core CLI
3+
description: The dotnet tool list command lists the specified .NET Core Global Tool from your machine.
4+
author: mairaw
5+
ms.author: mairaw
6+
ms.date: 05/29/2018
7+
---
8+
# dotnet tool list
9+
10+
[!INCLUDE [topic-appliesto-net-core-21plus.md](../../../includes/topic-appliesto-net-core-21plus.md)]
11+
12+
## Name
13+
14+
`dotnet tool list` - Lists all [.NET Core Global Tools](global-tools.md) currently installed in the default directory on your machine or in the specified path.
15+
16+
## Synopsis
17+
18+
```
19+
dotnet tool list <-g|--global>
20+
dotnet tool list <--tool-path>
21+
dotnet tool list <-h|--help>
22+
```
23+
24+
## Description
25+
26+
The `dotnet tool list` command provides a way for you to list all .NET Core Global Tools installed user-wide on your machine (current user profile) or in the specified path. The command lists the package name, version installed, and the Global Tool command. To use the list command, you either have to specify that you want to see all user-wide tools using the `--global` option or specify a custom path using the `--tool-path` option.
27+
28+
## Options
29+
30+
`-g|--global`
31+
32+
Lists user-wide Global Tools. Can't be combined with the `--tool-path` option. If you don't specify this option, you must specify the `--tool-path` option.
33+
34+
`-h|--help`
35+
36+
Prints out a short help for the command.
37+
38+
`--tool-path <PATH>`
39+
40+
Specifies a custom location where to find Global Tools. PATH can be absolute or relative. Can't be combined with the `--global` option. If you don't specify this option, you must specify the `--global` option.
41+
42+
## Examples
43+
44+
Lists all Global Tools installed user-wide on your machine (current user profile):
45+
46+
`dotnet tool list -g`
47+
48+
Lists the Global Tools from a specific Windows folder:
49+
50+
`dotnet tool list --tool-path c:\global-tools`
51+
52+
Lists the Global Tools from a specific Linux/macOS folder:
53+
54+
`dotnet tool list --tool-path ~/bin`
55+
56+
## See also
57+
58+
[.NET Core Global Tools](global-tools.md)
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: dotnet tool uninstall command - .NET Core CLI
3+
description: The dotnet tool uninstall command uninstalls the specified .NET Core Global Tool from your machine.
4+
author: mairaw
5+
ms.author: mairaw
6+
ms.date: 05/29/2018
7+
---
8+
# dotnet tool uninstall
9+
10+
[!INCLUDE [topic-appliesto-net-core-21plus.md](../../../includes/topic-appliesto-net-core-21plus.md)]
11+
12+
## Name
13+
14+
`dotnet tool uninstall` - Uninstalls the specified [.NET Core Global Tool](global-tools.md) from your machine.
15+
16+
## Synopsis
17+
18+
```
19+
dotnet tool uninstall <PACKAGE_NAME> <-g|--global>
20+
dotnet tool uninstall <PACKAGE_NAME> <--tool-path>
21+
dotnet tool uninstall <-h|--help>
22+
```
23+
24+
## Description
25+
26+
The `dotnet tool uninstall` command provides a way for you to uninstall .NET Core Global Tools from your machine. To use the command, you either have to specify that you want to remove a user-wide tool using the `--global` option or specify a path to where the tool is installed using the `--tool-path` option.
27+
28+
## Arguments
29+
30+
`PACKAGE_NAME`
31+
32+
Name/ID of the NuGet package that contains the .NET Core Global Tool to uninstall. You can find the package name using the [dotnet tool list](dotnet-tool-list.md) command.
33+
34+
## Options
35+
36+
`-g|--global`
37+
38+
Specifies that the tool to be removed is from a user-wide installation. Can't be combined with the `--tool-path` option. If you don't specify this option, you must specify the `--tool-path` option.
39+
40+
`-h|--help`
41+
42+
Prints out a short help for the command.
43+
44+
`--tool-path <PATH>`
45+
46+
Specifies the location where to uninstall the Global Tool. PATH can be absolute or relative. Can't be combined with the `--global` option. If you don't specify this option, you must specify the `--global` option.
47+
48+
## Examples
49+
50+
Uninstalls the [dotnetsay](https://www.nuget.org/packages/dotnetsay/) Global Tool:
51+
52+
`dotnet tool uninstall -g dotnetsay`
53+
54+
Uninstalls the [dotnetsay](https://www.nuget.org/packages/dotnetsay/) Global Tool from a specific Windows folder:
55+
56+
`dotnet tool uninstall dotnetsay --tool-path c:\global-tools`
57+
58+
Uninstalls the [dotnetsay](https://www.nuget.org/packages/dotnetsay/) Global Tool from a specific Linux/macOS folder:
59+
60+
`dotnet tool uninstall dotnetsay --tool-path ~/bin`
61+
62+
## See also
63+
64+
[.NET Core Global Tools](global-tools.md)
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
title: dotnet tool update command - .NET Core CLI
3+
description: The dotnet tool update command updates the specified .NET Core Global Tool on your machine.
4+
author: mairaw
5+
ms.author: mairaw
6+
ms.date: 05/29/2018
7+
---
8+
# dotnet tool update
9+
10+
[!INCLUDE [topic-appliesto-net-core-21plus.md](../../../includes/topic-appliesto-net-core-21plus.md)]
11+
12+
## Name
13+
14+
`dotnet tool update` - Updates the specified [.NET Core Global Tool](global-tools.md) on your machine.
15+
16+
## Synopsis
17+
18+
```
19+
dotnet tool update <PACKAGE_NAME> <-g|--global> [--configfile] [--framework] [-v|--verbosity]
20+
dotnet tool update <PACKAGE_NAME> <--tool-path> [--configfile] [--framework] [-v|--verbosity]
21+
dotnet tool update <-h|--help>
22+
```
23+
24+
## Description
25+
26+
The `dotnet tool update` command provides a way for you to update .NET Core Global Tools on your machine to the latest stable version of the package. The command uninstalls and reinstalls a tool, effectively updating it. To use the command, you either have to specify that you want to update a tool from a user-wide installation using the `--global` option or specify a path to where the tool is installed using the `--tool-path` option.
27+
28+
## Arguments
29+
30+
`PACKAGE_NAME`
31+
32+
Name/ID of the NuGet package that contains the .NET Core Global Tool to update. You can find the package name using the [dotnet tool list](dotnet-tool-list.md) command.
33+
34+
## Options
35+
36+
`--add-source <SOURCE>`
37+
38+
Adds an additional NuGet package source to use during installation.
39+
40+
`--configfile <FILE>`
41+
42+
The NuGet configuration (*nuget.config*) file to use.
43+
44+
`--framework <FRAMEWORK>`
45+
46+
Specifies the [target framework](../../standard/frameworks.md) to update the tool for.
47+
48+
`-g|--global`
49+
50+
Specifies that the update is for a user-wide tool. Can't be combined with the `--tool-path` option. If you don't specify this option, you must specify the `--tool-path` option.
51+
52+
`-h|--help`
53+
54+
Prints out a short help for the command.
55+
56+
`--tool-path <PATH>`
57+
58+
Specifies the location where the Global Tool is installed. PATH can be absolute or relative. Can't be combined with the `--global` option. If you don't specify this option, you must specify the `--global` option.
59+
60+
`-v|--verbosity <LEVEL>`
61+
62+
Sets the verbosity level of the command. Allowed values are `q[uiet]`, `m[inimal]`, `n[ormal]`, `d[etailed]`, and `diag[nostic]`.
63+
64+
## Examples
65+
66+
Updates the [dotnetsay](https://www.nuget.org/packages/dotnetsay/) Global Tool:
67+
68+
`dotnet tool update -g dotnetsay`
69+
70+
Updates the [dotnetsay](https://www.nuget.org/packages/dotnetsay/) Global Tool located on a specific Windows folder:
71+
72+
`dotnet tool update dotnetsay --tool-path c:\global-tools`
73+
74+
Updates the [dotnetsay](https://www.nuget.org/packages/dotnetsay/) Global Tool located on a specific Linux/macOS folder:
75+
76+
`dotnet tool update dotnetsay --tool-path ~/bin`
77+
78+
## See also
79+
80+
[.NET Core Global Tools](global-tools.md)

0 commit comments

Comments
 (0)