[PR #4701] feat: cli add support for environment variables from process env #4905

Open
opened 2026-03-17 02:23:52 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4701
Author: @RaHehl
Created: 1/28/2025
Status: 🔄 Open

Base: mainHead: hopp-cli-env-from-env


📝 Commits (1)

  • f022992 feat: cli add support for environment variables from process env

📊 Changes

1 file changed (+22 additions, -0 deletions)

View changed files

📝 packages/hoppscotch-cli/src/options/test/env.ts (+22 -0)

📄 Description

Closes #

What's changed

I need a way to use environment variables from the OS context at runtime in Hoppscotch CLI. For example, I want to use a variable called "baseurl" in the collection and then dynamically replace this variable in GitLab CI/CD with the URL of the test application deployed in the pipeline by setting the environment variable HOPP_COL_ENV_baseurl

Notes to reviewers


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/4701 **Author:** [@RaHehl](https://github.com/RaHehl) **Created:** 1/28/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `hopp-cli-env-from-env` --- ### 📝 Commits (1) - [`f022992`](https://github.com/hoppscotch/hoppscotch/commit/f022992455898ff6c739caa7e0975d83386aba83) feat: cli add support for environment variables from process env ### 📊 Changes **1 file changed** (+22 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-cli/src/options/test/env.ts` (+22 -0) </details> ### 📄 Description <!-- Thanks for creating this pull request 🤗 Please make sure that the pull request is limited to one type (docs, feature, etc.) and keep it as small as possible. You can open multiple prs instead of opening a huge one. --> <!-- If this pull request closes an issue, please mention the issue number below --> Closes # <!-- Issue # here --> <!-- Add an introduction into what this PR tries to solve in a couple of sentences --> ### What's changed <!-- Describe point by point the different things you have changed in this PR --> I need a way to use environment variables from the OS context at runtime in Hoppscotch CLI. For example, I want to use a variable called "baseurl" in the collection and then dynamically replace this variable in GitLab CI/CD with the URL of the test application deployed in the pipeline by setting the environment variable HOPP_COL_ENV_baseurl <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Notes to reviewers <!-- Any information you feel the reviewer should know about when reviewing your PR --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4905
No description provided.