PkgSteward
Audience: End UserLast verified against repo: 2026-11-28

Configuration

Copy the two example environment files and set your scan roots. Default ports and loopback addresses work out of the box.

Create your local environment files in two commands

PkgSteward uses two environment files: apps/api/.env for the local API service and apps/web/.env.local for the Web UI.
01

1. Copy apps/api/.env.example to apps/api/.env

Run Copy-Item in Windows PowerShell from the repository root.
powershell
Copy-Item apps/api/.env.example apps/api/.env
Expected result: apps/api/.env is created with HOST=127.0.0.1, PORT=24681, and SCAN_ROOT_PATHS=*. You can narrow SCAN_ROOT_PATHS to specific folders such as D:\Workspaces if desired.
02

2. Copy apps/web/.env.example to apps/web/.env.local

Create the Web UI configuration file pointing to the local API service.
powershell
Copy-Item apps/web/.env.example apps/web/.env.local
Expected result: apps/web/.env.local is created with API_BASE_URL=http://127.0.0.1:24681/api/v1.
Keep HOST on a loopback address
HOST in apps/api/.env must remain 127.0.0.1, localhost, or ::1. The API service executes local file operations and package commands and refuses non-loopback network bindings.

Most important settings at a glance

Every setting in apps/api/.env and apps/web/.env.local is listed below with its default value and purpose. You can also adjust scan roots and visual preferences later inside the in-app Settings page (/settings).

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)

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 (README.md)View source doc on GitHub(opens in new tab)