First-party command-line client for erxes.
Node.js 20 or newer is required.
npm install --global --install-links erxes/erxes-cli--install-links makes npm copy the GitHub package instead of linking its temporary clone.
Confirm the installation:
erxes version
erxes --helpRe-run the install command to update to the latest default-branch revision.
Create a public OAuth client in erxes and enable these public operations:
core.contacts.customers.list.v1core.contacts.customers.detail.v1core.contacts.customers.create.v1
Then authenticate using the OAuth device flow:
erxes login \
--host https://your-erxes-host \
--client-id <generated-client-id>Use --no-browser when the CLI should only print the verification URL and code.
Named profiles support multiple erxes installations:
erxes --profile production login --host https://example.com --client-id <id>
erxes --profile production whoamierxes contacts list
erxes contacts list --limit 25 --search customer@example.com
erxes contacts get <customer-id>
erxes contacts create --first-name Jane --last-name Doe --email jane@example.comAdd --json to any data command for machine-readable output:
erxes --json contacts listERXES_HOST— default gateway URL for loginERXES_CLIENT_ID— default public OAuth client IDERXES_TOKEN— OAuth access token for non-interactive commands; use withERXES_HOSTERXES_CONFIG_DIR— override the configuration directory
Profile configuration and OAuth credentials are stored separately. On Unix-like systems the configuration directory uses mode 0700 and credential files use mode 0600.
MIT