Technical Manual sections
Reference › Technical Manual › Environment variables
These are the environment variables that Kitten, its launcher, and its scripts use.
| Variable | What it does | Used by |
|---|---|---|
PRODUCTION | Runs 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/ |
LOG | Turns on the log sections it lists (see Sectioned logs). | src/lib/log.ts |
INSPECT | When true, runs the Kitten bundle with --inspect-brk, without the Kitten Process Manager (see Debugging recipes). | build-templates/kitten |
PROFILE | When 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_GRAPH | When true, runs Kitten under 0x to generate a flame graph (see Debugging recipes). | build-templates/kitten |
QUIET | When 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_PATHS | Sets 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_DEPTH | Sets the limit on the depth of folders in a project (default: 16; see Files). | src/Files.ts |
KITTEN_DISTRIBUTION_HOST | The 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 |
LOCAL | When true, the deploy script uploads to a distribution server on localhost (see Releasing). | deploy |
EXPLAIN | When true, the deploy script prints each command that it runs. | deploy |
XDG_DATA_HOME | Moves 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_HOME | Moves 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 |
HOME | Your 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 |
basePath | The 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/ |
jsdbCompactOnLoad | When '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 |