# pcenv > Local, encrypted vault for app configs and secrets. Switches a repo's .env file between environments with one command (`pcenv use staging`). Agent-safe: agents can switch envs and run commands with secrets injected, but never see values. Install (macOS/Linux): curl -fsSL https://pcenv.pogi.codes/install.sh | sh -s -- --yes Install (Windows): irm https://pcenv.pogi.codes/install.ps1 | iex Then: pcenv doctor --json, and follow its `fix` fields. Exit 5 = ask the user: they must run `pcenv init` themselves the first time (master password + a recovery phrase you must not see), and `pcenv unlock` whenever pcenv is locked. Never ask for the password. Agent commands (all support --json): pcenv status, pcenv ls, pcenv use ENV, pcenv add KEY, pcenv run ENV -- CMD, pcenv init, pcenv doctor [--fix]. Human-only (exit 4 for agents; ask the user): pcenv get, history, rollback, export, import, recover, and switching to protected envs like prod. Never pass secret values as arguments. Never hand-edit the "# >>> pcenv >>>" block. ## Docs - [Agent install guide](https://github.com/pogicodes/pcenv/blob/main/INSTALL.md): step-by-step, with what to do on each exit code - [README](https://github.com/pogicodes/pcenv/blob/main/README.md): commands, env file format, security model - [Spec](https://github.com/pogicodes/pcenv/blob/main/SPEC.md): full design