How to organise developer secrets without losing them

Every developer has been there: a deployment fails because a key is missing, a teammate asks for a staging token, and you spend twenty minutes searching Slack, old .env files, and a password manager that was never designed for code.

The problem is not that you are careless. The problem is that most tools were built for consumers, not for the way developers work.

The right structure: project, then environment

Credentials should be organised in two levels:

  1. Project — the application, client, or service the credential belongs to.
  2. Environment — local, staging, testing, or production.

This mirrors how code is deployed. When you open a project, you see only the credentials relevant to that project. When you switch environments, you see only the values for that stage.

What belongs in a developer vault

A dedicated secrets workspace should hold:

  • API keys and bearer tokens
  • SSH keys and deployment certificates
  • Database passwords and connection strings
  • OAuth client secrets
  • Environment variables and .env files
  • Service account credentials

Keep everything in one place instead of spreading it across password managers, notes, browser bookmarks, and chat history.

Habits that prevent leaks

  • Name entries by service and purpose. “Stripe — production” is clearer than “stripe_key_final_v2”.
  • Rotate on departure. When someone leaves a project, rotate every credential they had access to.
  • Separate environments. Never paste a production key into a local config. Keep them visually distinct.
  • Export carefully. Generate .env files on demand, but do not commit them.

Search is the killer feature

Once everything is in one workspace, search becomes the fastest way to work. A good vault lets you find any value by project name, service, or environment in seconds — without opening five different apps.

Most credential search problems are really naming problems. If every key is called key1 or prod_secret, no search index can save you. Search only pays off once the underlying data is organised, which is why structure has to come first and search second.

A simple migration plan

Reorganising a mess of scattered credentials feels like a big job, but it does not have to happen all at once. A practical order:

  1. Start with production. These are the credentials that cause the most damage if lost or leaked, so move them first.
  2. Then staging and local. Lower stakes, but still worth consolidating so you stop context-switching between tools.
  3. Then everything else. SSH keys, service accounts, and one-off API tokens can be swept in as you encounter them.

You do not need a “big bang” migration. Every credential you move out of a sticky note or a random text file is a credential that is now findable instead of lost.

Common mistakes teams make

  • Treating the vault as a dumping ground. Adding entries without categorising them by project or environment just recreates the original mess in a new tool.
  • Sharing one login for everything. A single shared master password with no per-project separation means everyone can see everything, which defeats the purpose of organisation.
  • Skipping descriptions. A credential named correctly but with no note about what it unlocks or when it expires still costs time later. A short description saves the next person — often future you — from guessing.
  • Never revisiting old entries. Vaults accumulate stale credentials the same way inboxes accumulate unread mail. Set a recurring reminder to prune anything tied to a decommissioned service.

What good organisation looks like in practice

A well-organised vault should let you answer three questions in under ten seconds each: what credentials does this project use, which environment is this value for, and when was it last rotated. If any of those takes longer than a search bar and a glance, the structure needs work, not more tooling.

Bottom line

Developers do not need another password manager. They need a workspace built around projects and environments. Organise once, name things clearly, prune regularly, and search becomes the fast, reliable habit it was always meant to be — instead of a last resort after Slack and old .env files have failed you.