- centralized Barekey plus CLI login
- standalone local
.envfiles through the server SDK
Workflow 1: centralized Barekey with local login
This is the most ergonomic team workflow.Step 1: log in once
Step 2: commit barekey.json
Step 3: use either the CLI or SDK
CLI:- scope from
barekey.json - auth from your stored CLI login unless
BAREKEY_ACCESS_TOKENis set
Workflow 2: standalone local .env mode
Use this when you want the Barekey SDK API but do not want network-backed reads for local work.
Set:
.env* files instead of calling the API.
barekey.json reference
Search behavior
Barekey searches upward from the current working directory until it finds abarekey.json.
That matters in monorepos because:
- one repo-root config can serve many packages
- standalone mode uses the discovered config directory as the local env root
Pulling to .env.local
If your framework expects dotenv files, use:
.gitignore:
How standalone .env loading behaves
The SDK reads local env files from the standalone root directory.
The tests cover patterns such as:
.env.env.local.env.<environment>.local
DATABASE_URLFEATURE_ENABLEDDEVELOPMENT_LOCAL_LAUNCH_AT
Choosing between pull and standalone mode
Production recommendation
For production, prefer centralized SDK reads withBAREKEY_ACCESS_TOKEN.
Use local pull files or standalone mode for local development only.
