Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Chore] Update readme, fix flags #8

Merged
merged 2 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 141 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,64 @@
# @hyperplay/cli
# HyperPlay CLI

## Install
HyperPlay command line interface.

```
<!-- toc -->
* [HyperPlay CLI](#hyperplay-cli)
* [Install](#install)
* [Usage](#usage)
* [Flags & Environment Variables](#flags_and_env)
* [YML](#yml)
* [Commands](#commands)
<!-- tocstop -->

# Install

<!-- install -->
```sh-session
$ npm install -g @hyperplay/cli
$ @hyperplay/cli
# OR
$ npx @hyperplay/cli
```
<!-- installstop -->

# Usage

<!-- usage -->
```sh-session
$ hyperplay COMMAND
running command...
$ hyperplay --version
@hyperplay/cli/2.9.1 darwin-arm64 node-v16.13.0
$ hyperplay --help [COMMAND]
USAGE
$ hyperplay COMMAND
...
```

## Usage
## Flags & Environment Variables
```bash
$ hyperplay publish [ACCOUNT] [PROJECT] [RELEASE] [--meta-tx] [--network <value>] [--private-key <value>] [--web <value>]
[--darwin_amd64 <value>] [--darwin_arm64 <value>] [--windows_amd64 <value>] [--skip_hyperplay_publish] [--channel <value>]
```

Flags can also be specified with environment variables:
```bash
HYPERPLAY_PRIVATE_KEY=0x123
HYPERPLAY_NETWORK=polygon
HYPERPLAY_WEB_BUILD=./web
HYPERPLAY_DARWIN_AMD64_BUILD=./darwin/amd64
HYPERPLAY_DARWIN_ARM64_BUILD=./darwin/arm64
HYPERPLAY_WINDOWS_ARM64_BUILD=./windows/arm64
HYPERPLAY_WINDOWS_AMD64_BUILD=./windows/amd64
HYPERPLAY_LINUX_AMD64_BUILD=./linux/amd64
HYPERPLAY_LINUX_ARM64_BUILD=./linux/arm64
HYPERPLAY_ANDROID_AMD64_BUILD=./android/amd64
HYPERPLAY_SKIP_HYPERPLAY_PUBLISH=false
HYPERPLAY_TARGET_CHANNEL=beta
```

## YML
Create a `hyperplay.yml` in your project folder.

```yml
Expand All @@ -30,8 +78,94 @@ Run the publish command from the hyperplay cli. Set the publisher private key vi
```bash
HYPERPLAY_PRIVATE_KEY=0x1234 hyperplay publish
```
<!-- usagestop -->

or
```bash
HYPERPLAY_PRIVATE_KEY=0x1234 npx @hyperplay/cli publish
# Commands
<!-- commands -->
* [`hyperplay help [COMMAND]`](#hyperplay-help-command)
* [`hyperplay import`](#hyperplay-import)
* [`hyperplay keygen`](#hyperplay-keygen)
* [`hyperplay publish [PACKAGE] [PATH]`](#hyperplay-publish-package-path)

## `hyperplay help [COMMAND]`

Display help for hyperplay.

```
USAGE
$ hyperplay help [COMMAND] [-n]

ARGUMENTS
COMMAND Command to show help for.

FLAGS
-n, --nested-commands Include all nested commands in the output.

DESCRIPTION
Display help for hyperplay.
```

## `hyperplay import`

Import an account

```
USAGE
$ hyperplay import

DESCRIPTION
Import an account

EXAMPLES
$ hyperplay import
```

## `hyperplay keygen`

Generate a new account

```
USAGE
$ hyperplay keygen

DESCRIPTION
Generate a new account

EXAMPLES
$ hyperplay keygen
```

## `hyperplay publish [PACKAGE] [PATH]`

Publish a release

```
USAGE
$ hyperplay publish [ACCOUNT] [PROJECT] [RELEASE] [--meta-tx] [--network <value>] [--private-key <value>] [--web <value>]
[--darwin_amd64 <value>] [--darwin_arm64 <value>] [--windows_amd64 <value>] [--skip_hyperplay_publish] [--channel <value>]

ARGUMENTS
ACCOUNT account name
PROJECT project name
RELEASE release name

FLAGS
--channel=<value> [default: main] Publish build to this release channel on HyperPlay.
--darwin_amd64=<value> Path to darwin amd64 build
--darwin_arm64=<value> Path to darwin arm64 build
--[no-]meta-tx Enable meta transactions
--network=<value> [default: https://rpc.valist.io] Blockchain network
--private-key=<value> Account private key
--[no-]skip_hyperplay_publish Do not publish to HyperPlay. Only Valist.
--web=<value> Path to web build
--windows_amd64=<value> Path to windows amd64 build

DESCRIPTION
Publish a release

EXAMPLES
$ hyperplay publish ipfs/go-ipfs/v0.12.3 README.md

$ hyperplay publish ipfs/go-ipfs/v0.12.3 dist/
```
<!-- commandsstop -->
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hyperplay/cli",
"version": "2.9.1",
"version": "2.9.2",
"description": "Hyperplay CLI",
"author": "HyperPlay Labs, Inc.",
"bin": {
Expand Down
4 changes: 2 additions & 2 deletions src/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const darwin_arm64 = Flags.string({

export const windows_arm64 = Flags.string({
description: 'Path to windows arm64 build',
env: 'HYPERPLAY_WINDOWS_AMD64_BUILD',
env: 'HYPERPLAY_WINDOWS_ARM64_BUILD',
default: ''
});

Expand All @@ -68,7 +68,7 @@ export const linux_amd64 = Flags.string({

export const linux_arm64 = Flags.string({
description: 'Path to linux amd64 build',
env: 'HYPERPLAY_LINUX_AMD64_BUILD',
env: 'HYPERPLAY_LINUX_ARM64_BUILD',
default: ''
});

Expand Down
Loading