⚡ Create Robo
The create-robo
interactive CLI is your go-to for kickstarting fresh Robo.js projects and plugins! It's a nifty standalone tool that won't bloat your project, and it'll hold your hand through the setup process like a pro.
New Robo
Ready to create a project named "my-awesome-robo"? Here's how:
npx create-robo my-awesome-robo
Yarn users will need to config your nodeLinker by setting the YARN_NODE_LINKER
variable to node-modules
.
macOS & Linux:
YARN_NODE_LINKER=node-modules yarn create robo DeepThought -ts
Windows Command Prompt:
set YARN_NODE_LINKER=node-modules && yarn create robo DeepThought -ts
Windows Powershell:
$env:YARN_NODE_LINKER="node-modules"; yarn create robo DeepThought -ts
When using Windows you may encounter a npm error like so
npx : File C:\Program Files\nodejs\npx.ps1 cannot be loaded because running scripts is disabled on this system.
if you receive this error visit Microsoft for a description and to see a quick solution Visit Here
Once you're in, the CLI will walk you through three easy-peasy steps:
- TypeScript or nah? (yes/no)
- Choose your features! (ESLint, Prettier, Plugins - mix and match, or skip 'em all!)
- Pop in your Discord token and client id. Wanna skip it? Just press enter, but remember to edit your
.env
file later.
New Plugin
Got your eyes on crafting a plugin? Run the CLI with the --plugin
option:
npx create-robo my-awesome-plugin --plugin
This will guide you through two simple steps:
- TypeScript or nah? (yes/no)
- Choose your features! (ESLint, Prettier)
Options
Feeling adventurous? This CLI's got options for ya:
-f
,--features <features>
comma-separated list of features to include--js
,--javascript
create a Robo using JavaScript-k
,--kit
choose a kit to start off with your Robo-ni
,--no-install
skips the installation of dependencies-nu
,--no-update
skips the update check-P
,--plugin
lets you craft a plugin project instead of a full-fledged Robo-p
,--plugins <plugins>
installs plugins from the start (e.g.,@robojs/ai
)-rv
,--robo-version <version>
specify a Robo.js version to use-t
,--template <template>
create a Robo from an online template--ts
,--typescript
create a Robo using TypeScript-v
,--verbose
print more information for debugging
Kits
Kits are pre-defined features and templates that you can use to start off your Robo. Here are some of the available kits:
activity
- Create a Discord Activitybot
- Create a Discord Botweb
- Create a Webapp