[GH-ISSUE #5840] [feature]: Ability to link/associate a default Environment with a Collection #2287

Open
opened 2026-03-16 23:51:34 +03:00 by kerem · 1 comment
Owner

Originally created by @Trishadring on GitHub (Feb 5, 2026).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5840

Is there an existing issue for this?

  • I have searched the existing issues

Summary

would like an option in the Collection Settings (or the "Edit Collection" modal) to select a "Default Environment."

Behavior:

When I click on a collection or a request within that collection, Hoppscotch should automatically switch the active environment to the one associated with that collection.
If no default is set, it should just keep the currently selected environment.

Describe alternatives you've considered

Currently, I have to manually use the environment dropdown every time I switch collections. Another alternative is using "Collection Variables," but these don't replace the need for environment-specific secrets (like API keys or base URLs) that change between Dev, Staging, and Prod.
Additional context

This would greatly improve the user experience for developers managing multiple projects within the same Hoppscotch instance. It ensures the "Context" (Collection + Environment) is always in sync.

Why should this be worked on?

When switching between different collections (e.g., switching from a "Payment API" project to a "User Management" project), I have to manually change the Environment in the top-right corner every time.

If I forget to switch the environment, the requests fail or, worse, I accidentally run a request against the wrong environment. It is time-consuming to manually toggle this every time I click a different collection in the sidebar.

Originally created by @Trishadring on GitHub (Feb 5, 2026). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5840 ### Is there an existing issue for this? - [x] I have searched the existing issues ### Summary would like an option in the Collection Settings (or the "Edit Collection" modal) to select a "Default Environment." Behavior: When I click on a collection or a request within that collection, Hoppscotch should automatically switch the active environment to the one associated with that collection. If no default is set, it should just keep the currently selected environment. Describe alternatives you've considered Currently, I have to manually use the environment dropdown every time I switch collections. Another alternative is using "Collection Variables," but these don't replace the need for environment-specific secrets (like API keys or base URLs) that change between Dev, Staging, and Prod. Additional context This would greatly improve the user experience for developers managing multiple projects within the same Hoppscotch instance. It ensures the "Context" (Collection + Environment) is always in sync. ### Why should this be worked on? When switching between different collections (e.g., switching from a "Payment API" project to a "User Management" project), I have to manually change the Environment in the top-right corner every time. If I forget to switch the environment, the requests fail or, worse, I accidentally run a request against the wrong environment. It is time-consuming to manually toggle this every time I click a different collection in the sidebar.
Author
Owner

@luongquochai commented on GitHub (Mar 12, 2026):

Hi @jamesgeorge007 , can I try on this ?

<!-- gh-comment-id:4048313713 --> @luongquochai commented on GitHub (Mar 12, 2026): Hi @jamesgeorge007 , can I try on this ?
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#2287
No description provided.