From 817e25d0a3833d0f4b5bbae1680b03fa66f5d9c3 Mon Sep 17 00:00:00 2001 From: Keiichiro Amemiya Date: Fri, 27 Dec 2024 12:49:56 +0100 Subject: [PATCH] docs: update README (#126) --- README.md | 53 +++++++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index d97de93..b490c37 100644 --- a/README.md +++ b/README.md @@ -2,25 +2,32 @@ [NodeCG](https://github.com/nodecg/nodecg)'s command line interface. -![CI](https://github.com/nodecg/nodecg-cli/workflows/CI/badge.svg?branch=master) -[![Coverage Status](https://coveralls.io/repos/github/nodecg/nodecg-cli/badge.svg?branch=master)](https://coveralls.io/github/nodecg/nodecg-cli?branch=master) +[![CI](https://github.com/nodecg/nodecg-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/nodecg/nodecg-cli/actions/workflows/ci.yml) -> ❗ WARNING: As of NodeCG v2, `nodecg-cli` versions earlier than v8.6.1 are no longer supported and *will fail* to install NodeCG v2 or greater. Please upgrade your installation of `nodecg-cli` by running `npm install -g nodecg-cli@latest`. +## Compatibility + +- `nodecg-cli` version earlier than 8.6.1 is not compatible with NodeCG 2.x.x. +- `nodecg-cli` version 9.0.0 and later are not compatible with NodeCG 0.x.x and 1.x.x. + +| NodeCG | nodecg-cli | +| ------ | ---------- | +| 0.x.x | < 9.0.0 | +| 1.x.x | < 9.0.0 | +| 2.x.x | >= 8.6.1 | ## Installation + First, make sure you have [git](http://git-scm.com/) installed, and that it is in your PATH. -Then, install [bower](http://bower.io/), which may be used to install bundles' dependencies: -```sh -npm install -g bower -``` Once those are installed, you may install nodecg-cli via npm: + ```sh npm install -g nodecg-cli -```` +``` -Installing `nodecg-cli` does not install `NodeCG`. +Installing `nodecg-cli` does not install `NodeCG`. To install an instance of `NodeCG`, use the `setup` command in an empty directory: + ```sh mkdir nodecg cd nodecg @@ -28,18 +35,16 @@ nodecg setup ``` ## Usage -* `nodecg setup [version] [--update]`, install a new instance of NodeCG. `version` is a semver range. -If `version` is not supplied, the latest release will be installed. -Enable `--update` flag to install over an existing copy of NodeCG. -* `nodecg start`, start the NodeCG instance in this directory path -* `nodecg install [repo] [--dev]`, install a bundle by cloning a git repo. -Can be a GitHub owner/repo pair (`supportclass/lfg-sublistener`) or https git url (`https://github.com/SupportClass/lfg-sublistener.git`). -If run in a bundle directory with no arguments, installs that bundle's dependencies. -Enable `--dev` flag to install the bundle's `devDependencies`. -* `nodecg uninstall `, uninstall a bundle -* `nodecg defaultconfig`, If a bundle has a `configschema.json` present in its root, this command will create a default -config file at `nodecg/cfg/:bundleName.json` with defaults based on that schema. -* `nodecg schema-types [dir]`, Generate d.ts TypeScript typedef files from Replicant schemas and configschema.json (if present) - -## Special Thanks -This CLI program is based on [Tim Santeford's commander.js starter](https://github.com/tsantef/commander-starter). + +- `nodecg setup [version] [--update]`, install a new instance of NodeCG. `version` is a semver range. + If `version` is not supplied, the latest release will be installed. + Enable `--update` flag to install over an existing copy of NodeCG. +- `nodecg start`, start the NodeCG instance in this directory path +- `nodecg install [repo] [--dev]`, install a bundle by cloning a git repo. + Can be a GitHub owner/repo pair (`supportclass/lfg-sublistener`) or https git url (`https://github.com/SupportClass/lfg-sublistener.git`). + If run in a bundle directory with no arguments, installs that bundle's dependencies. + Enable `--dev` flag to install the bundle's `devDependencies`. +- `nodecg uninstall `, uninstall a bundle +- `nodecg defaultconfig`, If a bundle has a `configschema.json` present in its root, this command will create a default + config file at `nodecg/cfg/:bundleName.json` with defaults based on that schema. +- `nodecg schema-types [dir]`, Generate d.ts TypeScript typedef files from Replicant schemas and configschema.json (if present)