Aller au contenu principal

CLI

Installation​

Global​

npm install -g nodecg

In project​

npm install -D nodecg

Commands​

nodecg setup [version]​

mkdir nodecg
cd nodecg
nodecg setup

Options​

NameDescription
versionThe semver version to install. If none then latest will be installed
--update -uInstall over an existing copy of NodeCG
--skip-dependencies -kSkip installing dependencies

nodecg start​

Start the NodeCG instance in this directory path.

Options​

NameDescription
--disable-source-maps -dDisable source map support

nodecg install [repo]​

Install a bundle by cloning a git repo and installing its production dependencies. If run in a bundle directory with no arguments, installs that bundle's dependencies.

nodecg install username/repository

Options​

NameDescription
repoA GitHub owner/repo pair or https git url
--dev -dInstall the bundle's devDependencies

nodecg uninstall [bundle]​

Uninstalls a bundle.

Options​

NameDescription
bundleThe bundle's name
--force -fIgnores warnings

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)

Options​

NameDefaultDescription
dirschemasThe directory where the replicant schemas are located
--out-dir [path] -osrc/types/schemasWhere to put the generated d.ts files
--no-config-schemaDon't generate a typedef from configschema.json