Skip to content

About

The JavaScript SDK for Fluxer bots, built for clear APIs, approachable docs, and long-term maintainability

Topics

Resources

Contributing

Security policy

Stars

4 stars

Watchers

1 watching

Forks

Latest commit

 

History

331 Commits

Folders and files

Repository files navigation

Fluxerly.js, a Fluxer-native bot SDK. A few lines of bot code and the conductor mascot answering Pong!

Fluxerly.js

From your first reply to the bot of your dreams

Fluxerly.js (FluxerlyJS) is a Fluxer-native bot SDK for JavaScript, TypeScript and Effect · fluxerly.neontechspace.com

Open GitHub issues Open GitHub pull requests GitHub forks GitHub stars

npm version OSS Insight: Repository analytics Community: Public invite coming soon

Home · Playground · Docs · Quick start · API reference · Changelog · Examples · FAQ · Agent skill · llms.txt · NeonFlux

npm install @neontechspace/fluxerly
import { runBot } from "@neontechspace/fluxerly"

await runBot({
    token: process.env.FLUXER_BOT_TOKEN,
    commands: {
        prefix: "!",
        commands: { ping: { execute: ({ reply }) => reply("Pong!") } },
    },
})

Terminal running npx @neontechspace/fluxerly init with the interactive starter menu and npm start alongside a #general Fluxer channel where !ping gets the 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

What Fluxerly includes

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

Install

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

Getting started

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 dlx or bunx), or follow the quick start by hand
  • Flags for scripts: Pass --template js|ts|effect, --dir <folder>, --pm npm|pnpm|bun or --no-install to skip prompts or installs
  • Safe on existing folders: Keeps existing .env files intact and appends missing node_modules and .env lines 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!

Built-in CLI: Scaffold, verify and triage

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>

Diagnose project setup offline with fluxerly doctor

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/node and Effect 4 peer alignment
  • Code and agent hygiene: Flags installed node_modules drift, blocked require() or deep /dist/ and /src/ imports, and outdated AGENTS.md rules
  • Secret safety: Runs completely offline without contacting Fluxer or printing token values, while catching .gitignore gaps and extra Bot or Bearer prefixes in .env
  • Works everywhere: Run with pnpm exec fluxerly doctor or bunx --no-install fluxerly doctor, and pass --json for CI scripts

Terminal running npx --no fluxerly doctor, catching an outdated AGENTS.md warning and a Bot token prefix failure with exact fixes, then re-running after the fixes to show all 7 checks passing

Root-cause bot and SDK issues with fluxerly triage

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 and doctor results, plus optional --log tails or live FLUXERLY_DEBUG=rest,gateway traces from --run
  • Three fault layers: Reads shipped TypeScript source inside node_modules/@neontechspace/fluxerly/src and verifies with createTestBot to 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 other or --print
  • Safe by default: Never reads .env, masks tokens and home paths automatically, and asks before editing files or opening an issue

Terminal running npx --no fluxerly triage with --run trace capture and the agent picker alongside a triage session panel showing redacted context, shipped source tracing, createTestBot verification and a proven permissions verdict

Choosing an API

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

Why learn Effect?

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

Voice: Waiting for Fluxer's new voice system

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

Repository activity

Repobeats analytics

Fluxerly.js star history

Fluxerly.js downloads over the last 365 days, grouped by week

Licensed under Apache-2.0

About

The JavaScript SDK for Fluxer bots, built for clear APIs, approachable docs, and long-term maintainability

Topics

Resources

Contributing

Security policy

Stars

4 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages