@furlow/cli
v1.0.13
Published
Declarative Discord Bot Framework - Build bots with YAML, no code required
Maintainers
Readme
@furlow/cli
Command-line interface for the FURLOW declarative Discord bot framework.
Build powerful Discord bots using YAML specifications — no code required.
Installation
npm install -g @furlow/cliOr with your preferred package manager:
pnpm add -g @furlow/cli
yarn global add @furlow/cliQuick Start
# Create a new bot project
furlow init my-bot
cd my-bot
# Add your Discord credentials
cp .env.example .env
# Edit .env with your DISCORD_TOKEN and DISCORD_CLIENT_ID
# Start the bot
furlow startRequirements
- Node.js 20.0.0 or higher
- A Discord bot token (create one here)
- Discord Application Client ID
Commands
furlow init [name]
Create a new FURLOW bot project with starter templates.
furlow init my-bot
furlow init my-bot --template moderation
furlow init my-bot --no-git --no-installOptions:
| Flag | Description | Default |
|------|-------------|---------|
| -t, --template <template> | Project template (simple, moderation, full) | simple |
| --no-git | Skip git repository initialization | - |
| --no-install | Skip dependency installation | - |
furlow start [path]
Start the bot from a FURLOW specification file.
furlow start
furlow start ./bot.furlow.yaml
furlow start -g 123456789 # Register commands to specific guildOptions:
| Flag | Description | Default |
|------|-------------|---------|
| -e, --env <file> | Path to environment file | .env |
| -g, --guild <id> | Register commands to specific guild (instant updates) | - |
| --no-validate | Skip schema validation | - |
Environment Variables:
| Variable | Required | Description |
|----------|----------|-------------|
| DISCORD_TOKEN | Yes | Your Discord bot token |
| DISCORD_CLIENT_ID | Yes | Your Discord application ID |
| DISCORD_GUILD_ID | No | Default guild for command registration |
furlow dev [path]
Start the bot in development mode with hot reload. The bot automatically restarts when specification files change.
furlow dev
furlow dev ./bot.furlow.yamlOptions:
| Flag | Description | Default |
|------|-------------|---------|
| -e, --env <file> | Path to environment file | .env |
| --no-validate | Skip schema validation | - |
furlow validate <path>
Validate a FURLOW specification file against the schema.
furlow validate furlow.yaml
furlow validate ./bot.furlow.yaml --strictOptions:
| Flag | Description |
|------|-------------|
| --strict | Enable strict validation mode |
furlow add <builtin>
Add a builtin module to your project.
furlow add moderation
furlow add welcome
furlow add --list # Show available builtinsAvailable Builtins:
| Module | Description |
|--------|-------------|
| moderation | Warn, kick, ban, mute, case management |
| welcome | Join/leave messages, auto-role, DM welcome |
| logging | Message, member, server event logging |
| tickets | Support tickets, claiming, transcripts |
| reaction-roles | Role assignment via reactions/buttons |
| leveling | XP, levels, rewards, leaderboards |
| music | Voice playback, queue, filters |
| starboard | Star reactions, hall of fame |
| polls | Voting, multiple choice |
| giveaways | Requirements, reroll, winners |
| auto-responder | Custom triggers, responses |
| afk | AFK status, mention notifications |
| reminders | Personal reminders, DM delivery |
| utilities | Serverinfo, userinfo, avatar, etc. |
furlow build [path]
Bundle the bot for production deployment.
furlow build
furlow build -o ./buildOptions:
| Flag | Description | Default |
|------|-------------|---------|
| -o, --output <dir> | Output directory | dist |
furlow export <path>
Export Discord slash command registration JSON for manual deployment.
furlow export furlow.yaml
furlow export furlow.yaml -o commands.json
furlow export furlow.yaml -g 123456789 # Guild-specific commandsOptions:
| Flag | Description |
|------|-------------|
| -o, --output <file> | Output file (default: stdout) |
| -g, --guild <id> | Export for specific guild |
Example Bot
Create furlow.yaml:
version: "0.1"
identity:
name: "My Bot"
presence:
status: online
activity:
type: playing
text: "with FURLOW"
commands:
- name: ping
description: Check bot latency
actions:
- reply:
content: "Pong! ${client.ping}ms"
- name: hello
description: Greet someone
options:
- name: user
type: user
description: Who to greet
actions:
- reply:
content: "Hello, ${options.member.display_name}!"
events:
- event: member_join
actions:
- send_message:
channel: "${env.WELCOME_CHANNEL}"
content: "Welcome ${member.display_name}!"Run it:
furlow start furlow.yamlDocumentation
- Full Documentation: github.com/virgilvox/discord-furlow
- Actions Reference: 84 available actions
- Expression Functions: 71 functions
- Pipes Reference: External integrations
Related Packages
| Package | Description | |---------|-------------| | @furlow/core | Runtime engine | | @furlow/discord | Discord.js adapter | | @furlow/schema | TypeScript types | | @furlow/storage | Database adapters | | @furlow/builtins | Pre-built modules | | @furlow/pipes | External integrations | | @furlow/testing | Test utilities |
License
MIT
