mehendocs

GuidesMove existing keys in

Move existing keys in#

I already have keys and .env files; how do I move them into Mehen?

On this page

Each key goes in once, through a vault page where it is sealed in your browser. Nobody pastes it into chat or a terminal.

Ask once, not once per machine#

A credential lives in the workspace, not on a machine. Every machine you enrol whose scope covers it can use it, so put each key in once, from whichever machine or page is to hand.

Decide first who it belongs to. Only me (private, the default for an agent's ask) is for your own keys. A project is for a key the project's team shares, and needs edit on the project; in a repo with a mehen.toml, an agent asks with --home project. Whole workspace is for owners and admins.

Two ways in#

Then clear out the .env#

Rotate what was exposed#

Moving a key into the vault does not make an exposed key secret again. Rotate at the provider, and put the new value in rather than the old one, for any key an agent could already read (a .env in a repo an agent works in, a chat, shell history) and any key that sat in a synced or shared file (a cloud drive, a shared folder, a commit).