run-here
Walk up to the nearest .env.mxkey and run a command with every listed secret loaded.
mxkey run-here -- <command>
mxkey here -- <command> # aliasFrom any folder, walks up the directory tree to find the nearest
.env.mxkey, parses the names listed there, and hands off to
mxkey run with all of them.
Example
Project structure:
~/projects/myapp/
├── .env.mxkey # contains 3 names
└── services/
└── api/
└── package.json # cwdcd ~/projects/myapp/services/api
mxkey run-here -- pnpm devWalks up: services/api/ → services/ → myapp/ → finds .env.mxkey,
loads the 3 secrets, runs pnpm dev with them in the env.
Manifest format
Plain text. One name per line. # starts a comment. Blank lines ignored.
# project.myapp manifest
project.myapp.stripe_secret_key
project.myapp.database_url
project.myapp.openai_api_keyErrors
| Error | Cause |
|---|---|
error: no .env.mxkey found from <pwd> upwards | No manifest exists in the current folder or any parent. Run mxkey init <prefix> to create one. |
error: .env.mxkey is empty (no names) | Manifest exists but has no name entries (only comments / blanks). |
error: <name> not in index | Manifest references a name that's no longer in mxkey. Re-run mxkey init <prefix> to regenerate. |