It is possible to invoke commands that require authentication without logging into a user account by using API tokens. This is especially useful when automating actions such as deploys or sharing a Modulus project with multiple developers without sharing a user name and password.
First, log into your account using the command line interface and create an API token. Once you have created an API token for your account, you may use this token in place of logging in by exposing it as an environment variable (MODULUS_TOKEN).
$ MODULUS_TOKEN=API-TOKEN modulus deploy Welcome to Modulus You are logged in as spiderman [?] Are you sure you want to use project Lizard Locator? (yes) ...
The MODULUS_TOKEN environment variable may be used with any command that requires authentication.
Go to top