Repository navigation
Running From Source
arielaram edited this page Nov 16, 2026
·
1 revision
Use this when you want to change the code, or run on a platform without a release binary. You need Bun and Git.
-
Bun (the project uses
bun) - Node.js 22 or newer (
enginesinpackage.json) - Git
git clone https://github.com/nationdex/bot.git nationdex
cd nationdex
bun install
bun run buildCreate .env in the same folder (see Configuration).
| Command | What it does |
|---|---|
bun run start |
Runs the built dist/index.js
|
bun run dev |
Rebuilds and reruns on file changes |
bun run build |
Compiles src/ to dist/ with tsc
|
bun run typecheck |
Type-checks without writing files |
bun run lint |
ForgeLint checks the ForgeScript code strings |
If a deleted command still shows in Discord, run rm -rf dist/ && bun run build and restart.
bun run build:binary # Linux x64, output in binaries/
bun run build:binary:arm64 # Linux ARM64Before building, run bun run bundle:prep. It regenerates src/bundle-imports.ts, which the bot needs whenever functions, commands or routes are added or removed.
- Only one process may use
./database. Stop the bot before running any script that touches the database. - Do not run tests or scripts against
./databasewhile the bot is running. Query the API on port2222instead. - The panel rebuilds its UI on boot when its sources are newer than
website/dist. You can also runbun run panel:build.
See also Hosting for running it as a service.