Kitten

Technical Manual sections

These are the environment variables that Kitten, its launcher, and its scripts use.

VariableWhat it doesUsed by
PRODUCTIONRuns Kitten in production when it is true (see Kitten’s operating model). The launcher unsets any other value.build-templates/kitten, src/Server.ts, and other files in src/ and web/
LOGTurns on the log sections it lists (see Sectioned logs).src/lib/log.ts
INSPECTWhen true, runs the Kitten bundle with --inspect-brk, without the Kitten Process Manager (see Debugging recipes).build-templates/kitten
PROFILEWhen set, logs how long each page takes to import and to render, and turns on console.profileTime() and console.profileTimeEnd() (see Debugging recipes).src/routes/PageRoute.ts and src/lib/loader.ts
FLAME_GRAPHWhen true, runs Kitten under 0x to generate a flame graph (see Debugging recipes).build-templates/kitten
QUIETWhen set, turns off the console output of Auto Encrypt and JSDB. The launcher always sets it to true.The @small-tech/auto-encrypt and @small-tech/jsdb modules
KITTEN_MAXIMUM_NUMBER_OF_PATHSSets the limit on the number of files, folders, and symbolic links in a project (default: 10,000; see Files).src/Files.ts
KITTEN_MAXIMUM_DIRECTORY_DEPTHSets the limit on the depth of folders in a project (default: 16; see Files).src/Files.ts
KITTEN_DISTRIBUTION_HOSTThe distribution server that a build is for (the deploy script sets it from its arguments and uploads to that server; see Releasing), and the one that the kitten update command asks for releases (see Update).update-version.js, deploy, and src/cli/commands/update.ts
LOCALWhen true, the deploy script uploads to a distribution server on localhost (see Releasing).deploy
EXPLAINWhen true, the deploy script prints each command that it runs.deploy
XDG_DATA_HOMEMoves Kitten’s data home when it is an absolute path (see Data on disk).src/lib/paths.ts, build-templates/kitten, and install
XDG_CONFIG_HOMEMoves the configuration home (~/.config by default), which contains the systemd unit of a deployed app and the signing key and upload token for releases, when it is an absolute path.src/lib/paths.ts, install, and deploy
HOMEYour home folder, which contains the default data home and configuration home. The launcher and the installer set it from your account when it is unset (e.g., under some systemd units).src/lib/paths.ts, build-templates/kitten, and install
basePathThe base path of the app being served. The setBasePath() function sets it (see Serve), and the rest of Kitten reads it.src/Utils.ts and other files in src/
jsdbCompactOnLoadWhen 'false', stops JSDB from compacting the tables of kitten.db and kitten._db when Kitten opens them. The database commands set it (see Database commands).src/AppDatabase.ts, src/InternalDatabase.ts, and src/cli/commands/db.ts

Like this? Fund us!

Small Technology Foundation is a tiny, independent not-for-profit.

We exist in part thanks to patronage by people like you. If you share our vision and want to support our work, please become a patron or donate to us today and help us continue to exist.