Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

outscale/gli

GLI, An Experimental CLI for Outscale, written in Go

Project Stage


🌐 Links


πŸ“„ Table of Contents


🧭 Overview

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.


βœ… Requirements

  • Access to the OUTSCALE API (with appropriate credentials)

βš™ Installation

Download the latest binary from the Releases page.

Autocompletion configuration

Bash

gli completion bash > gli-completion.bash
sudo cp gli-completion.bash /etc/bash_completion.d/
source ~/.bashrc

Zsh

gli completion zsh > _gli
sudo mkdir -p /usr/local/share/zsh/site-functions
sudo cp _gli /usr/local/share/zsh/site-functions/
source ~/.zshrc

Fish

gli completion fish > gli.fish
sudo cp gli.fish /usr/share/fish/completions/
source ~/.config/fish/config.fish

πŸ›  Configuration

The tool expects either environment variables or a configuration file.

Environment variables

The tool will try to read the following environment variables:

  • OSC_ACCESS_KEY
  • OSC_SECRET_KEY
  • OSC_REGION

Profile file

If no environment variables are defined, the tool will read ~/.osc/config.json and look for the default profile.

Example

{
 "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.


πŸš€ Usage

gli <command> <api call>

Commands

Command Description
oapi Call OAPI
update Update to the latest version
version Display version

Options

Option Description
-v, --verbose Dump HTTP request and response
-h, --help Help about a command
--jq jq-like output filter

πŸ’‘ Examples

Querying oapi

List all VMs in the running state:

gli oapi ReadVms --Filters.VmStateNames running

The flag syntax is:

  • list of values are comma-separated: --Filters.VmStateNames running,stopped
  • boolean flags can be set to false by setting: --TmpEnabled=false

Multiple values

Lists of embedded objects (e.g. Nics or BlockDeviceMappings in CreateVms) can be configured using indexes: --BlockDeviceMappings.0.Bsu.VolumeType.

Chaining

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 7

Using jq filters

gli oapi ReadVms --Filters.VmStateNames running --jq ".Vms[].VmId"

Self updating

gli update

This requires write access to the binary. If gli update does not work, you will need to download the binary from the latest release.


πŸ“œ License

GLI is released under the BSD 3-Clause license.

Β© 2026 Outscale SAS

See LICENSE for full details.


🀝 Contributing

We welcome contributions!

Please read our Contributing Guidelines and Code of Conduct before submitting a pull request.

About

Experimental CLI for Outscale

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors 2

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /