Guide · Dashboards
Paste env vars into a dashboard, no file
Hosting dashboards let you paste a whole env block. The usual route is to save the values to a file, open it, copy it and forget to delete it. You can skip the file.
In shortRun lk export shop/production --values --clipboard. Approve it, paste into the dashboard, and the copy clears itself after 60 seconds. In the app, use Copy Environment as .env…. No file is written.
Why a file is the wrong middle step
A plain-text .env.production holds every value in the open. It sits in your folder, in backups and in cloud-synced directories until you remember to delete it. The dashboard only needs the text once.
The examples use an example project called shop with a production environment.
Copy and paste
-
Copy the environment
Terminal lk export shop/production --values --clipboardLatchkey builds the env block from the environment's record: its stored values and its plain settings. It asks for approval every time, naming the environment and saying the values go to the clipboard. No grant, agent-safe setting or earlier approval stands in for that.
-
Paste it into the dashboard
The block has no header comment, so it pastes as a clean list of
NAME=valuelines. Use it in any dashboard that takes a pasted env block, such as Vercel, Railway, Netlify or Render. -
Let it clear
The copy stays on this Mac. It does not travel by Universal Clipboard. It is marked concealed and transient so clipboard managers skip it, and it is cleared after 60 seconds if nothing else was copied in the meantime. A detached
latchkey clipboard-cleardoes the clearing, so the command can exit straight away. If you copy something else first, Latchkey leaves your new copy alone.
The same thing in the app
Open an item in the environment, then choose Edit › Copy Environment as .env…. The approval names the environment, the clipboard and when it clears. The clear time is 60 seconds unless you changed it in Settings › Privacy & Approval, where you can pick 15, 30, 60 or 120 seconds.
When you want a file or a push instead
If you do need a file, --values --out FILE writes one readable only by you. Inside a Git checkout the file must be ignored and untracked, or nothing is asked or written. A file in a folder that syncs to iCloud Drive, Dropbox, Google Drive or OneDrive gets a warning, because the values would leave the Mac.
lk export shop/production --values --out .env.production.localIf the environment is linked to Vercel, GitHub, Railway or Fly, lk push shop/production sends the values directly. It asks every time, and production needs its own confirmation in the app. See Push to deployment platforms.
What this doesn't do
- A copy cannot be traced afterwards. The access log records "copied to the clipboard", never the values or where they went.
- Once pasted, the values live in the dashboard, outside Latchkey.
- Agents, Latchkey for Safari and requests forwarded over SSH cannot copy, (over SSH the clipboard would be on the other computer).
- Unconfirmed variables are noted on standard error; a reference to a missing item stops the copy.
The security page describes where protection ends, and the export reference lists every flag.