ws1cli

module
v0.0.0-...-2aee076 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: GPL-3.0

README

ws1cli

A command-line interface for Workspace ONE UEM (Omnissa).

Commands are generated directly from the official WS1 UEM OpenAPI spec, so the CLI stays in sync with the API surface.

Installation

go install github.com/ancalabrese/ws1cli/cmd/ws1@latest

Or build from source:

make build        # outputs bin/ws1
make install      # installs to $GOPATH/bin

Setup

1. Set your server:

ws1 config --server as1831.awmdm.com --version 2506

2. Authenticate with OAuth2 client credentials:

ws1 login --client-id <client-id> --secret <client-secret>

By default the auth region is na. Use --region to pick another (na, emea, apac, uat).

Tokens are refreshed automatically before expiry.

3. Verify config:

ws1 config

Configuration is stored at ~/.config/ws1/config.json.

Usage

ws1 <group> <subgroup> <operation> [flags]

Commands are organised by API group:

Group Description
mam Mobile Application Management
mcm Mobile Content Management
mdm Mobile Device Management

All commands output pretty-printed JSON.

Example
ws1 mam apps list
ws1 mdm get-devices-search --platform Android
Global flags
Flag Env var Description
--server WS1_SERVER Server hostname override
--token WS1_TOKEN Bearer token override (disables auto-refresh)
--tenant WS1_TENANT aw-tenant-code header override

Development

Regenerate everything from spec:

make gen          # gen-client + gen-cli
make gen-client   # API client (ws1/client.gen.go) via oapi-codegen
make gen-cli      # Cobra commands (internal/cli/gen/) via cmd/gen_cli

Validate the spec:

make validate

Directories

Path Synopsis
cmd
gen_cli command
Code generator: reads spec.json and emits Cobra CLI files under cmd/.
Code generator: reads spec.json and emits Cobra CLI files under cmd/.
ws1 command
internal
cli
Package ws1 provides primitives to interact with the openapi HTTP API.
Package ws1 provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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