npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@overwolf/ow-cli

v0.1.2

Published

The Overwolf CLI is a tool to help you manage your Overwolf Applications. It's currently in early development, and we'll be adding more and more features over time.

Downloads

2,710

Readme

Overwolf CLI

Description

The Overwolf CLI is a tool to help you manage your Overwolf Applications. It's currently in early development, and we'll be adding more and more features over time.

Installation

$ npm i -g @overwolf/ow-cli

Usage

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

Terminal

The CLI is comprised of commands divided into categories, or commands and sub-commands, if you will.

Here's a list of the commands currently available:

  • config: Configures the CLI. You will be prompted to enter your email (that you use to login to the Dev Console) and your API key (see below). Deprecates the dev config command.
  • opk pack: Packs a folder into an OPK file.
  • opk sign: Signs an OPK. The app this OPK belongs to has to 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 belongs to has to 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 will return the version's ID. You can 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 to whom an app version is available. 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 with 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.
  • electron upload: Uploads an electron setup file to the Dev Console. The setup file must be valid, you must prvide the app id this setup file belongs to, and you must have permissions for it. You can also upload to a test channel. When the command finishes successfully, it will return the version's ID. You can use the wait flag (-w, --wait) to make the CLI exit only after the setup file's processing is complete and it's ready to be released.

You can always run the "help" command, ow help, for a list of all available commands.

Also, if you're using a linux-based terminal (e.g git bash), you could use autocomplete with <tab><tab>. You might have to restart your terminal for the autocomplete to take effect.

From a Node.JS Script

If you install @overwolf/ow-cli as a dependency in your node.js app. At your application's entry point, make sure you have the following lines:

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' as well. To get a command, use the 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 side navigation, go to Settings => Profile, and there you'll see an option to revoke and regenerate your API key.

Pay attention! Revoking your API key means that the previous key will stop working immediately. Similar to a password, we could never recover your API key for you. With great power, comes great responsibility.

Credentials

Some actions in the CLI (signing and uploading, for now) 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:

  • The config command. As mentioned above, running ow config (instead of the deprecated ow dev config) will prompt you for your email and API key and store them 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

Here are some 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 (see the opk pack command) you can use the opk upload and opk release commands to start rolling it out to your users. It should look something like this:

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

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. For your convenience, you can also specify which version to release using your application ID and the version number. See opk release --help for more details.

Releasing an electron setup file from a pipeline

You can use the CLI to release an electron setup file. When you have a valid electron setup file, you can use the electron upload and versions release commands to start rolling it out to your users. It should look something like this:

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

The electron 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 versions release command. The -p 25 argument in the versions release command specifies the percentage of users who will receive the new version. These commands also work with test channels. For your convenience, you can also specify which version to release using your application ID and the version number. See versions release --help for more details.

Test Channel IDs

Several commands work with test channels. While we plan to accept the channel's name, for now, we expect to receive 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. You can use the versions promote-to-prod command to promote the version to production - it will create it as a draft. It should look something like this:

$ ow versions promote-to-prod -aid aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa -sc my-test-channel -v 1.2.3 

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