PkgSteward
Audience: Operator / ConfigurationLast verified against repo: 2026-11-28

Environment Variables

Every configuration variable supported by apps/api/.env and apps/web/.env.local, generated from the repository's .env.example templates.

API Service variables (apps/api/.env)

These 12 variables configure the local API service, workspace scanner defaults, command timeouts, and the 3-tier data directory. Note that values saved inside settings.json (via the in-app Settings page) override the corresponding environment variables at runtime.

Backend API Variables (apps/api/.env)

VariableDefaultRequiredWhat it does
SCAN_ROOT_PATHS"*"YesComma-separated absolute folders to scan (for example D:\Workspaces,C:\Projects) or * to scan all local fixed drives on Windows.
MAX_SCAN_DEPTH0OptionalMaximum folder depth when scanning. 0 or empty means unlimited depth; positive integers limit how many nested directory levels are traversed.
SCAN_TIMEOUT_MSEmpty (no timeout)OptionalMaximum time in milliseconds for a scan before it stops and returns partial results with timedOut: true.
HOST"127.0.0.1"Yes (Loopback only)Loopback listen address for the API service. Must be 127.0.0.1, localhost, or ::1. Non-loopback addresses are rejected for safety.
PORT24681YesTCP port for the local API service (default 24681).
MODE"development"YesRuntime mode for the API service ("development" for local dev or "production" before running pnpm build && pnpm start).
LIST_ORIGIN_CORS"http://localhost:24680"YesComma-separated allowed browser origins for the Web UI.
GLOBAL_PREFIX"api"OptionalURL path prefix for API routes (default "api").
VERSION"1"OptionalAPI route version segment (default "1", forming /api/v1).
EXPORT_SWAGGER_API_JSONtrueOptionalWhether to expose the local OpenAPI specification endpoint in development mode.
NPM_COMMAND_TIMEOUT_MSEmpty (300000 ms)OptionalTimeout in milliseconds for package manager commands (defaults to 300,000 ms / 5 minutes when empty).
PKGSTEWARD_DATA_DIREmpty (3-tier auto)OptionalCustom folder for logs, cache/last-scan.json, and settings.json. When empty, falls back to PkgStewardLog (in a .git checkout or portable mode) or %LOCALAPPDATA%\PkgSteward.

Web UI variables (apps/web/.env.local)

These 3 variables control the Web UI listen address and the server-side proxy target to the local API service.

Web UI Variables (apps/web/.env.local)

VariableDefaultRequiredWhat it does
API_BASE_URLhttp://127.0.0.1:24681/api/v1YesServer-side proxy target pointing the Web UI to the local API service (/api/pkgsteward/* forwards here).
PORTEmpty (24680)OptionalWeb UI listen port (defaults to 24680 when empty).
HOSTEmpty (localhost)OptionalWeb UI bind hostname (defaults to localhost when empty).
Last verified against repo: 2026-11-28 (apps/api/README.md)View source doc on GitHub(opens in new tab)