Consolidate env at repo root

- Move all application env vars to repository-root .env (with .env.example
  as the committed template) and drop the per-app .env.example files.
- Add @code/env subpaths (agent, convex) and consume validated exports
  everywhere instead of reading process.env directly.
- Wire every dev/build/start script to load ../../.env via bun --env-file
  and point vite.config.ts envDir at the repo root.
This commit is contained in:
-Puter
2026-07-19 17:29:11 +05:30
parent 87ddc2b73a
commit 6de7c3065e
15 changed files with 100 additions and 40 deletions

View File

@@ -34,6 +34,7 @@
"hooks:setup": "vp config",
"dev:native": "vp run --filter native dev",
"dev:web": "vp run --filter web dev",
"dev:agents": "vp run --filter @code/agents dev",
"dev:desktop": "vp run --filter desktop dev:hmr",
"build:desktop": "vp run --filter desktop build:stable",
"build:desktop:canary": "vp run --filter desktop build:canary",
@@ -42,15 +43,12 @@
"dev:setup": "vp run --filter @code/backend dev:setup",
"dev:daemon": "vp run --filter daemon dev",
"build:daemon": "vp run --filter daemon build",
"build:agents": "vp run --filter @code/agents build",
"docs:update": "bun run scripts/update-docs.ts",
"subtree": "bun run scripts/subtree.ts",
"fix": "ultracite fix"
},
"dependencies": {
"@code/env": "workspace:*",
"dotenv": "catalog:",
"zod": "catalog:"
},
"dependencies": {},
"devDependencies": {
"@code/config": "workspace:*",
"@types/bun": "latest",