Skip to main content
The Flora CLI manages deployments, logs, and KV stores against the runtime API. It provides a streamlined workflow for deploying Discord bot scripts and managing guild-specific data.

Installation

From Source

Install dependencies and build the CLI from the repository root:
pnpm install
pnpm --filter @uwu/flora-cli run build

Development Mode

Run the CLI directly without building:
pnpm --filter @uwu/flora-cli run dev -- --help

Authentication

The CLI stores configuration in a per-user local config file. You must authenticate with an API token before using most commands.

Login Command

Authenticate once with your API token:
flora login <token>
The token is saved to your local config file and used for all subsequent API requests.
If the token is not provided as an argument, the CLI will prompt you to enter it interactively.

Configuration

API URL

The CLI connects to the Flora runtime API. You can configure the API URL in two ways: Environment variable:
export FLORA_API_URL=http://localhost:3000/api
Command-line flag:
flora --api-url http://localhost:3000/api deploy --guild 123456789012345678 src/main.ts
The --api-url flag (or -a alias) can be used with any command.
The default API URL is http://localhost:3000/api

Project Configuration

Create a flora.config.ts (or .js, .mjs) file in your project root to set deployment defaults:
flora.config.ts
export default {
  deploy: {
    entry: 'src/main.ts',
    root: '.'
  }
}
Configuration options:
  • entry - Default entry point for deployments (defaults to src/main.ts)
  • root - Project root directory to package (defaults to .)

Available Commands

Core Commands

flora deploy --guild <guild_id> <entry_file>

KV Store Commands

flora kv create-store --guild <guild_id> --name <store_name>

Help

Get help for any command:
flora --help
flora deploy --help
flora kv --help

Next Steps

Deploy Scripts

Package and deploy your Discord bot scripts

View Logs

Monitor runtime logs for your deployments

KV Operations

Manage key-value stores through the CLI

Build docs developers (and LLMs) love