Install Spotter CLI
Spotter CLI is easy to use and install. It’s available as a steampunk-spotter Python package, but you will need at least Python 3 to install it.
pip install steampunk-spotter
Copied!Once you’ve got the CLI up and running, you can easily check out its commands and optional arguments. Just type in spotter –help
to see all the info you need. And remember, you can use --help or –h
with any command too. Just type in spotter –help/-h < your command>
.
Authenticate
When you use CLI, you’ll need to provide your Steampunk Spotter credentials in one of two ways:
1. Your username and password:
spotter --username <username> --password <password> scan playbook.yml
Copied!2. API token:
To create and manage tokens, visit the Steampunk Spotter app , open the top-right account menu, click My Settings and switch to the API tokens tab. See how .
spotter --token <api-token> scan playbook.yml
Copied!Hint
To avoid inserting your credentials every time you use Spotter CLI, use spotter login command and your credentials will be saved in your profile until you log out.
spotter --token <api-token> login
Copied!If you want to log out of your Spotter user account right from the CLI, you can simply use the spotter logout
command. This will handle getting rid of the authentication tokens for the Spotter API that you’re currently using. These tokens are usually stored in a folder called ~/.config/steampunk-spotter
.
And that’s it, you’re good to start scanning!