First, using studio, you need to create a user on your endpoint for API access. The instructions to do that are in the response Connect to Stardog Endpoint using Stardog CLI
Then install the CLI CLI Installation | Stardog Documentation Latest
Thanks
Joe