# Migrating From Cypress.env To cy.env and Cypress.expose Methods

DevFeed: [Migrating From Cypress.env To cy.env and Cypress.expose Methods](<https://devfeed.tech/articles/migrating-from-cypress-env-to-cy-env-and-cypress-expose-methods-28884.md>)

Original publisher: [Read original article](<https://glebbahmutov.com/blog/cypress-expose/>)

Author: Gleb Bahmutov

Published: 2026-03-07T05:00:00Z

Content type: tutorial

Language: en

Sources: [Gleb Bahmutov](<https://devfeed.tech/sources/gleb-bahmutov.md>)

Topics: [Cypress](<https://devfeed.tech/topics/cypress.md>), [Environment Variables](<https://devfeed.tech/topics/environment-variables.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Node.js](<https://devfeed.tech/topics/node-js.md>), [Playwright](<https://devfeed.tech/topics/playwright.md>)

Tags: [cypress](<https://devfeed.tech/tags/cypress.md>), [environment-variables](<https://devfeed.tech/tags/environment-variables.md>), [playwright](<https://devfeed.tech/tags/playwright.md>), [products](<https://devfeed.tech/tags/products.md>), [secrets](<https://devfeed.tech/tags/secrets.md>), [testing](<https://devfeed.tech/tags/testing.md>)

## AI overview

A Cypress migration tutorial explains changes to environment values and secrets planned for Cypress v16. It describes how Cypress v15 exposes values to browser-run tests and recommends keeping secrets needed only by Node.js tasks out of the browser.

## Source excerpt

Cypress v15.10.0 has announced a big switch coming in v16 - the new way of dealing