mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #5314] [feature]: read variables from OS environment #2032
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#2032
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @omniproc on GitHub (Aug 6, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5314
Is there an existing issue for this?
Summary
Make it possible to access operating system environment variables within Hoppscotch Desktop
Why should this be worked on?
Identical to the discussion open since 2015 in https://github.com/postmanlabs/postman-app-support/issues/1603
This could mean that it's possible to reference OS env vars from within the app env vars (e.g. for the value of a app env var use &&MY_OS_ENV_VAR&& or similar) or that something like process.env() to read OS env vars in a pre-request / post-request script is made available so they can be set as needed.
The request is not to automatically import all OS environment variables. They'd still have to be explicitly added by a user before they can be accessed. This makes sure there is no name conflict and OS environment variables are only exposed if explicitly configured by the user.
To prevent OS env var access by collection sharing I'd even go so far to only make the use of &&MY_OS_ENV_VAR&& possible within the value of a secret. This way it wouldn't be exported and a user would have to explicitly add it once the collection is imported.
@magratheaner commented on GitHub (Aug 27, 2025):
I strongly second this. I'm using aws cli to authenticate with AWS from the terminal daily using
aws sso loginand export the resulting secrets to env vars in the respective terminal. This is a common and fully supported use case of AWS as far as I'm informed.If I could just use these env vars in hoppscotch without needing to implement another auth flow inside of the app, or worse, copying the values manually every day, that would be great, and certainly something that comparable solutions currently lack, as the OP mentioned.
Also I fully agree that if you actually enforce usage of env vars in exports somehow, this will make working with the app much safer for many teams, comparable to .env in .gitignore. But I think that should be done in another issue.