Folders and Paths support

Saturday, February 17, 2024
console cli folders

syncing overview

Secrets can now be managed within folders, and will keep track of the path that they are stored under. This makes it much easier to use Phase for monorepo projects or multi-tennant use-cases. All existing secrets are given the root / path by default.


Creating folders from the Phase Console

Folders can be created from the new "Create" button by opening the dropdown and choosing "New Folder"

create folder

You can create Secrets or Folders at any path, and we've added clickable breadcrumbs to keep track of which path you are in. All existing Secrets are given the / path by default.

Path support with Phase CLI

The Phase CLI also has full path support, allowing you list or inject secrets at a specified path with the --path flag. For example, you can list all secrets at path /frontend with

phase secrets list --path frontend

or inject secrets into your app with

phase run --path frontend <your command>

Here it is in action:

cli

Check out the docs for more information on how to use the CLI with folders and paths.

Updated secret referencing syntax

The syntax for secret referencing has been updated to support referencing secrets at a specified path. For example, you can reference the variable DATABASE_URL at path backend with

${/backend/DATABASE_URL}

This can also be done across environments:

${prod./backend/DATABASE_URL}

Check out the secret referencing docs for full documentation.

Syncing secrets from a specific path

You can also specify a path when syncing secrets to third-party services. Simply enter the complete path string when creating a sync

syncing from a path


Folders and paths support is live on Phase Cloud and v2.11.0 for self-hosted users. Upgrade to Phase CLI v1.12.0 to start working with folders and paths in your dev setup as well.

Reach out on Slack or GitHub for any questions or feedback on this release!

CLOUD

The fastest and easiest way to get started with Phase. Spin up an app in minutes. Hosted in Frankfurt 🇩🇪

SELF-HOSTED

Run Phase on your own infrastructure and maintain full control. Perfect for customers with strict compliance requirements.