Skip to main content

What is flora?

flora is a fast and secure runtime that lets you write Discord bots for your servers using TypeScript, without worrying about infrastructure. Deploy scripts on a per-guild basis through a single bot, powered by V8 isolates for complete isolation between guilds.
flora is in early alpha. Expect breaking changes and rough edges as the foundations solidify.

Key Features

V8 Isolate Isolation

Each guild runs in its own V8 isolate with enforced resource limits and complete separation

Zero-Import SDK

TypeScript SDK with global namespace - no imports needed, just write code

Rich Command System

Support for both prefix and slash commands with subcommands and options

Built-in Storage

KV storage with expiration, metadata, and prefix filtering out of the box

Cron Scheduling

Schedule tasks with cron expressions, all evaluated in UTC

CLI Tooling

Deploy, manage logs, and interact with KV storage through the flora CLI

How It Works

flora provides a runtime that:
  1. Isolates guild scripts - Each guild’s bot script runs in its own V8 isolate with strict resource limits
  2. Handles Discord events - The runtime receives Discord gateway events and routes them to your handlers
  3. Exposes a clean SDK - Write TypeScript with global functions like createBot(), on(), slash(), and kv.store()
  4. Manages deployment - Use the CLI to bundle and deploy your scripts to specific guilds
// Your entire bot in one file
const ping = prefix({
  name: 'ping',
  description: 'Respond with pong',
  run: async (ctx) => {
    await ctx.reply('pong!')
  }
})

createBot({
  prefix: '!',
  commands: [ping]
})

Architecture Overview

flora’s architecture consists of:
  • Runtime - Rust service using Serenity for Discord, Deno Core for V8 bindings, and axum for HTTP
  • SDK - TypeScript library providing the bot development interface
  • CLI - Command-line tool for deployment and operations
  • Storage - PostgreSQL for deployments, Redis for sessions, Sled for KV

Getting Started

Quickstart

Get your first bot running in minutes

Installation

Set up the flora runtime and CLI

SDK Guide

Learn the SDK API and patterns

Core Concepts

Understand how flora works

Community & Support

flora is open source and under active development.

GitHub Repository

View source, report issues, and contribute

Security

Report security vulnerabilities responsibly

Build docs developers (and LLMs) love