Supra is the CLI tool for creating new Supranim projects and managing them!
nimble install supra
- Creates a new Supranim project with a single command
- Two starter kits: full-stack web app and REST API
- Interactive prompts for author, license, and services
- Recipes: pick the services you want and they get wired into your project for you
- Bundles static assets for production
- Written in Nim, uses the clue package manager for development
Install Supra, then create a project:
nimble install suprasupra init myappThe project name must be a valid Nim identifier, so use letters, numbers and underscores (no dashes).
You will be asked for the author name and a license (press Enter to accept
the defaults), then you will get a list of services to choose from.
Hit Space to toggle a service and Enter to confirm. When it is done:
cd myapp && nimble build
cd build && ./myapp start .The web starter kit gives you a working site, not an empty folder:
- Server-side rendered pages with the Tim template engine, with
layouts/,partials/andviews/folders ready to go - Full auth flow: register, login, logout, and a forgot/reset password flow with email verification
- Session management and flash messages
- A
usermodel from the session service to extend - Controllers for accounts, auth, pages and errors, wired to the
index,accountandauthviews model/,storage/andsrc/config/folders fed by your.env- Database (with a
migrations/folder), event, middleware and provider services ready to extend - An
assets/folder for your CSS and images, which Supra can bundle into the binary for production
Same thing, JSON instead of HTML pages:
supra init myapi restapiBoth project types accept the same recipe list, so everything described below applies to either.
A recipe is a small YAML file that describes one service. Pick the ones you want while creating your project and Supra will:
- add its dependencies to your
.nimblefile - copy its service provider into
src/service/provider/ - copy any configuration file it needs into
src/config/ - add an
init()call toApp.servicesfor stateful providers
Stateless providers (bag, brotli, multipart, nimcrypto, nimcypher,
nimsodium, zippy, zlib and every openparser/* recipe) need no init
call, so they are just there for you to import.
- jose — JWT/JWS auth via nimbase/jose. Ships
src/config/jose.toml, wheresecretaccepts${env.JWT_SECRET}references. Gives youissueTokenandverifyToken. - blackpaper — Password strength validator via openpeeps/blackpaper. Ships
src/config/blackpaper.tomlwith the wordlistdictionarypath. Gives youcheckPasswordandisStrongPassword. - nimcypher — Encryption and hashing via nimbas/nimcypher. Gives you
hashUserPasswordandcheckUserPassword. - nimcrypto — Hashing, HMAC, PBKDF2/scrypt passwords, AES-GCM/CBC via cheatfate/nimcrypto. Covers every
*Hexhash (SHA-1/2, RIPEMD-160, SHA-3, BLAKE2), plushmacHex,deriveKey,randomHex,randomToken,constantTimeEqual,encryptData/decryptData(AES-256-GCM) andencryptDataCbc/decryptDataCbc. - e2ee — E2EE, password hashing and AEAD via openpeeps/e2ee (Monocypher). Argon2id passwords, seal/unseal and BLAKE2b hashing.
- nimsodium — Encryption and password hashing via libsodium.
- ormin — Prepared-statement ORM via Araq/ormin. Owns a global sqlite
dbyou can use inquery:blocks, and shipssrc/service/database/schema.sqlas a schema example (import it withimportModel). - norm — Object-driven ORM via moigagoo/norm. Validates the
DB_*environment variables and offerswithNormDb. Ships anaccountmodel example. - ozark — Ozark ORM models and tables via openpeeps/ozark. Prepares its tables on
init()and ships an exampleusermodel, but only whensrc/model/user.nimdoes not exist yet — the web starter kit already has one (the session models), and Supra will not overwrite it. Runozark.init()after the basedb.init().
- bag — Input bag validation via openpeeps/bag.
- multipart — Multipart uploads via openpeeps/multipart. Gives you
parseUpload. - mimedb — MIME type database via openpeeps/mimedb. Gives you
mimeTypeFor.
- brotli — Brotli compression via nimbase/nbrotli. Gives you
compressText. - zippy — Compression via guzba/zippy (gzip, zlib, deflate). Gives you
compressDataanddecompressData. - zlib — Compression via status-im/nim-zlib (gzip). Gives you
compressDataanddecompressData.
One recipe per openparser module, so
you only pull in the parser you actually use. All of them are plain re-exports
of the module, with no init to worry about.
| Recipe | What you get |
|---|---|
| openparser/json | JSON parsing and serialization via openpeeps/openparser |
| openparser/yaml | YAML parsing and dumping via openpeeps/openparser |
| openparser/toml | TOML parsing and dumping via openpeeps/openparser |
| openparser/xml | XML parsing and serialization via openpeeps/openparser |
| openparser/csv | Zero-copy CSV parsing via openpeeps/openparser |
| openparser/bson | BSON documents via openpeeps/openparser |
| openparser/fbe | Fast Binary Encoding via openpeeps/openparser |
| openparser/html | HTML parsing via openpeeps/openparser |
| openparser/feed | Atom feed parsing via openpeeps/openparser |
| openparser/rss | RSS parsing via openpeeps/openparser |
| openparser/ical | iCalendar RFC 5545 via openpeeps/openparser |
| openparser/dotenv | Dotenv loading via openpeeps/openparser |
| openparser/fuzzy | Fuzzy string matching via openpeeps/openparser |
| openparser/path | Path and URL parsing via openpeeps/openparser |
| openparser/plist | Apple plist via openpeeps/openparser |
| openparser/uuid | UUID v1-v8 via openpeeps/openparser |
| openparser/vcard | vCard contacts via openpeeps/openparser |
| openparser/css | CSS parsing and validation via openpeeps/openparser |
| openparser/colors | Color parsing and manipulation via openpeeps/openparser |
| openparser/qr | QR code encoding via openpeeps/openparser |
| openparser/regex | Regex matching via openpeeps/openparser |
| openparser/svg | SVG parsing and serialization via openpeeps/openparser |
In CI, or if you just like flags, skip the prompts and pick the recipes yourself:
supra init myapi restapi --skipconfig --with=jose,bag,blackpapersupra bundle.assets ./src/storage/assets ./src/service/assets_embed.nimWalks the given folder, embeds every file into a single .bin blob and writes
a generated Nim module that indexes it, so your app can serve CSS, images and
fonts straight from memory with no filesystem access. Assets are keyed under
/ (app.css becomes /app.css); pass --skip-prefix to drop the leading
slash. The web starter kit already calls this for you when you build with
supraEmbedAssets defined.
- 🐛 Found a bug? Create a new Issue
- 👋 Wanna help? Fork it!
- 🎉 Spread the word! Tell your friends about Supranim
Supranim | MIT license. Made by Humans from OpenPeeps.
Copyright © 2025 OpenPeeps & Contributors — All rights reserved.
