MASES.KNetCLI
3.1.1
dotnet tool install --global MASES.KNetCLI --version 3.1.1
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local MASES.KNetCLI --version 3.1.1
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=MASES.KNetCLI&version=3.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package MASES.KNetCLI --version 3.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
title: CLI interface of .NET suite for Apache Kafka™ _description: Describes how to use CLI interface of .NET suite for Apache Kafka™
KNet: CLI
Installation
KNet CLI is available in two different formats:
- dotnet tool hosted on NuGet: check https://www.nuget.org/packages/MASES.KNetCLI/ and https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools for installation deep instructions.
- Docker image hosted on GitHub and Docker Hub: follow instruction within the page and general instruction on https://docs.docker.com
The dotnet tool needs a JRE/JDK installed within the system.
Usage
Execute an Apache Kafka™ command
To use the CLI interface (KNetCLI) runs a command like the following:
- dotnet tool
knet -ClassToRun ConsoleConsumer --bootstrap-server SERVER-ADDRESS:9093 --topic topic_name --from-beginning
If the previous command raises the error described in Intel CET and KNet the only solution is to apply the following workaround (within an elevated shell) and disable CET:
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\knet.exe" /v MitigationOptions /t REG_BINARY /d "0000000000000000000000000000002000" /f
- Docker image
docker run ghcr.io/masesgroup/knet -ClassToRun ConsoleConsumer --bootstrap-server SERVER-ADDRESS:9093 --topic topic_name --from-beginning
docker run masesgroup/knet -ClassToRun ConsoleConsumer --bootstrap-server SERVER-ADDRESS:9093 --topic topic_name --from-beginning
Execute an interactive shell
To use the CLI interface (KNetCLI) in interactive mode runs a command like the following:
- dotnet tool
knet -i
knet -i
- Docker image
docker run ghcr.io/masesgroup/knet -i
docker run masesgroup/knet -i
Execute in script based mode
To use the CLI interface (KNetCLI) in script based mode runs a command like the following:
- dotnet tool
knet -s path-to-script
- Docker image
docker run ghcr.io/masesgroup/knet -s path-to-script
docker run masesgroup/knet -s path-to-script
Command line switches available
knetcli needs at least ClassToRun, Interactive or Script command-line switch to identify its behavior. Here the list:
- ClassToRun: has precedence to all others and needs a second parameter which identify the command class to be executed
- Interactive (i): starts an interactive session where the user can write code like in a REPL shell, optionally can be set JarList, NamespaceList and ImportList
- Script (s): start a session to execute the script of the second parameter, optionally can be set JarList, NamespaceList and ImportList
- NoLogo (nl): do not display initial informative string
Other options on Command line switch page.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 3.1.1 | 1,119 | 11/28/2025 | |
| 3.1.0 | 402 | 9/23/2025 | |
| 3.0.4 | 847 | 9/23/2025 | |
| 3.0.3 | 5,728 | 8/22/2025 | |
| 3.0.2 | 1,910 | 8/5/2025 | |
| 3.0.1 | 655 | 7/20/2025 | |
| 3.0.0 | 573 | 7/19/2025 | |
| 2.9.6 | 92 | 11/28/2025 | |
| 2.9.5 | 112 | 11/28/2025 | |
| 2.9.4 | 171 | 10/5/2025 | |
| 2.9.3 | 374 | 7/20/2025 | |
| 2.9.2 | 543 | 7/17/2025 | |
| 2.9.1 | 4,384 | 2/5/2025 | |
| 2.9.0 | 2,257 | 12/23/2024 | |
| 2.8.2 | 1,398 | 11/5/2024 | |
| 2.8.1 | 2,349 | 9/20/2024 | |
| 2.8.0 | 1,850 | 8/6/2024 | |
| 2.7.10 | 467 | 11/5/2024 | |
| 2.7.9 | 606 | 9/20/2024 | |
| 2.7.8 | 588 | 7/31/2024 | |
| 2.7.7 | 448 | 7/30/2024 | |
| 2.7.6 | 479 | 7/29/2024 | |
| 2.7.5 | 2,160 | 7/2/2024 | |
| 2.7.4 | 2,008 | 6/27/2024 | |
| 2.7.3 | 3,201 | 6/24/2024 | |
| 2.7.2 | 512 | 5/25/2024 | |
| 2.7.1 | 346 | 5/18/2024 | |
| 2.7.0 | 568 | 5/16/2024 | |
| 2.6.7 | 467 | 11/5/2024 | |
| 2.6.6 | 577 | 9/20/2024 | |
| 2.6.5 | 577 | 9/16/2024 | |
| 2.6.4 | 435 | 6/14/2024 | |
| 2.6.3 | 387 | 6/11/2024 | |
| 2.6.2 | 435 | 5/17/2024 | |
| 2.6.0 | 968 | 3/1/2024 | |
| 2.5.0 | 799 | 2/28/2024 | |
| 2.4.3 | 738 | 2/11/2024 | |
| 2.4.2 | 471 | 1/27/2024 | |
| 2.4.1 | 450 | 1/21/2024 | |
| 2.4.0 | 446 | 1/20/2024 | |
| 2.3.0 | 1,266 | 11/25/2023 | |
| 2.2.0 | 605 | 10/19/2023 | |
| 2.1.3 | 886 | 10/11/2023 | |
| 2.1.2 | 788 | 10/6/2023 | |
| 2.1.1 | 777 | 10/5/2023 | |
| 2.1.0 | 854 | 9/27/2023 | |
| 2.0.2 | 894 | 8/2/2023 | |
| 2.0.1 | 919 | 7/11/2023 | |
| 2.0.0 | 1,017 | 7/8/2023 | |
| 1.5.5 | 789 | 7/1/2023 | |
| 1.5.4 | 698 | 5/28/2023 | |
| 1.5.3 | 878 | 4/16/2023 | |
| 1.5.2 | 982 | 4/11/2023 | |
| 1.5.1 | 918 | 3/15/2023 | |
| 1.5.0 | 1,027 | 2/9/2023 | |
| 1.4.8 | 1,010 | 11/28/2022 | |
| 1.4.7 | 1,054 | 11/23/2022 | |
| 1.4.6 | 1,075 | 11/22/2022 | |
| 1.4.5 | 950 | 11/21/2022 | |
| 1.4.4 | 1,325 | 11/1/2022 | |
| 1.4.3 | 1,514 | 10/21/2022 | |
| 1.4.2 | 1,574 | 10/17/2022 | |
| 1.4.1 | 1,448 | 10/10/2022 | |
| 1.4.0 | 1,483 | 10/6/2022 | |
| 1.3.6 | 1,330 | 9/19/2022 | |
| 1.3.5 | 1,356 | 9/8/2022 | |
| 1.3.4 | 1,794 | 8/18/2022 | |
| 1.3.3 | 2,022 | 8/5/2022 | |
| 1.3.2 | 2,123 | 6/19/2022 | |
| 1.3.1 | 2,182 | 5/23/2022 | |
| 1.2.4 | 2,568 | 5/11/2022 | |
| 1.2.3 | 2,364 | 5/7/2022 | |
| 1.2.2 | 2,647 | 5/2/2022 | |
| 1.2.1 | 2,682 | 3/28/2022 | |
| 1.2.0 | 2,479 | 3/20/2022 |