Octo.exe is a command line tool that builds on top of the Octopus Deploy REST API.
We provide a number of ways to get Octo onto your machine:
- Using .Net Core CLI as a global tool (recommended)
- Download from Octopus downloads page
- Using Chocolatey
octo.exe supports the following commands:
- clean-environment: Cleans all Offline Machines from an Environment.
- clean-workerpool: Cleans all Offline Workers from a WorkerPool.
- create-autodeployoverride: Override the release that auto deploy will use.
- create-channel: Creates a channel for a project.
- create-environment: Creates a deployment environment.
- create-project: Creates a project.
- create-release: Creates (and, optionally, deploys) a release.
- create-workerpool: Creates a pool for workers.
- delete-autodeployoverride: Delete auto deploy release overrides.
- delete-releases: Deletes a range of releases.
- deploy-release: Deploys a release.
- dump-deployments: Writes deployments to an XML file that can be imported in Excel.
- export: Exports an object to a JSON file.
- import: Imports an Octopus object from an export file.
- list-deployments: List a number of deployments by project, environment or by tenant.
- list-environments: List environments.
- list-latestdeployments: List the releases last-deployed in each environment.
- list-machines: Lists all machines.
- list-projects: Lists all projects.
- list-releases: List releases by project.
- list-tenants: List tenants.
- list-workerpools: List worker pools.
- list-workers: Lists all workers.
- pack: Creates a package (.nupkg or .zip) from files on disk, without needing a .nuspec or .csproj.
- promote-release: Promotes a release.
- push: Pushes a package (.nupkg, .zip, .tar.gz, etc.) package to the built-in NuGet repository in an Octopus Server.
- version: Output Octo command line tool version.
All commands take the form of:
octo <command> [<options>]
You can see a list of commands using:
And you can get help for a specific command using:
octo help <command> octo <command> --help
Arguments are not case sensitive and can take the following forms:
--project OctoFX # Space between argument name and value --project=OctoFX # Equal sign between argument name and value --project "OctoFX Web Site" # Argument values with spaces need to be quoted "--project=OctoFX Web Site" # If using equals, quote both the name and value, not just the value
All commands require you to pass the URL of the Octopus Server's API endpoint, and an API key which is used to authenticate you.
octo ... --server http://your-octopus-server/ --apiKey API-ABCDEF123456
Most commands also support JSON formatted output.
Creating API keys
Learn about how to create an API key.
Octo.exe is built and maintained by the Octopus Deploy team, but it is also open source. You can view the Octopus Clients project on GitHub.
The server url, api key, username and password can be set as the environment variables
OCTOPUS_CLI_PASSWORD respectively. Values set via command line arguments take precedence over environment variables.