Skip to content

Commit 33c8aa3

Browse files
Update ML.NET CLI Install Guide (#25054)
* Add info about zsh * Remove auto-suggest section * Update docs/machine-learning/how-to-guides/install-ml-net-cli.md Co-authored-by: Luis Quintanilla <[email protected]> * Update docs/machine-learning/how-to-guides/install-ml-net-cli.md Co-authored-by: Luis Quintanilla <[email protected]> Co-authored-by: Luis Quintanilla <[email protected]>
1 parent d5e5382 commit 33c8aa3

File tree

1 file changed

+10
-33
lines changed

1 file changed

+10
-33
lines changed

docs/machine-learning/how-to-guides/install-ml-net-cli.md

Lines changed: 10 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: How to install the ML.NET Command-Line Interface (CLI) tool
33
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
55
ms.custom: mlnet-tooling
66
---
77

@@ -51,6 +51,15 @@ mlnet
5151

5252
You should see the help for available commands for the mlnet tool such as the 'classification' command.
5353

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+
5463
## Install a specific release version
5564
5665
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:
8190
dotnet tool update -g mlnet
8291
```
8392

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-
![image](./media/cli-tab-completion.gif)
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-
11693
## Installation directory
11794

11895
The ML.NET CLI can be installed in the default directory or in a specific location. The default directories are:

0 commit comments

Comments
 (0)