titan-cli

module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2026 License: MPL-2.0

README

openvicloud — the OpenViCloud CLI

Manage the resources of your OpenViCloud tenant from a terminal: sign in on the web, create and control VMs, open an SSH session to a VM that has no public address.

Install

Download the binary for your machine from the latest release (openvicloud-<linux|darwin|windows>-<amd64|arm64>), check it, and put it on your PATH:

curl -fsSLO https://github.com/OpenViCloud/titan-cli/releases/latest/download/openvicloud-linux-amd64
curl -fsSLO https://github.com/OpenViCloud/titan-cli/releases/latest/download/SHA256SUMS
sha256sum --ignore-missing -c SHA256SUMS      # macOS: shasum -a 256 --ignore-missing -c SHA256SUMS
chmod +x openvicloud-linux-amd64 && mv openvicloud-linux-amd64 ~/.local/bin/openvicloud

SHA256SUMS is signed by the OpenViCloud release key (BB74 B8EC F2BA A232 1296 E3BA 6200 9A5A 7C77 9F46, openvicloud-release.asc):

curl -fsSLO https://github.com/OpenViCloud/titan-cli/releases/latest/download/SHA256SUMS.sig
gpg --import openvicloud-release.asc
gpg --verify SHA256SUMS.sig SHA256SUMS

Or build it with Go 1.25 or newer:

go install github.com/OpenViCloud/titan-cli/cmd/openvicloud@latest

go install works under this path from the first release after v0.1.0; v0.1.0 still declares the repository's old module path, so take that version's binary from the release instead.

Sign in

openvicloud auth login     # prints a link and a code, finish on the web
openvicloud auth status

For CI jobs and scripts, create an API token on the portal (API tokens page) and set it as OPENVICLOUD_TOKEN; no browser login is needed then.

Commands

Area Commands
Account auth login · auth logout · auth status · tenant get · version
Catalog cluster list · template list [--cluster] · size list
VMs vm list · vm get · vm create · vm rename · vm start · vm stop · vm delete · vm ssh
SSH keys ssh-key add · ssh-key list · ssh-key delete

create, start, stop and delete take --wait to return only once the request is done. Every command takes -o json. Names or ids are accepted wherever a VM, network, template, size or SSH key is chosen.

The CLI targets the OpenViCloud API at https://api.openvicloud.com; OPENVICLOUD_API_URL, OPENVICLOUD_AUTH_URL and OPENVICLOUD_PORTAL_URL point it elsewhere.

Development

go vet ./...
go test ./...
go build -o openvicloud ./cmd/openvicloud

api/client.gen.go is generated from api/openapi-v1.json, a copy of the public API contract kept in OpenViCloud/titan-control-plane; api/SOURCE names the control-plane commit it was copied from. To take a newer contract:

scripts/sync-spec.sh <control-plane commit, tag or branch>

CI fails when the committed client does not match the committed spec. A tag vX.Y.Z publishes a release (.github/workflows/release.yml, .goreleaser.yaml) once a maintainer approves the release environment. The design rules of the CLI live in titan-ops (private): titan-ops features/cli/design.md.

License

MPL-2.0

Directories

Path Synopsis
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.
cmd
openvicloud command
openvicloud is the command-line client of OpenViCloud.
openvicloud is the command-line client of OpenViCloud.
Package command holds the root command and what every subcommand shares (Deps).
Package command holds the root command and what every subcommand shares (Deps).
auth
Package auth is `openvicloud auth login|logout|status`.
Package auth is `openvicloud auth login|logout|status`.
catalog
Package catalog is what a customer chooses from when creating a VM: `cluster list`, `template list`, `size list`.
Package catalog is what a customer chooses from when creating a VM: `cluster list`, `template list`, `size list`.
sshkey
Package sshkey is `openvicloud ssh-key`: the public keys of the tenant, picked when a VM is created (titan-ops features/vm/design.md#ssh-key).
Package sshkey is `openvicloud ssh-key`: the public keys of the tenant, picked when a VM is created (titan-ops features/vm/design.md#ssh-key).
tenant
Package tenant is `openvicloud tenant get`.
Package tenant is `openvicloud tenant get`.
vm
Package vm is `openvicloud vm`: the VM lifecycle (lifecycle.go), and `vm ssh` with the tunnel it runs as ssh's ProxyCommand.
Package vm is `openvicloud vm`: the VM lifecycle (lifecycle.go), and `vm ssh` with the tunnel it runs as ssh's ProxyCommand.
Package output prints results for people (a table) or for scripts (-o json), and turns the API's error codes into sentences.
Package output prints results for people (a table) or for scripts (-o json), and turns the API's error codes into sentences.
Package session signs the customer in on the web (OAuth 2.0 Device Authorization Grant against Keycloak), keeps the tokens on disk, refreshes them and revokes them on logout.
Package session signs the customer in on the web (OAuth 2.0 Device Authorization Grant against Keycloak), keeps the tokens on disk, refreshes them and revokes them on logout.
Package wait polls until something the API reports is done, with a clock the caller passes in so tests never wait for real.
Package wait polls until something the API reports is done, with a clock the caller passes in so tests never wait for real.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL