- Documentation: https://docs.outscale.com/en/
- Project website: https://github.com/outscale/octl
- Join our community on Discord
octl is an experimental CLI for the Outscale APIs, written in Go.
It supports:
- installation via a single static binary,
- direct flags to all request fields, without JSON,
- autocompletion support for all API calls, flags, and flag values,
- jq-style output filters,
- syntax highlighting of output,
- auto-update to latest version.
It currenty only supports iaas api, but other Outscale APIs are planned.
- Access to the OUTSCALE API (with appropriate credentials)
Download the latest binary from the Releases page.
octl completion bash > octl-completion.bash
sudo cp octl-completion.bash /etc/bash_completion.d/
source ~/.bashrcoctl completion zsh > _octl
sudo mkdir -p /usr/local/share/zsh/site-functions
sudo cp _octl /usr/local/share/zsh/site-functions/
source ~/.zshrcoctl completion fish > octl.fish
sudo cp octl.fish /usr/share/fish/completions/
source ~/.config/fish/config.fishThe tool expects either environment variables or a profile file.
The tool will try to read the following environment variables:
OSC_ACCESS_KEYOSC_SECRET_KEYOSC_REGION
If no environment variables are defined, the tool expects to find a profile in a profile file.
The default profile file path is ~/.osc/config.json and can be set with the --config flag or the OSC_CONFIG_FILE environment variable.
The default profile name path is default and can be set with the --profile flag or the OSC_PROFILE environment variable.
If --config or --profile is set, octl will load the profile file, without checking environment,
Profile file example:
{
"default": {
"access_key": "MyAccessKey",
"secret_key": "MySecretKey",
"region": "eu-west-2"
}
}octl profile allows you to manage the content of the profile file.
octl <command> <command>| Command | Description |
|---|---|
iaas |
Core IaaS API |
profile |
Profile management |
update |
Update to the latest version |
completion |
Generate completion shell script |
| Option | Default | Allowed values | Description |
|---|---|---|---|
--version |
Display octl version | ||
-v, --verbose |
Dump HTTP request and response | ||
-h, --help |
Help about a command | ||
--jq |
jq-like output filter | ||
--template |
JSON template for query body | ||
--config |
~/.osc/config.json |
config file path | |
--profile |
default |
profile name | |
--output |
raw, json, yaml, table |
output format | |
--columns |
columns to display in a table |
rawis the raw JSON format, as returned by the API.jsondisplays the content in JSON format, without response context,yamldisplays the content in YAML format, without response context,tabledisplays the content in a text table, based on columns defined by the--columnsflag.
High level commands are available:
octl iaas <entity> listlists all entities using thetableformat:
octl iaas volume list
ββββββββββββββββ¬βββββββββββ¬ββββββββββββ¬ββββββββββββββββ¬βββββββ¬βββββββ
β ID β Type β State β SubregionName β Size β Iops β
ββββββββββββββββΌβββββββββββΌββββββββββββΌββββββββββββββββΌβββββββΌβββββββ€
β vol-foo β io1 β in-use β eu-west-2a β 300 β 5000 β
β vol-bar β standard β in-use β eu-west-2a β 20 β 0 β
β vol-baz β gp2 β available β eu-west-2a β 4 β 100 β
ββββββββββββββββ΄βββββββββββ΄ββββββββββββ΄ββββββββββββββββ΄βββββββ΄βββββββoctl iaas <entity> describe <id>displays an entity using theyamlformat:
octl iaas volume describe vol-foo
CreationDate: '2024-12-17T11:07:58.757Z'
Iops: 5000
LinkedVolumes:
- DeviceName: /dev/sda1
State: attached
VmId: i-foo
VolumeId: vol-foo
Size: 300
SnapshotId: snap-foo
State: in-use
SubregionName: eu-west-2a
Tags: []
VolumeId: vol-foo
VolumeType: io1Columns can be replaced:
octl iaas vm list --columns "ID:VmId|DNS:PrivateDnsName"
ββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββ
β ID β DNS β
ββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββ€
β i-foo β ip-10-1-112-23.eu-west-2.compute.internal β
β i-bar β ip-10-9-35-211.eu-west-2.compute.internal β
β i-baz β ip-10-0-4-143.eu-west-2.compute.internal β
ββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββββββColumns can be added to the standard columns:
octl iaas vm list --columns +DNS:PrivateDnsNameColumn content is defined with the expr language. To display a tag value:
octl iaas vm list --columns "+tag:find(Tags, #?.Key == \"Name\")?.Value"The API can be directly called, with a raw output:
octl iaas api ReadVms --Filters.VmStateNames runningThe flag syntax is:
- list of values are comma-separated:
--Filters.VmStateNames running,stopped, - boolean flags can be set to false by setting:
--TmpEnabled=false, - lists of embedded objects (e.g.
NicsorBlockDeviceMappingsinCreateVms) can be configured using indexes:--BlockDeviceMappings.0.Bsu.VolumeType, - time flag values can be set:
- using the RFC3339 format (e.g.
2026-02-10T14:52:30Z), - as a duration offset with a
+or-prefix (e.g.+10m,-1h), - as a day/month/year offset with a
+or-prefix (e.g.+1mo,-1y).
- using the RFC3339 format (e.g.
Commands may be chained, and attributes returned by a command can be reinjected in a subsequent command, using Go template syntax:
octl iaas api CreateNic --SubnetId subnet-foo | octl iaas api LinkNic -v --NicId {{.Nic.NicId}} --VmId i-foo --DeviceNumber 7echo '{"SubnetId":"subnet-foo"}' | octl iaas api CreateNicA JSON document can be used as a template, with additional config using flags.
Either from stdin:
echo '{"NetId":"vpc-foo"}' | octl iaas api CreateSubnet --IpRange 10.0.1.0/24Or from a file:
octl iaas api CreateSubnet --IpRange 10.0.1.0/24 --template subnet.jsonoctl iaas api ReadVms --Filters.VmStateNames running --jq ".Vms[].VmId"Note:
--jqis not currently compatible with--output
octl profile allows you to manage your profile file.
octl profile listlists all profile within the profile file,octl profile addadds a profile to the profile file,octl profile deleteremoves a profile from the profile file,octl profile usemarks a profile as the default profile, that will be used in futureoctlcommands.
Note: Environment variables take precedence. A profile marked as the default will not be used if relevant environment variables are set.
octl updateThis requires write access to the binary. If
octl updatedoes not work, you will need to download the binary from the latest release.
octl is released under the BSD 3-Clause license.
Β© 2026 Outscale SAS
See LICENSE for full details.
We welcome contributions!
Please read our Contributing Guidelines and Code of Conduct before submitting a pull request.