[GH-ISSUE #2333] [feature]: @hoppscotch/cli should support environment variables exported from the GUI #799

Closed
opened 2026-03-16 17:14:26 +03:00 by kerem · 0 comments
Owner

Originally created by @ZacHarroldC5 on GitHub (May 11, 2022).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/2333

Originally assigned to: @devblin on GitHub.

Is there an existing issue for this?

  • I have searched the existing issues

Summary

The @hoppscotch/cli NPM package doesn't support bringing in environment variables as used in the GUI. The CLI tool should allow for passing an optional environment JSON file as well as a collections JSON file. Syntax would probably be of the form:

hopp test -e my_env.json my_collection.json

Why should this be worked on?

This is a major issue in my opinion as things like bearer tokens, base URLs, etc., should ideally be stored as environment variables for reuse within all tests. In my current API testing, exported collections are failing due to every request being designed around something like:

GET <<baseUrl>>/some/endpoint

A base URL variable wouldn't be hard to manually unwrap into my tests, but something like bearer tokens, user IDs, etc. would be useful to get directly from the environment file.

Originally created by @ZacHarroldC5 on GitHub (May 11, 2022). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/2333 Originally assigned to: @devblin on GitHub. ### Is there an existing issue for this? - [X] I have searched the existing issues ### Summary The @hoppscotch/cli NPM package doesn't support bringing in environment variables as used in the GUI. The CLI tool should allow for passing an optional environment JSON file as well as a collections JSON file. Syntax would probably be of the form: ```bash hopp test -e my_env.json my_collection.json ``` ### Why should this be worked on? This is a major issue in my opinion as things like bearer tokens, base URLs, etc., should ideally be stored as environment variables for reuse within all tests. In my current API testing, exported collections are failing due to every request being designed around something like: ``` GET <<baseUrl>>/some/endpoint ``` A base URL variable wouldn't be hard to manually unwrap into my tests, but something like bearer tokens, user IDs, etc. would be useful to get directly from the environment file.
kerem 2026-03-16 17:14:26 +03:00
  • closed this issue
  • added the
    feature
    label
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#799
No description provided.