init
Write a .env.mxkey manifest listing every secret matching a group prefix.
mxkey init <group-prefix>Generates a .env.mxkey file in the current folder containing every secret
name that matches <group-prefix> exactly OR starts with <group-prefix>..
The manifest holds names only — no values. Safe to commit to git.
Example
cd ~/projects/myapp
mxkey init project.myapp
# wrote .env.mxkey with 3 name(s):
# project.myapp.stripe_secret_key
# project.myapp.database_url
# project.myapp.openai_api_keyThe resulting .env.mxkey:
# mxkey manifest for project.myapp
# Run: mxkey run-here -- <command>
# Regenerate any time with: mxkey init project.myapp
project.myapp.stripe_secret_key
project.myapp.database_url
project.myapp.openai_api_keyWhy a manifest
Three reasons:
- Discoverable —
cat .env.mxkeytells anyone on the project which secrets it needs. - Subdirectory-friendly —
run-herewalks up from any subfolder to find this file. - Source-of-truth checkable — your build / CI can compare
mxkey list project.myappagainst the manifest to catch drift.
Overwriting
If .env.mxkey already exists, mxkey init prompts to overwrite. Pass
through mxkey migrate and a manifest is written automatically the first
time (no overwrite of existing manifests).
See also
run-heremigrate— auto-writes a manifest after migrating- Project groups