Appearance
Command line - sign in and environments
What it is for
The erp command works against one environment at a time, as you. This page shows how to point it at an environment, sign in, and check who you are, before you run anything else.
Steps
bash
erp env use dev --base-url https://app.example.com # name an environment and point at it
erp login # opens your browser to approve this computer
erp whoami # who you are, which tenant, which environment
erp env list # every environment you have set uperp loginuses the standard device-approval sign-in. Tokens are saved per environment in~/.erp/config.jsonand refresh themselves.- For a pipeline that cannot open a browser, set
ERP_TOKEN=<access token>. It overrides the saved sign-in. - To act on another tenant for one command, add
--tenant <id>. It only works where your own token is valid for that tenant too. erp logoutremoves the saved sign-in for the current environment.
Pull what the environment knows
bash
erp env sync # downloads schemas, the engine catalog, examples, docs and block lists into ~/.erp/cache/
erp env sync --check # only checks whether you are behindThe command line and the MCP server read this local copy, so they work offline and always match the environment you synced from.
Check the install
bash
erp --version
erp mcp install # writes the MCP server configuration into the current project folderWhat to know
- Everything runs with your own permissions. If an operation is refused, the message names the right you lack.
- Never put a password or token on the command line in a shared script. Use
ERP_TOKENfrom your pipeline's secret store.
