|
1 | 1 | --- |
2 | 2 | title: How to install the ML.NET Command-Line Interface (CLI) tool |
3 | 3 | description: Learn how to install, upgrade, downgrade, and uninstall the ML.NET Command-Line Interface (CLI) tool. |
4 | | -ms.date: 06/08/2020 |
| 4 | +ms.date: 07/13/2021 |
5 | 5 | ms.custom: mlnet-tooling |
6 | 6 | --- |
7 | 7 |
|
|
51 | 51 |
|
52 | 52 | You should see the help for available commands for the mlnet tool such as the 'classification' command. |
53 | 53 |
|
| 54 | +> [!IMPORTANT] |
| 55 | +> If you are running Linux or macOS, note that if you're using a console other than Bash (for example, zsh, which is the new default for macOS), then you'll need to give `mlnet` executable permissions and include `mlnet` to the system path. Instructions on how to do this should appear in the terminal when you install `mlnet` (or any global tool). |
| 56 | +> |
| 57 | +> Alternatively, you can try using the following command to run the mlnet tool: |
| 58 | +> |
| 59 | +> ```console |
| 60 | +> ~/.dotnet/tools/mlnet |
| 61 | +> ``` |
| 62 | +
|
54 | 63 | ## Install a specific release version |
55 | 64 |
|
56 | 65 | If you're trying to install a pre-release version or a specific version of the tool, you can specify the [framework](../../standard/frameworks.md) using the following format: |
@@ -81,38 +90,6 @@ Type the following command to update the package from your local machine: |
81 | 90 | dotnet tool update -g mlnet |
82 | 91 | ``` |
83 | 92 |
|
84 | | -## Set up CLI suggestions (tab-based auto-completion) |
85 | | - |
86 | | -Since the ML.NET CLI is based on `System.CommandLine`, it has built-in support for tab completion. |
87 | | - |
88 | | -An example of how tab auto completion works is shown in the following animation: |
89 | | - |
90 | | - |
91 | | - |
92 | | -'Tab-based auto-completion' (parameter suggestions) works on *Windows PowerShell* and *macOS/Linux bash* but it won't work on *Windows CMD*. |
93 | | - |
94 | | -To enable it, in the current preview version, the end user has to take a few steps once per shell, outlined below. Once this is done, completions will work for all apps written using `System.CommandLine` such as the ML.NET CLI. |
95 | | - |
96 | | -On the machine where you'd like to enable completion, you'll need to do two things. |
97 | | - |
98 | | -1. Install the `dotnet-suggest` global tool by running the following command: |
99 | | - |
100 | | - ```dotnetcli |
101 | | - dotnet tool install dotnet-suggest -g |
102 | | - ``` |
103 | | -
|
104 | | -2. Add the appropriate shim script to your shell profile. You may have to create a shell profile file. The shim script will forward completion requests from your shell to the `dotnet-suggest` tool, which delegates to the appropriate `System.CommandLine`-based app. |
105 | | -
|
106 | | - - For bash, add the contents of [dotnet-suggest-shim.bash](https://github.com/dotnet/System.CommandLine/blob/main/src/System.CommandLine.Suggest/dotnet-suggest-shim.bash) to `~/.bash_profile`. |
107 | | -
|
108 | | - - For PowerShell, add the contents of [dotnet-suggest-shim.ps1](https://github.com/dotnet/System.CommandLine/blob/main/src/System.CommandLine.Suggest/dotnet-suggest-shim.ps1) to your PowerShell profile. You can find the expected path to your PowerShell profile by running the following command in your console: |
109 | | -
|
110 | | - ```console |
111 | | - echo $profile |
112 | | - ``` |
113 | | -
|
114 | | -(For other shells, [look for](https://github.com/dotnet/System.CommandLine/issues?q=is%3Aissue+is%3Aopen+label%3A%22shell+suggestion%22) or open an [issue](https://github.com/dotnet/System.CommandLine/issues).) |
115 | | -
|
116 | 93 | ## Installation directory |
117 | 94 |
|
118 | 95 | The ML.NET CLI can be installed in the default directory or in a specific location. The default directories are: |
|
0 commit comments