スタートガイド
manage-env を始める
このガイドを AI で使う方法
manage-env をインストールして AI コーディングツールに接続し、シークレット値をチャットに入れずにリポジトリを設定する方法です。
AI から始める
AI コーディングツールにはプロンプトを 1 つコピーし、自分のターミナルでだけ必要な信頼設定を完了します。
# 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
初回だけのターミナル設定
ローカル環境の変更や本人確認を伴うため、自分で実行します。パスワード、メールコード、シークレット値をチャットに貼る必要はありません。
-
公開 CLI をインストール
macOS と Linux に対応し、ダウンロードしたバイナリを検証します。
curl -fsSL https://manage-env.com/install | sh -
アカウント作成またはログイン
新規なら signup、既存なら login を使います。メールコードとパスワードはターミナルにだけ入力します。
menv signup # または: menv login -
リポジトリのルートで接続
Claude Code と Cursor にローカル menv MCP サーバーを登録し、AGENTS.md に安全ルールを追加します。
menv connectワンクリック登録は自分の Cursor・VS Code 設定に menv MCP サーバーを追加します。リポジトリでの menv connect も実行してください — チームと共有する .mcp.json と AGENTS.md の安全ガイドはそこで作成されます。
-
AI コーディングツールを再起動
新しい MCP サーバーを読み込むため完全に再起動し、求められたら menv サーバーを承認します。
ここからは AI が進めます
再起動後、このページ上部でコピーしたプロンプトを新しい会話に貼ります。AI は値ではなく状態とキー名だけを報告します。
detect_required_keys 必要な環境変数を検出
.env.example を読み、自動生成できるものと人が決めるものを分類します。
init_project · setup_project プロジェクトと安全な値を作成
リポジトリを紐付け、ランダムシークレットやキーペア、非秘密の既定値を作ります。
request_value_from_user 外部発行の値だけ人に依頼
Stripe キーや DB URL は AI が読めないローカルターミナルで入力します。
run_with_secrets · sync_to_target アプリ実行と承認済み同期
値を返さずに使用し、結果、時間、対象、キー名だけを報告します。
シークレット値はどこへ行く?
AI は作業を調整し、値は信頼されたローカル経路だけで扱います。
AI チャットとツール結果
状態、キー名、次の手順だけを受け取ります。シークレット値をチャットに貼らないでください。
自分のターミナルとローカルプロセス
外部発行の値はローカルで入力し、承認したプロセスが必要な時だけ復号して注入します。
manage-env サーバー
暗号化データと値を含まないメタデータだけを保存し、金庫を開ける平文値は受け取りません。
トラブルシューティング
menv コマンドが見つからない
$HOME/.local/bin を PATH に追加して新しいターミナルを開き、menv --version を再実行します。
AI に menv ツールが表示されない
リポジトリのルートで menv connect を再実行し、AI ツールを再起動して menv MCP サーバーを承認します。
AI が自分で入力する値を求めている
ローカルターミナルの入力欄に貼り付けます。チャットに値で返信しないでください。
最初のリポジトリを接続しますか?
個人アカウントは無料です。アカウントを作成し、このページに戻って設定プロンプトをコピーしてください。
無料アカウントを作成