Fluxerly.js (FluxerlyJS) is a Fluxer-native bot SDK for JavaScript, TypeScript and Effect · fluxerly.neontechspace.com
Home · Playground · Docs · Quick start · API reference · Changelog · Examples · FAQ · Agent skill · llms.txt · NeonFlux
npm install @neontechspace/fluxerlyimport { runBot } from "@neontechspace/fluxerly"
await runBot({
token: process.env.FLUXER_BOT_TOKEN,
commands: {
prefix: "!",
commands: { ping: { execute: ({ reply }) => reply("Pong!") } },
},
})Try real @neontechspace/fluxerly JavaScript, TypeScript and Effect bots live in the browser Playground with zero backend setup. The same SDK powers production bots such as NeonFlux
Built for developers at every level, from a first bot in one file to large production bots that need full control
| Capability | What ships out of the box |
|---|---|
| One-file start and scaffolding | Interactive fluxerly init starters for JavaScript, TypeScript and Effect with a working test, plus runBot lifecycle handling and graceful Ctrl+C shutdown |
| Structured, actionable errors | Network calls return a Result with stable codes, actionable fixes, typo hints and describeError metadata, while logs mask tokens automatically |
| Commands, builders and collectors | Typed prefix commands with guards, cooldowns, middleware and generated help, alongside EmbedBuilder, MessageBuilder and message or reaction collectors |
| Complete Fluxer coverage | Messages, embeds, attachments, voice notes, reactions, threads, forum posts, communities, roles, permissions, emoji, stickers, webhooks, OAuth2 and opt-in caches |
| Typed raw escape hatches | Compile-time checked bot routes via client.rest.call, raw client.rest.request for brand-new routes and typed raw gateway events |
| Zero-network testing and playground | In-memory Fluxer gateway, HTTP server and virtual clock via createTestBot, plus the browser Playground with fault injection and wire inspection |
| Two APIs, one engine | Async/await with Results in @neontechspace/fluxerly and native Effect 4 in @neontechspace/fluxerly/effect, backed by one implementation |
| Production resilience | Automatic sharding, session resume across restarts, process supervision, deadline-aware rate limiting and observe metrics and traces |
| Built-in CLI and shipped source | Full TypeScript src/ inside the package, fluxerly doctor, fluxerly triage, fluxerly agents, fluxerly invite, SKILL.md and llms.txt |
| Tracked against Fluxer's server | Automated drift checks across Fluxer's API docs and server source trees, verified by offline contract tests, live Fluxer checks and multi-model reviews |
Fluxer moves fast, and Fluxerly keeps pace. Two channels fit different bots:
- Stable: Releases that passed every check, for bots that value calm
- Nightly: The newest changes as they land, for bots that want them first
Fluxerly targets Node.js 26.13 or newer. JavaScript needs no compiler, and TypeScript projects require TypeScript 7 and @types/node
| Package manager | Stable | Nightly (exact pin) |
|---|---|---|
| npm | npm install @neontechspace/fluxerly |
npm install --save-exact @neontechspace/fluxerly@nightly |
| pnpm | pnpm add @neontechspace/fluxerly |
pnpm add --save-exact @neontechspace/fluxerly@nightly |
| Bun | bun add @neontechspace/fluxerly |
bun add --exact @neontechspace/fluxerly@nightly |
A committed lockfile keeps installs reproducible. Nightly releases can include breaking changes, so pinning the exact version stops fresh installs from pulling a breaking update
A bot needs a Fluxer application, its bot token and an invite to a community. Create a bot walks through setup and permissions
npx @neontechspace/fluxerly init- Interactive setup: Pick JavaScript, TypeScript or Effect from the menu (also works with
pnpm dlxorbunx), or follow the quick start by hand - Flags for scripts: Pass
--template js|ts|effect,--dir <folder>,--pm npm|pnpm|bunor--no-installto skip prompts or installs - Safe on existing folders: Keeps existing
.envfiles intact and appends missingnode_modulesand.envlines to.gitignore
The generated bot.js replies Pong! to !ping:
import { defineBot, runBot } from "@neontechspace/fluxerly"
// The bot's options without its token, so its test can run them through createTestBot without a token or a network
export const bot = defineBot({
commands: {
prefix: "!",
commands: {
// Returning the reply reports a failed send to the log
ping: { execute: ({ reply }) => reply("Pong!") },
},
},
})
// Running this file starts the bot, while importing it from a test does not.
// A failure that stops the bot, such as a rejected token, is logged and sets a failing exit code
if (import.meta.main) await runBot({ token: process.env.FLUXER_BOT_TOKEN, ...bot })Set FLUXER_BOT_TOKEN in .env, verify with npm test and npx --no fluxerly doctor, then run npm start (or npm run dev to auto-restart on save). Send !ping in a channel the bot can read to see Pong!
Every @neontechspace/fluxerly install ships the fluxerly CLI with zero extra global tools
| Command | What it does | Key flags |
|---|---|---|
fluxerly init |
Creates a JavaScript, TypeScript or Effect starter bot with a working createTestBot test and AGENTS.md, then installs dependencies |
--template js|ts|effect, --dir <folder>, --pm npm|pnpm|bun, --no-install |
fluxerly doctor |
Verifies runtime, ESM, TypeScript, Effect, installed dependencies, source imports and secret hygiene offline | --json |
fluxerly triage |
Bundles redacted project facts, doctor checks, optional logs or debug traces and the triage playbook for a coding agent | [problem], --agent antigravity|claude|codex|opencode|t3code|other, --model <id>, --dir <folder>, --log <file>, --run <command>, --print |
fluxerly agents |
Writes, refreshes or checks Fluxerly rules for coding agents across AGENTS.md, skills and IDE rule files |
--target agents|skill|cursor|claude|gemini|all, --check, --print |
fluxerly invite |
Generates a Fluxer bot installation URL offline from an application ID and permission names or bitfield | <applicationId>, --permissions <value> |
Catch setup and hygiene mistakes before a bot ever connects, with an exact fix printed for every warning or failure
npx --no fluxerly doctor- Runtime and modules: Checks Node.js
>=26.13.0, ESM"type": "module",tsconfig.json, TypeScript 7,@types/nodeand Effect 4 peer alignment - Code and agent hygiene: Flags installed
node_modulesdrift, blockedrequire()or deep/dist/and/src/imports, and outdatedAGENTS.mdrules - Secret safety: Runs completely offline without contacting Fluxer or printing token values, while catching
.gitignoregaps and extraBotorBearerprefixes in.env - Works everywhere: Run with
pnpm exec fluxerly doctororbunx --no-install fluxerly doctor, and pass--jsonfor CI scripts
When startup fails, the gateway drops or an API call rejects unexpectedly, bundle redacted project facts and trace the root cause with a coding agent
npx --no fluxerly triage --run "npm test" "replies fail with 403"- Automatic context: Collects SDK and CLI versions, pinned Fluxer server commit, shipped
src/paths anddoctorresults, plus optional--logtails or liveFLUXERLY_DEBUG=rest,gatewaytraces from--run - Three fault layers: Reads shipped TypeScript source inside
node_modules/@neontechspace/fluxerly/srcand verifies withcreateTestBotto separate bot code, Fluxer permissions and real SDK bugs - Any coding agent: Launches Antigravity, Claude Code, Codex, OpenCode or T3 Code, or hands off a harness-agnostic prompt and session files via the picker's Other option,
--agent otheror--print - Safe by default: Never reads
.env, masks tokens and home paths automatically, and asks before editing files or opening an issue
Both entry points share one engine with typed events, prefix commands, embeds, attachments, reactions, collectors and optional bounded caches
| API | Import | Testing entry point | Style |
|---|---|---|---|
| JavaScript & TypeScript | @neontechspace/fluxerly |
@neontechspace/fluxerly/testing |
Async/await with Results, explicit shutdown and AbortSignal cancellation. Zero TypeScript or Effect setup required for JavaScript |
| Effect 4 | @neontechspace/fluxerly/effect |
@neontechspace/fluxerly/effect/testing |
Native Effect.gen programs with typed error channels, scopes and structured interruption |
Bots often grow from one handler into several jobs, listeners and requests that must stop together. Effect describes that work as one program, shares its dependencies and waits for scoped cleanup when it succeeds, fails or is interrupted
For example, a scoped conversation can register a collector, send a question and wait for an answer. If sending fails, the scope releases the collector. Concurrent reads can cancel their unfinished siblings on failure without leaving cleanup to scattered callbacks
Learn the core concepts in the Effect v4 introduction
Installing Effect for a native application
Applications that import Effect directly must declare it as a direct dependency, using a version within the installed SDK's peerDependencies.effect range. Read node_modules/@neontechspace/fluxerly/package.json, or the SDK manifest for this checkout
Fluxerly is tested against the lowest version in that range and against its Effect 4 development version, which can be newer. Later Effect 4 releases are accepted. Do not install Effect 3 or an Effect 4 prerelease. The versioned documentation gives the matching install command
Note
Fluxerly waits for Fluxer's new voice system and does not support voice over LiveKit. Fluxer is replacing LiveKit with its own voice system, which should arrive soon, and bot voice will come with it
Fluxerly does not join voice channels or send live audio or video yet. Until then, voice states, member voice controls such as move, mute, deafen and disconnect, voice notes, and audio or video attachments work
Licensed under Apache-2.0



