In order to switch to a different user or team account, most of our users currently take advantage of the now switch command in Now CLI.
With our latest Now CLI release, we are introducing a new --scope option and a scope configuration property. Both make it possible to deploy to a team or user account automatically, without the need for switching.

New Workflow Using Scope

Instead of using now switch each time you need to make a deployment to a different account, you can now make use of --scope in Now CLI, or the scope option within now.json.

Via Now CLI

We are deprecating the --team option and introducing a --scope option. --scope serves the same purpose as --team, while also reflecting that it could be used for setting a user account too, not just teams.
!

The `--team` option in Now CLI is now deprecated.

With the replacement option, you can deploy to a team using Now CLI as follows:
now --scope my-team

Via Config File

The newly added scope configuration property for the now.json file allows you to select a user or team account without having to supply an option to the command:
{
  "scope": "my-team"
}
Every time you invoke a Now CLI command, the scope property is considered. This applies not just to deployments when using now, but also to other commands such as now secrets ls.
IMPORTANT: When creating deployments using the GitHub or GitLab integration, the scope property is ignored for security reasons.

Supported Values

Both the command line option and the configuration property can be set to any one of the following values when selecting a user account:
  • ID of a user
  • Email address of a user
  • Username of a user
And any of these when selecting a team:
  • ID of a team
  • Slug of a team

Conclusion

Now that the --team option in Now CLI is deprecated, we highly recommend upgrading Now CLI to the latest version, and replacing all occurrences of --team in your workflows with --scope.
Should you have any further questions, please join our community forum or send us a direct message to support@zeit.co.