Create your first bundle
To actually use nodecg-io you need to create a bundle. Here's a step-by-step guide to create one.
Create your bundle using the nodecg-io CLI
Automatically generating a bundle that uses nodecg-io requires that you have the nodecg-io CLI installed. A guide on how to do this is inside the installation guide.
Also note that this currently only works when you have installed a release version, not development versions.
To start run this command while being inside your NodeCG installation:
This will ask you a couple details about your bundle like name, description and used services. Most questions have a reasonable default that you can choose if you don't care or are not sure about the asked thing.
After finishing the prompt the CLI will generate your bundle, install dependencies and, if you have chosen TypeScript, compile the generated code.
Start NodeCG and make sure that the bundle gets loaded successfully, and it is displayed in the nodecg-io dashboard with all service dependencies.
After that you should edit the
depending on your chosen language to do something useful. You can start by
Note: If you need to access another service inside the callback of a
onAvailable call you can use
otherService.getClient() to get the client or
undefined if it is not set.
A couple of steps you may want to do after generating a bundle:
- Create a git repository for you bundle (a
.gitignoreis automatically generated for you) and push it to a git platform of your choice
- Add an open source licence, don't forget it to
also add it to the
- Add code formatters and linting tools like prettier and ESLint
- Add a README that explains what your bundle does and how it can be used
If you share your work others might find it useful and get happy with it. We made nodecg-io for you, and the NodeCG people made NodeCG for you. Many people spent much time for you to create cool content that easy and if you shared your work others could create good content more easily as well.