Generate the key pair
Create an Ed25519 private.pem and public.pem once. Keep the private key on the machine that signs flagfiles.
A $29 pack for indie makers. Edit JSON, sign with Ed25519, verify with the public key only, and evaluate boolean or percent-rollout flags offline — no monthly flags SaaS.
Hosted dashboards are great when you need segments, experiments, and a CDN. If you mainly need a signed local flagfile you control, a subscription is the wrong shape.
| Typical flags SaaS | Signed Flagfile Kit | |
|---|---|---|
| Cost | $10–80 every month | $29 once |
| Who holds the config | Their cloud + SDK | You sign a JSON file; only public.pem ships in the app |
| Evaluation | Often needs a network fetch | Offline after Ed25519 verify |
| Dependencies | Vendor SDK / npm install | Node.js built-in crypto only |
| What you get | Hosted dashboard, targeting UI, CDN | CLIs, library, Node gate, browser eval helper, tests |
Four commands. The envelope is fixed: SFF1.<payload>.<signature>, with product id, optional expiry, and a map of flags (on, optional percent).
Create an Ed25519 private.pem and public.pem once. Keep the private key on the machine that signs flagfiles.
Write a human-editable draft, then sign it into an SFF1.… envelope with boolean flags and optional percent rollout.
Ship only the public key. The app verifies the signature, then evaluates flags locally — including stable percent buckets.
# 1. Key pair (once) node src/generate-keypair.js --out ./keys # 2. Sign a draft node src/sign-flagfile.js \ --key ./keys/private.pem \ --in ./examples/flags.draft.json \ --out ./flags.sff1 # 3. Verify (public key only) node src/verify-flagfile.js \ --key ./keys/public.pem \ --in ./flags.sff1 \ --product my-desktop-app # 4. Evaluate node src/eval-flag.js \ --key ./keys/public.pem \ --in ./flags.sff1 \ --flag new_editor \ --user user-123 # Embed keys/public.pem in the app. Keep private.pem secret.
These are the actual sign CLI, verify CLI, draft JSON, and in-app gate from the pack.
flags.draft.json into an SFF1.… envelope.
Version 1.0.0. Instant file download from Polar after checkout.
src/lib/flagfile.jsCore sign, verify, and evaluate library — Node crypto only.src/generate-keypair.jsCreate the Ed25519 PEM key pair.src/sign-flagfile.jsCLI to sign a JSON draft.src/verify-flagfile.jsCLI to verify an SFF1 envelope offline.src/eval-flag.jsCLI to evaluate one flag (boolean / percent).examples/app-gate-snippet.jsDrop-in Node gate for the shipped app.examples/browser-eval.jsBrowser evaluate helper for a payload you already verified.tests/run-tests.jsAutomated checks for format, crypto, and rollout stability.LICENSE.txt + READMEUsage terms: use and embed in your own products; do not resell the kit as a competing pack.This is a kit you run, not a hosted feature-flag company.
Indie developers shipping desktop, Electron, CLI, or small self-hosted web apps who want signed local flags — not another monthly bill for a dashboard they barely open.
You need a hosted targeting UI, real-time flag push, analytics, or multivariate experiments. Those are different products. This kit is for signed offline evaluation of a file you control.
Sold by LJ Corp. Checkout and file delivery are handled by Polar as merchant of record.
Straight answers, including what this pack does not do.
No. This is a one-time $29 download. You edit a JSON draft, sign it on your machine, ship the file with your app, and evaluate flags offline after public-key verify.
Node.js 18 or newer. There is nothing to install from npm. The pack uses Node’s built-in crypto.generateKeyPairSync('ed25519').
No. percent is a signed claim. The evaluator uses a stable SHA-256 bucket of flagName + userId. Same user, same flag → same bucket.
Not in v1. You distribute updated flagfiles yourself (release artifact, download endpoint, or self-host). Private-key custody is yours.
A chatbot can sketch signing code. This pack is the tested path from keygen to sign to verify to evaluate, with a fixed SFF1. format, CLIs, snippets, and a test suite.