Octopus Deploy Documentation

Octo Command Line Global Tool

Last updated

Microsoft introduced the ability to install tools using the .NET Core CLI called Global Tools. This lets you install Octo onto machine or build agent as long as you have the .NET Core 2.1.300 SDK available.

The SDK version must be 2.1300, if you use a later version, the tool will complain you have an incorrect version installed.

Specific Location

A local installation can be done into a specified location using the --tool-path parameter.

dotnet tool install Octopus.DotNet.Cli --tool-path /path/for/tool --version <version>

This will install Octo into the specified location and generate a platform specific executable called dotnet-octo into the specified location. In order to enable dotnet to find your custom tool location, you will need to add the tool location to the current environment path.

PowerShell

$env:PATH = "your\tool\folder;" + $env:PATH

Bash

export PATH="$PATH:/your/tool/folder"

Once the tool folder is in the path you can run Octo commands with .NET: dotnet octo pack.

User Installation

In order to install Octo for the current user you can do so by installing the tool globally using --global flag.

dotnet tool install Octopus.DotNet.Cli --global --version 4.39.1

You may also omit the --version parameter to install the latest version of the tools.

Check the output to make sure the installation works correctly. After the installation has completed, you can run the following to verify the version of Octo that was installed:

dotnet octo --version

Updating

In order to update to the latest version of the tool you can use the dotnet update command

dotnet tool update Octopus.DotNet.Cli --global

If you would like to update to a specific version or downgrade to an older version you can do so by first uninstalling the tool and installing it again.

dotnet tool uninstall Octopus.DotNet.Cli --global
dotnet tool install Octopus.DotNet.Cli --global --version <version>

Welcome! We use cookies and data about how you use our website allow us to improve the website and your experience, and resolve technical errors. Our website uses cookies and shares some of your data with third party analytics companies for these purposes.

If you decline, we will respect your privacy. A single cookie will be used in your browser to remember your preference.