Preview. Flare has no public release yet. Commands and options can still change.
Run code
TypeScript, JSX, ESM and CommonJS run as they are. There is no separate compile step.
flare index.ts # run a file
flare run dev # a package.json script (pre/post hooks run too)
flare dev # shorthand for a script name
flare x cowsay hi # run a package's binaryGlobal flags: --cwd, --conditions, --no-cache. Compiled code is cached under ~/.flare/cache; flare cache clean empties it.
New project
flare init my-app -t api # a Beacon server
flare init my-site -t web # a web front end
flare init my-lib -t lib # a library
# also: -t static, -t minimal; --js, --no-git, --no-install, -yPackages
flare install # install everything in package.json
flare add zod # add a dependency
flare remove zod
flare pm trust esbuild # allow a package's install scripts
flare login @my-scope # a private registry (token kept in the system keychain)- Reads an existing
package-lock.json,bun.lockoryarn.lockand installs exactly what it says. - Writes
flare.lockb(binary, compressed);--save-text-lockfilewrites a readableflare.lock. - Install scripts don't run unless the package is listed in
trustedDependencies. - Honours
.npmrc: scoped registries, tokens,min-release-age.
Bundle
flare build src/index.tsx --minify --sourcemap
flare build src/index.ts --format esm|iife|cjs
flare build site/index.html # HTML entry, hashed file names
flare build site/index.html --format sola # precompiled .sola pages
flare build ... --compress gzip,hz --watchTest
flare test # all *.test.ts / *.spec.ts files, in parallel
flare test -t "login" # only matching tests
flare test --watch
flare test -u # update snapshotsWrite tests with describe, it / test, expect, mocks, fake timers and snapshots, as in Jest or bun:test.
Serve
Flare.serve({
port: 3000,
fetch(req) {
return new Response('Hello from Flare');
},
});Options include routes, tls, h2, h3 (HTTP/3 on the same port), websocket and reusePort. Bun.serve and node:http servers run on the same layer.
Compatibility
Flare implements Node's built-in modules and Bun's API. Checked by hand: Express 5, Fastify 5, Hono, Elysia, React 19 server rendering, ws, socket.io, pg, zod, jose and more. Packages with native binaries (.node addons) don't load yet.
Environment
| Variable | Effect |
|---|---|
RAY_JIT=0|1|2 | Highest JIT tier to use (0 = interpreter only) |
FLARE_IO_THREADS | Number of I/O threads |
FLARE_TIMING=1 | Print where start-up time goes |