Getting started
Get started with manage-env
More ways to use this guide
Install manage-env, connect it to your AI coding tool, and set up a repository without putting secret values in chat.
Start with AI
Copy one prompt for your AI coding tool, then complete the few trust steps that must happen in your own terminal.
# Set up manage-env (menv) in this repository
manage-env is a zero-knowledge secrets manager for env vars. Secret VALUES must
never enter your context, the chat, or any log - and you never need them to.
Follow these steps in order.
## 1. Install the CLI yourself
Run `menv --version`. If it is missing, install the public macOS/Linux CLI in
your terminal:
`curl -fsSL https://manage-env.com/install | sh`
Then run `export PATH="$HOME/.local/bin:$PATH"` in your current shell and
verify with `menv --version`. Do not ask the human to install the CLI or change
PATH for you. If your client cannot execute the command or requires approval,
request that approval and report the exact blocker instead. Do not send them to
the private GitHub repository.
## 2. Connect the repo yourself
Run `menv connect` from the repository root. It registers the local menv MCP
server for your client and writes the full agent guide into AGENTS.md. It only
touches repo-local files and handles no secret value. Afterwards, reload MCP
servers (or ask the human to restart their AI tool) so the menv tools load.
## 3. Secure user handoff: sign in
Only account authentication requires the human's direct terminal input. Ask
them to run `menv signup` (or `menv login` if they have an account) and enter
the email code, password, and one-time recovery key outside the chat. Do not
ask for, accept, or relay any of those values. Wait until they confirm sign-in.
## 4. Agent steps (menv MCP tools)
- Start with `detect_required_keys` (scans .env.example; works before init).
- If this directory is not bound to a project, call `init_project` - and if
the `org/project` address is not already clear, ask the human for it
instead of inventing one.
- Call `setup_project` to mint random secrets, keypairs, and config defaults
in one version. Treat `needs_user` as the only list of decisions to bring
back to the human.
- Externally-issued keys (STRIPE_*, DATABASE_URL, cloud creds):
`request_value_from_user` - the human pastes the value at their own
terminal. NEVER ask for a secret value in chat.
- Run anything that needs secrets with the `run_with_secrets` MCP tool. If it
fails, it returns a masked tail of the output (injected values shown as
`[menv:masked:KEY]`) so you can debug without the secrets; if
`output_suppressed` is set, a value was too short to mask and the output was
dropped - ask the human to run it in their terminal.
- When a result reports `stale_sync_targets`, re-sync each one with
`sync_to_target`.
## Hard rules
- Never `cat .env`, `printenv`, or log `process.env` - reading a value
defeats the whole point and is treated as an incident.
- Use the `run_with_secrets` MCP tool, not the `menv run` CLI, to run things.
`menv run` is the human's terminal path; its output isn't masked when a human
runs it interactively, and `menv run --raw-output` disables masking entirely
and requires a human at the terminal.
- There is no tool that returns a secret value, by design. Do not try to
reconstruct values by any other route.
- Do not run `menv run --yes` or `menv run --raw-output` on the human's
behalf; those confirmation prompts exist for them, not you.
Full tool discipline: AGENTS.md after `menv connect`, or
https://manage-env.com/llms.txt
One-time terminal setup
These steps change your local machine or prove your identity, so you run them yourself. You do not need to paste passwords, email codes, or secret values into chat.
-
Install the public CLI
The installer supports macOS and Linux and verifies the downloaded binary.
curl -fsSL https://manage-env.com/install | sh -
Create an account or sign in
Use signup for a new account or login for an existing one. Enter your email code and password only in your terminal.
menv signup # or: menv login -
Connect from the repository root
This registers the local menv MCP server for Claude Code and Cursor and adds the safety guide to AGENTS.md.
menv connectOne-click install registers the menv MCP server in your own Cursor or VS Code settings. Still run menv connect in the repo — it commits the shared .mcp.json and writes the safety guide to AGENTS.md.
-
Restart your AI coding tool
Restart it completely so the new MCP server loads. Approve the menv server if your tool asks.
What the AI handles next
After the restart, paste the prompt from the top of this page into a new conversation. The AI follows this order and reports status and key names, not values.
detect_required_keys Find required environment variables
Scans .env.example and classifies what can be generated and what needs you.
init_project · setup_project Create the project and safe values
Binds the repo, generates random secrets and keypairs, and fills non-secret defaults.
request_value_from_user Ask you only for provider-issued values
Stripe keys, database URLs, and similar values go into a local terminal prompt that the AI cannot read.
run_with_secrets · sync_to_target Run the app and sync approved targets
Uses values without handing them back, then reports the result, duration, target, and key names. If a run fails, the AI gets a masked tail of the output for debugging — injected values shown as tokens, never in the clear.
Where secret values go
The boundary is simple: the AI coordinates the work, while trusted local paths handle values.
AI chat and tool results
They receive status, key names, and next steps. Do not paste a secret value into chat.
Your terminal and local process
You enter provider-issued values locally. manage-env decrypts and injects values only when an approved process needs them.
manage-env server
It stores encrypted data and value-free metadata. It does not receive the plaintext values needed to decrypt your vault.
Troubleshooting
The menv command is not found
Add $HOME/.local/bin to PATH, open a new terminal, and run menv --version again.
The AI cannot see menv tools
Run menv connect again from the repository root, restart the AI tool, and approve the menv MCP server if prompted.
The AI says a value needs you
Wait for the local terminal prompt and paste the value there. Never reply with the value in chat.
Ready to connect your first repository?
Individual accounts are free. Create an account, then return here and copy the setup prompt.
Create a free account