-
Notifications
You must be signed in to change notification settings - Fork 53
Description
Is your feature request related to a problem?
Yes. When creating a new project in Phase, we currently have to manually replicate all the same environments and secret variables from an existing project. This is tedious and error-prone. For example, if one project has multiple environments (Dev, Staging, Prod) each with a set of API keys and credentials, we must re-create those environments and enter each secret key again for a new project. This manual process is time-consuming and can lead to mistakes (like missing a variable or naming something inconsistently), especially as our team grows and we maintain many projects with similar configurations.
Describe the solution you'd like
I propose a “Project Templates” feature (essentially project cloning) to streamline setting up new projects. This would allow us to use an existing project as a template when creating a new one. In practice, the solution should include the following capabilities:
-
Clone Environments and Variables: When creating a new project, provide an option to clone from an existing project. All environments from the source project would be recreated in the new project (with the same names), and all secret variable keys in those environments would be pre-populated in the new project. This way, the new project starts with an identical structure of environments and variables as the template project. Optionally, the feature could allow including the secret values as well (copying the current values) or instead set them as blank placeholders, depending on security preferences.
-
Project Naming on Clone: The user should be prompted to enter a name (and unique identifier/slug) for the new project during the cloning process (instead of using the old name). This ensures the cloned project is clearly distinguishable and has a unique name, while preserving all the structure from the template.
-
Consistency of Settings: Any project-level settings that make sense to carry over (for example, environment variables tags or folder structures, if Phase supports those) should be copied to the new project. User access roles could be either not copied (to start fresh) or optionally copied if the intent is to duplicate the team setup, but the core need is to copy environments and secret definitions.
-
The workflow could be: “Create New Project -> Choose Template (existing project) -> New Project is created with all the same envs/variables.” Alternatively, a “Clone Project” button on an existing project could accomplish the same outcome in one click. After cloning, we would only need to update any secret values that should differ in the new project, rather than having to create everything from scratch.
This feature would significantly reduce setup time for new projects. Instead of manually adding dozens of environment variables and ensuring names match, we could have an instant copy of the configuration to get started. It would also ensure consistency across projects – the environments and keys will be uniform.
Describe alternatives you've considered
-
Manual recreation: The current approach is to manually create new environments and manually copy over each secret variable name and value from an existing project. This involves toggling between projects to ensure no variable is missed. We considered writing down a checklist of all variables to manually re-create them, but this is not sustainable and prone to human error.
-
Export/Import via .env files: Phase allows exporting secrets to a file and importing into another project’s environment. We have considered exporting the secrets from one project (environment by environment) and then importing them into a new project. While this helps transfer secret values, it still requires setting up each environment and performing multiple import steps. It’s easier than typing everything, but still inconvenient if there are many environments.
-
Scripting with API/CLI: Another alternative is to use Phase’s API or CLI to script the duplication of a project’s configuration. In theory, a script could fetch all secrets and environments from one project and create them in another. However, this requires custom scripting, maintenance, and knowledge of the Phase API, which is overkill for something that should be a built-in convenience feature. Non-technical team members would not easily use this approach.
-
Do nothing / status quo: The last “alternative” is to simply continue manually copying configurations for each new project. This isn’t really acceptable as our number of projects grows, because it wastes time and could introduce inconsistencies (typos, missing secrets, etc.). It also makes onboarding new projects slower than it needs to be.
Each of the above alternatives is cumbersome. A dedicated cloning or template feature is the cleanest and most user-friendly solution.
Additional context
Implementing project cloning in Phase would improve user experience for teams managing multiple similar applications. As our team often has to set up new apps that mirror the config of existing ones, this feature would ensure consistency across projects. It reduces the risk of misconfigured secrets and speeds up deployment of new projects. Overall, “Project Templates” in Phase would help fast-moving teams maintain best practices by reusing known-good configurations, rather than reinventing the wheel each time. It aligns with Phase’s goal of making secret management easy and error-free across development cycles.
Lastly, this feature could be introduced in a way that keeps security in mind – for example, if copying secret values, it should respect permissions (only users who had access to the source project’s secrets can perform the clone) and perhaps log an audit event that a project was cloned. With those considerations, the ability to clone or template projects would be a powerful enhancement to Phase.
Thank you !!!