Skip to main content

Overwolf CLI

The Overwolf CLI is a tool to help you manage your Overwolf applications.

Installation

Install the Overwolf CLI using the following command:

npm i -g @overwolf/ow-cli

Usage

The Overwolf CLI can be used from a terminal or from a node.js script.

Terminal

Use the following commands from a terminal:

  • config—configures the CLI. You will be prompted to enter your email (your Dev Console login) and your API key. Deprecates the dev config command.
  • opk pack—packs a folder into an OPK file.
  • opk sign—signs an OPK. The app for this OPK must exist in the Dev Console and you must have permissions for it. Deprecates the dev sign-opk command.
  • opk upload—uploads an OPK file to the Dev Console. The OPK must be valid, the app this OPK must exist in the Dev Console, and you must have permissions for it. You can also upload to a test channel. When the command finishes successfully, it returns the version's ID. Use the wait flag (-w, --wait) to make the CLI exit only after the OPK's processing is complete and it's ready to be released.
  • opk release—increments the percentage of users who have availability to the app. The version must exist in the Dev Console, it must be in a draft state or rollout state, you must have permissions for it, and the percentage you specify must be greater than its current rollout percentage. You can also use this command in a test channel.
  • client calc-uid—calculates an app's UID using its name and author.
  • versions promote-to-prod—promotes a version from a test channel to the production channel. You must have the correct permissions for it.
  • versions halt: halts an in-progress rollout so no further users receive the version until it is resumed. Pass the version ID as the command's argument, or with -vid. Also works on versions in a test channel. For more information, see Release rollout percentage.
  • versions resume: resumes a previously halted rollout, continuing from its current phase. Pass the version ID as the command's argument, or with -vid. Also works on versions in a test channel. For more information, see Release rollout percentage.
  • versions discard: discards a version that has not started rolling out yet. Fails if the version has already begun releasing. Pass the version ID as the command's argument, or explicitly with -vid/--versionId. For example: ow versions discard 98765.
  • versions release-notes (alias rn): adds or updates a version's release notes. Pass the version ID as the command's argument, or explicitly with -vid/--versionId. See Setting release notes for a version for the available flags.

From the command line, run ow help for a list of all available commands.

If you're using a linux-based terminal (e.g git bash), use <tab><tab> to autocomplete the command. You may need to restart your terminal for the autocomplete to take effect.

From a Node.JS script

Install @overwolf/ow-cli as a dependency in your node.js app. Insert the following at your application's entry point:

import 'reflect-metadata';
import { OwCliContainer } from '@overwolf/ow-cli/bin';

OwCliContainer.init();

All of the available commands and their arguments can be found in @overwolf/ow-cli/bin. To get a command, use OwCliContainer:

const signOpkCmd = OwCliContainer.resolve(SignOpkCommand);

Then, call the command's handler method:

signOpkCmd.handler({ ... });

API key

You can obtain your API key from the Dev Console. In the left menu, press Settings => Profile, then revoke and regenerate your API key.

important

Revoking your API key means that the previous key will stop working immediately. There is no option to recover your API key.

Credentials

Some actions in the CLI may require you to provide credentials. Your credentials are the email you use to sign in to the Dev Console, and your API key.

There are 2 ways to provide your credentials:

  • ow config—running ow config (ow dev config is deprecated) will prompt you for your email and API key. They are then stored locally in your user's root folder.
  • Environment variables—whenever you run a command, you can specify OW_CLI_EMAIL and OW_CLI_API_KEY using your operating system's syntax. Using this method will not store the credentials on your machine.

Use cases

Common use cases for the CLI.

Releasing an OPK from a pipeline

You can use the CLI to release an OPK. When you have a valid and packed OPK file (opk pack) use the opk upload and opk release commands to start rolling it out to your users. For example:

$ ow opk upload ./path/to/your/version.opk -w | xargs ow opk release -p 25

Using the opk upload command with the -w flag, will upload your OPK to the Dev Console, wait for it to finish processing, and print out the version's ID. The | xargs command will take that version ID and pass it as an argument to the opk release command. The -p 25 argument in the opk release command specifies the percentage of users who will receive the new version. These commands also work with test channels. You can also specify which version to release using your application ID and the version number. See opk release --help for more details.

Test Channel IDs

Several commands work with test channels. Use the channel ID as the argument. You can find the channel's ID in the page URL of the channel in the Dev Console.

Promoting a version to production

You can use the CLI to promote a version to production from a given test channel. Use the versions promote-to-prod command to promote the version to production. This will create it as a draft. For example:

$ ow versions promote-to-prod -aid <appID> -sc my-test-channel -v 1.2.3
note

The -sc flag represents your test channel name. The -v flag represents your version number.

Setting release notes for a version

Use the versions release-notes command (alias rn) to set a version's release notes from your pipeline. Pass the version ID as the command's argument, or explicitly with -vid/--versionId.

FlagDescription
-rn, --releaseNotes <filePath>Sets the public release notes from the file's contents.
-in, --internalNotes <filePath>Sets the internal notes. Viewable only by your app's team and the Overwolf team.
-imp, --importantLabels the version as important.
-pub, --publishPublishes the public release notes. Omit this flag to save them as a draft.

For example:

$ ow versions release-notes 12345 -rn ./release-notes.md -imp -pub

This sets the public release notes for version 12345 from the contents of release-notes.md, marks the version as important, and publishes the notes immediately.

Discarding a version

Use the versions discard command to remove a version that has not started rolling out yet. For example:

$ ow versions discard 98765

Halting a rollout

Use the versions halt command to stop an in-progress rollout so no further users receive the version, until you resume it. For example:

$ ow versions halt 98765

Resuming a rollout

Use the versions resume command to continue a previously halted rollout from its current phase. For example:

$ ow versions resume 98765

For the NPM repository, see Overwolf CLI.