Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Steampunk Spotter Command-Line Interface (CLI)

PyPI

Steampunk Spotter is an Ansible Playbook Platform that scans, analyzes, enhances, and provides insights for your playbooks.

The Steampunk Spotter CLI enables the use from the console with the ability to scan Ansible content such as playbooks, roles, collections, or task files.

The following instructions explain how to get started with the Steampunk Spotter CLI to scan Ansible content and get recommendations.

Installation

Steampunk Spotter CLI requires Python 3 and is available as a steampunk-spotter Python package.

$ pip install steampunk-spotter

We recommend installing the package into a clean Python virtual environment.

Usage

After the CLI is installed, you can explore its commands and options by running spotter --help. The --help/-h option is also available for every command.

Limitations

The current release version of Steampunk Spotter contains the following limitations that also apply to the CLI:

  • with the FREE subscription plan, you can perform up to 100 scans/month,
  • with the INDIVIDUAL, TEAM, or ENTERPRISE subscription plan you can perform an unlimited number of scans,
  • for the ENTERPRISE subscription plan, contact us at steampunk@xlab.si to discuss your needs.

Authentication

To use CLI, you have to supply your Steampunk Spotter user account credentials. If you don't have an account, use spotter register command that will direct you to the page where you can create one.

Steampunk Spotter supports two kinds of credentials: 1) API token (can be generated in the user settings within the Spotter App), and 2) username and password.

  • Use --token/-t global option to supply your token credential. Alternatively, set the SPOTTER_TOKEN environment variable to contain the API token.
  • Use --username/-u and --password/-p global options to supply your username and password. Alternatively, set the SPOTTER_USERNAME and SPOTTER_PASSWORD environment variables.
  • You can run spotter <options> login to persist your credentials in the Steampunk Spotter CLI's local storage, where <options> stand for one of the approaches described above.

After that, you can start scanning right away.

Scanning

The CLI spotter scan command is used for scanning Ansible content (playbooks, roles, collections, or task files) and returning the scan results.

Ansible content

The scan command will automatically detect the type of your Ansible content and scan it. Here are some examples of running scans:

# scan playbook
$ spotter scan path/to/playbook.yaml

# scan multiple files at once
$ spotter scan path/to/taskfile.yaml \
               path/to/playbook.yaml \
               path/to/role \
               path/to/collection

# scan any folder that contains Ansible content
$ spotter scan path/to/folder

Selecting the target project

This part is only relevant for users with a TEAM plan or higher.

By default, the scan results are stored in the first project of the user's first organization (in the app).

Users that have multiple organizations or projects in the app can use --project-id option to specify the UUID of an existing target project, where the scan result will be stored.

$ spotter scan --project-id <project-id> .

You can learn your project id by logging into the app, selecting the appropriate organization and navigating to the project's dashboard.

Excluding values

By default, CLI parses full Ansible YAML content with all values from playbooks (e.g., parameter values from Ansible modules, variables from Ansible plays, etc.). With values, we can discover additional tips for improvements. CLI will try to detect and omit any secrets (e.g., passwords, SSH keys, cloud credentials, etc.) from being transmitted. If you want to omit parsing and sending the values, you can use --exclude-values option.

$ spotter scan --exclude-values playbook.yaml

Excluding metadata

By default, CLI collects metadata (i.e., file names, line, and column numbers, YAML markers) from Ansible content. This is needed for enriched user experience in the Spotter App and to get additional tips for improvements. If you want to use metadata just for displaying the scan output, which means that no data about your Ansible content structure is sent to the backend server, you can use --exclude-metadata option.

$ spotter scan --exclude-metadata playbook.yaml

Automated application of suggestions to your code

There is also a --rewrite option that rewrites your files with fixes after scanning. This action will modify your files.

$ spotter scan --rewrite playbook.yaml

Next steps

For more comprehensive usage, issue spotter scan --help. Please refer to Steampunk Spotter Documentation for further instructions.

Acknowledgment

This tool was created by XLAB Steampunk, IT automation specialists and leading experts in building Enterprise Ansible Collections.

Release files for steampunk-spotter 6.5.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for steampunk-spotter 6.5.0a1
File
steampunk_spotter-6.5.0a1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
steampunk_spotter-6.5.0a1-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details
steampunk_spotter-6.5.0a1-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details
steampunk_spotter-6.5.0a1-py3-none-manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
steampunk_spotter-6.5.0a1-py3-none-manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
steampunk_spotter-6.5.0a1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
steampunk_spotter-6.5.0a1-py3-none-macosx_10_9_x86_64.whl Python 3 none macOS 10.9+ x86-64 Details

Total release size: 37.6 MB

Release files / steampunk_spotter-6.5.0a1-py3-none-win_amd64.whl

Download URL steampunk_spotter-6.5.0a1-py3-none-win_amd64.whl
Size 5.7 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
6e0f4036f516bf545d5f939550433e6932e418a77db88f4f042960bbff691530
BLAKE2b-256 checksum
How to use checksums
896ce8dac10a073b2081b67a3ee380c63a0a453a2bcab19e6f91f387c7b7d78e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.14

Release files / steampunk_spotter-6.5.0a1-py3-none-musllinux_1_2_x86_64.whl

Download URL steampunk_spotter-6.5.0a1-py3-none-musllinux_1_2_x86_64.whl
Size 5.5 MB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
90e450a7d10d14bb753eca7439c8f4b812d5d12b6dec13d113b8c14d1128aa50
BLAKE2b-256 checksum
How to use checksums
bdb21bdee58f7c150d6696cbd22aef827131f620e4b9a867ca6b0166b1488a1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.14

Release files / steampunk_spotter-6.5.0a1-py3-none-musllinux_1_2_aarch64.whl

Download URL steampunk_spotter-6.5.0a1-py3-none-musllinux_1_2_aarch64.whl
Size 5.0 MB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
06ec74da35ff1d368dede8384c6c7e49981e748eb90f0b3c8487b669aab022d0
BLAKE2b-256 checksum
How to use checksums
79a5e131709c3bbd278eff02e288bf64673458ec469b5d1235849a12080fd237
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.14

Release files / steampunk_spotter-6.5.0a1-py3-none-manylinux_2_17_x86_64.whl

Download URL steampunk_spotter-6.5.0a1-py3-none-manylinux_2_17_x86_64.whl
Size 5.5 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
07bfe22517aa09bd08a003ada8e6ae92ea22ef8bcb9d90eaceedda90d56ea169
BLAKE2b-256 checksum
How to use checksums
f08caa161ccbc22db14950af2b462e28cc4e771fdd7192246b6362fca31043df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.14

Release files / steampunk_spotter-6.5.0a1-py3-none-manylinux_2_17_aarch64.whl

Download URL steampunk_spotter-6.5.0a1-py3-none-manylinux_2_17_aarch64.whl
Size 5.0 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
1553ebe24814bdfc630ff110efb7237fb78937566bd1724909c1f2f3de51f08a
BLAKE2b-256 checksum
How to use checksums
a9b06a25c2ff18d66f1791d429905f8c00d7d7371d2d5ae4d51ef8bca880594a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.14

Release files / steampunk_spotter-6.5.0a1-py3-none-macosx_11_0_arm64.whl

Download URL steampunk_spotter-6.5.0a1-py3-none-macosx_11_0_arm64.whl
Size 5.2 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
71cb6f8493c9355b683fe2a26e87d3a4d2f869e512698f8931b30babca7086cd
BLAKE2b-256 checksum
How to use checksums
937326d1d551e3a2eb5a1a9592428a9a1271182f11371b7723d49521ea43f20a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.14

Release files / steampunk_spotter-6.5.0a1-py3-none-macosx_10_9_x86_64.whl

Download URL steampunk_spotter-6.5.0a1-py3-none-macosx_10_9_x86_64.whl
Size 5.6 MB
Tags Python 3 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
f76638e3b36673ee4b10d1c1d617b16528c854a1c3d04270261c20d173bbd35d
BLAKE2b-256 checksum
How to use checksums
e47252a23494f25ce8d97c6467525f742d13808ccb304e0e0898dec038b68c8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.14

Release history Release notifications | RSS feed

6.5.0

7 release files

This release

6.5.0a1 This release

7 release files

6.4.1

7 release files

6.4.0

7 release files

6.3.0

7 release files

6.1.0

7 release files

6.0.0

7 release files

5.12.0

7 release files

5.11.0

1 release file

5.10.0

1 release file

5.9.0

1 release file

5.8.0

1 release file

5.7.0

1 release file

5.6.0

1 release file

5.5.1

1 release file

5.5.0

1 release file

5.4.0

1 release file

5.3.0

1 release file

5.2.1

1 release file

5.2.0

1 release file

5.1.1

1 release file

5.1.0

1 release file

5.0.0

1 release file

4.4.1

1 release file

4.4.0

1 release file

4.3.0

1 release file

4.2.0

1 release file

4.1.0

1 release file

4.0.0

1 release file

3.3.0

1 release file

3.2.0

1 release file

3.1.1

1 release file

3.1.0

1 release file

3.0.0

1 release file

2.6.0

1 release file

2.5.0

1 release file

2.4.0

1 release file

2.3.0

1 release file

2.2.0

1 release file

2.1.0

1 release file

2.0.3

1 release file

2.0.2

1 release file

2.0.1

1 release file

2.0.0

1 release file

1.2.8

1 release file

1.2.7

1 release file

1.2.6

1 release file

1.2.5

1 release file

1.2.4

1 release file

1.2.3

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.10

1 release file

1.1.9

1 release file

1.1.8

1 release file

1.1.7

1 release file

1.1.6

1 release file

1.1.5

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.8.3

1 release file

0.8.2

1 release file

0.8.1

1 release file

0.8

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page