[Feat] Multi-Path Auto-Loading in .infisical.json #5412
Itz-Agasta
started this conversation in
Feature Request
Replies: 2 comments
-
|
Moving this to a feature request to get more user votes as required, when we prioritise feature request later. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
We have this exact problem! We currently have to manually eval an infisical call for each folder in order to load all the secrets we need for a monorepo. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Feature description
Add support for automatically loading secrets from multiple folder paths in a single
infisical runcommand without requiring the--pathflag each time.Proposed
.infisical.jsonconfiguration:{ "workspaceId": "63ee5410a45f7a1ed39ba118", "defaultEnvironment": "", "gitBranchToEnvironmentMapping": null "paths": ["/db", "/workers", "/services/auth", "/apps/api-gateway"] }With this configuration, running:
Would automatically inject secrets from all specified paths (merged together), instead of requiring:
infisical run --env=dev --path=/db -- bun run dev infisical run --env=dev --path=/workers -- bun run dev # etc...Why would it be useful?
Monorepo Support: In modern monorepo architectures, applications often need secrets from multiple folders (shared configs, service-specific secrets, environment-specific overrides).
DRY Principle: Eliminates repetitive
--pathflags in commands, scripts, and CI/CD pipelines.Developer Experience: Simplifies local development - developers can run
infisical run -- <cmd>without remembering which paths their app needs.Consistency with Other Tools: Similar to how tools like dotenv support multiple
.envfiles, or how Kubernetes allows multiple ConfigMaps/Secrets to be mounted.Script Simplification: Reduces complexity in package.json scripts, Makefiles, and Docker Compose files:
Current:
Proposed:
Reduced Error Surface: No risk of forgetting to add
--pathwhen running commands, which currently results in missing environment variables.Additional context
Use Case: Multi-Service Application
Many applications have a shared configuration structure:
A worker process might need secrets from
/common,/db, and/workers. Currently, this requires either:--pathflags (not scalable)Conflict Resolution
When the same secret key exists in multiple paths, the CLI could:
--merge-strategyflag for runtime overrideBackward Compatibility
This feature would be fully backward compatible:
.infisical.jsonfiles continue working--pathflag overridespathsarray when specifiedRelated Features
This pairs well with the existing
--project-config-dirflag for monorepo support and would make Infisical an even better fit for complex project structures.Beta Was this translation helpful? Give feedback.
All reactions