CLI for Harmonix Discord framework
npm install @harmonixjs/clinpx to run the CLI without installing it globally:
bash
npx @harmonixjs/cli
`
Or install globally:
`bash
npm install -g @harmonixjs/cli
`
Usage
$3
Creates a new Harmonix bot project with the recommended structure:
`bash
npx @harmonixjs/cli init
`
This will generate:
- Project folder with src directorie
- Base configuration files
- Initial bot setup
---
$3
Generates commands, events, or components using predefined templates:
`bash
npx @harmonixjs/cli create
`
This will generate the respective file in the appropriate folder with boilerplate code ready to use.
Project Structure
After initializing, your project will look like this:
`pgsql
project/
├─ node_modules/
├─ src/
│ ├─ commands/
│ ├─ events/
│ ├─ components/
│ └─ index.ts
├─ .env
├─ package-lock.json
├─ package.json
└─ tsconfig.json
`
- src/ - your TypeScript source code
- src/index.ts - basic index.ts file
- .env` - default environment configuration