- Documentation: https://docs.outscale.com/en/
- Project website: https://github.com/outscale/gli
- Join our community on Discord
GLI 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 OAPI, but other Outscale APIs are planned.
- Access to the OUTSCALE API (with appropriate credentials)
Download the latest binary from the Releases page.
gli completion bash > gli-completion.bash
sudo cp gli-completion.bash /etc/bash_completion.d/
source ~/.bashrcgli completion zsh > _gli
sudo mkdir -p /usr/local/share/zsh/site-functions
sudo cp _gli /usr/local/share/zsh/site-functions/
source ~/.zshrcgli completion fish > gli.fish
sudo cp gli.fish /usr/share/fish/completions/
source ~/.config/fish/config.fishThe tool expects either environment variables or a configuration 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 will read ~/.osc/config.json and look for the default profile.
{
"default": {
"access_key": "MyAccessKey",
"secret_key": "MySecretKey",
"region": "eu-west-2"
}
}Use OSC_CONFIG_FILE to define an alternate config file and OSC_PROFILE an alternate profile.
gli <command> <api call>| Command | Description |
|---|---|
oapi |
Call OAPI |
update |
Update to the latest version |
version |
Display version |
| Option | Description |
|---|---|
-v, --verbose |
Dump HTTP request and response |
-h, --help |
Help about a command |
--jq |
jq-like output filter |
List all VMs in the running state:
gli oapi 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. Nics or BlockDeviceMappings in CreateVms) can be configured using indexes: --BlockDeviceMappings.0.Bsu.VolumeType.
Commands may be chained, and attributes returned by a command can be reinjected in a subsequent command, using Go template syntax:
gli oapi CreateNic --SubnetId subnet-foo | gli oapi LinkNic -v --NicId {{.Nic.NicId}} --VmId i-foo --DeviceNumber 7echo '{"SubnetId":"subnet-foo"}' | gli oapi CreateNicgli oapi ReadVms --Filters.VmStateNames running --jq ".Vms[].VmId"gli updateThis requires write access to the binary. If
gli updatedoes not work, you will need to download the binary from the latest release.
GLI 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.