Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit a5bbc2d

Browse files
authored
Merge pull request #56 from codeoverflow-org/install-guide-cli
Update install guide to use nodecg-io cli
2 parents 0c10bac + 05ec62c commit a5bbc2d

File tree

1 file changed

+41
-31
lines changed

1 file changed

+41
-31
lines changed

docs/getting_started/install.md

Lines changed: 41 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,26 @@
22

33
## Prerequisites
44

5-
In order to download necessary tools, clone the repository, and install dependencies via `npm` you need network access.
5+
In order to download necessary tools and to install nodecg-io using the cli you need network access.
6+
7+
### Required Applications
68

79
You'll need the following tools:
810

911
- [Git](https://git-scm.com)
1012
- [Node.JS](https://nodejs.org/en/) v12.0.0 or newer
1113
- [Npm](https://www.npmjs.com/get-npm) 7.0.0 or newer
12-
- [NodeCG](https://nodecg.dev/) 1.4.0 or newer
14+
- [NodeCG](https://nodecg.dev/) 1.4.0 or newer (1.7.0 or higher recommended)
15+
16+
### Native Build Tools
17+
18+
Some services depend on packages that require native build tools. You _ONLY_ need to install these if you want to use a service that depends on native modules or if you want to install a development version.
19+
20+
The services that require these include StreamDeck, Midi and Serial. Please note that this list might not be up to date.
1321

14-
You'll also need operating system dependant tools for native modules like StreamDeck and Midi:
22+
Here's how to install the native build tools on the most popular operating systems, if you need them:
1523

16-
### Windows
24+
#### Windows
1725

1826
For Windows, you'll need the Visual Studio Build Tools, if you have Visual Studio installed you should already have them.
1927
If you don't have Visual Studio just install the Visual Studio Build Tools by running the following command as an __Administrator__:
@@ -22,7 +30,7 @@ If you don't have Visual Studio just install the Visual Studio Build Tools by ru
2230
npm install -g windows-build-tools
2331
```
2432

25-
### Linux
33+
#### Linux
2634

2735
For Linux, you'll need a C++ compiler and some other packages. On Ubuntu/Debian based operating systems run the following command:
2836

@@ -32,55 +40,57 @@ sudo apt install build-essential libusb-1.0-0-dev libasound2-dev libudev-dev
3240

3341
For other linux distros you'll need the corresponding packages, just search on the internet how the packages are named for your specific distro.
3442

35-
### MacOS
43+
#### MacOS
3644

3745
For macOS, you'll need the Xcode command line tools. To install them run the following command:
3846

3947
```shell
4048
xcode-select --install
4149
```
4250

43-
## Clone this repository
51+
## Install the nodecg-io cli
52+
53+
Install the nodecg-io cli using the following command:
4454

4555
```shell
46-
git clone https://github.com/codeoverflow-org/nodecg-io.git
56+
npm install -g nodecg-io-cli
4757
```
4858

49-
_Note:_ You should clone nodecg-io to somewhere outside your nodecg bundles/ directory as this repo contains many bundles in subdirectories and nodecg doesn't support nesting of the bundles in other directories. You can clone it to any other path that you wish.
59+
_Note:_ If you are running on linux, you may need to use `sudo` if your npm installation uses a non-writeable path (default on Ubuntu apt packages, does usually not apply to installs using [nvm](https://github.com/nvm-sh/nvm))
5060

51-
## Install all the dependencies using `npm`
5261

53-
```shell
54-
cd path/to/nodecg-io
55-
npm install
56-
npm run bootstrap
57-
```
62+
## Install nodecg-io using the nodecg-io cli
5863

59-
## Build nodecg-io:
64+
With the nodecg-io cli installed you can run this command inside a nodecg installation to install nodecg-io:
6065

6166
```shell
62-
cd path/to/nodecg-io
63-
npm run build
67+
nodecg-io install
6468
```
6569

66-
## Add nodecg-io directory to the nodecg config
70+
You will get a prompt which asks you which version you want to install.
6771

68-
Modify the nodecg configuration in `path/to/nodecg/cfg/nodecg.json`, here is an example config:
72+
- By selecting a actual version (e.g. `0.1`) you create a production install that downloads the required packages from npm and setups a npm workspace to install all dependencies. Here you can choose which services you want to install.
6973

70-
```json
71-
{
72-
"bundles": {
73-
"paths": ["path/to/nodecg-io", "path/to/nodecg-io/samples"]
74-
}
75-
}
76-
```
74+
- By selecting `development` you create a development install that clones the nodecg-io git repo and builds everything from scratch. We only recommend a dev install if you are sure that you want to contribute to nodecg-io. Here you always must install all services.
7775

78-
_Note 1:_ This path should point to the root of this repository, not to a bundle inside this repo.
76+
For starters we recommend using the latest non-development version.
7977

80-
_Note 2:_ The second path to the samples is only required if you want to use a sample plugin.
78+
nodecg-io will always be installed into a `nodecg-io/` directory inside your nodecg installation so that your bundles and all bundles from nodecg-io are separated. The cli will add this path to the loaded bundles in your nodecg configuration automatically, you don't need to worry about it.
8179

82-
_Note 3:_ If nodecg doesn't load nodecg-io for some reason you might want to use an absolute path here.
80+
If you want to every change your nodecg-io installation to add/remove a service or change the version, you can always re-run `nodecg-io install`. If a nodecg-io installation is found its options will be preselected in the prompt. Re-running `nodecg-io install` will also update all packages to the latest patch version, if you have a production installation, and pull the repository and rebuild, if you have a development installation.
8381

8482
## Start nodecg
8583

86-
Now you can use nodecg-io in your own bundle. You can find example code in [./samples/](https://github.com/codeoverflow-org/nodecg-io/tree/master/samples/).
84+
When starting nodecg you should see that all nodecg-io related bundles should be loaded and that you can you can now access nodecg-io in your nodecg dashboard.
85+
86+
Now you can either install a already existing bundle that uses nodecg-io or [create a new bundle](./create_bundle.md).
87+
88+
## Uninstall nodecg-io
89+
90+
If you want uninstall nodecg-io you can run the following command:
91+
92+
```shell
93+
nodecg-io uninstall
94+
```
95+
96+
This will remove the `nodecg-io` directory inside your nodecg installation and also will remove it from the loaded bundle paths in your nodecg configuration.

0 commit comments

Comments
 (0)