How to select the organization to use in the CLI
When you run commands with the CLI such as
snyk test, Snyk uses your default organization, which was created when you first registered for an account. If you want commands to run against a different organization, you can specify that organization either globally or individually.
Note: The Snyk CLI help specifies using
--org=<ORG_ID>; this article specifies using the
ORG_IDworks in both the CLI and the API. The organization slug name works in the CLI, but not in the API.
snyk config set org=orgslugname. Note:
orgslugnamemust match the slug name as displayed in the URL of your org in the Snyk UI:
To override this global configuration for individual runs, specify the org as follows:
snyk monitor --org=orgslugnameor
snyk test --org=orgslugname.
$ snyk test --org=my-team
Last modified 2mo ago