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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

steampunk_spotter-6.4.0a1-py3-none-win_amd64.whl (5.7 MB view details)

Uploaded Python 3Windows x86-64

steampunk_spotter-6.4.0a1-py3-none-musllinux_1_2_x86_64.whl (5.5 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

steampunk_spotter-6.4.0a1-py3-none-musllinux_1_2_aarch64.whl (5.0 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

steampunk_spotter-6.4.0a1-py3-none-manylinux_2_17_x86_64.whl (5.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

steampunk_spotter-6.4.0a1-py3-none-manylinux_2_17_aarch64.whl (5.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

steampunk_spotter-6.4.0a1-py3-none-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

steampunk_spotter-6.4.0a1-py3-none-macosx_10_9_x86_64.whl (5.6 MB view details)

Uploaded Python 3macOS 10.9+ x86-64

File details

Details for the file steampunk_spotter-6.4.0a1-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for steampunk_spotter-6.4.0a1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 a7e190abfe66caca2b7dfb6cbc6877c43239cc5fcf1932dbf5eb2cdfaf8f2a70
MD5 4c203f5fb2d9aa6dd8e319ea73db516a
BLAKE2b-256 3bc6aacd4795e7941b6e2f2f9dd1af76cfd1e5f76bcb56dede0e93ce1e159abd

See more details on using hashes here.

File details

Details for the file steampunk_spotter-6.4.0a1-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for steampunk_spotter-6.4.0a1-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e6c57d32b1f05cdefa053b7d90fba18731548385478741125b36d1fddb8d9071
MD5 3b7038682a4b9c9641400bf3ff413393
BLAKE2b-256 7b970132a928c1886e87e6a3640099a30d550fc6789555a2652444342335c959

See more details on using hashes here.

File details

Details for the file steampunk_spotter-6.4.0a1-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for steampunk_spotter-6.4.0a1-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 3d03871552351b9a37bc311c156b928fa2bd26ecbc68b5082e93fa7ed2351aae
MD5 8c8e2a7ea001516d55d32a0667c85b8c
BLAKE2b-256 890b499c88e01240b5a6ccc6a9e93dccd26f31d1ba7fa82c412d4deed5f05552

See more details on using hashes here.

File details

Details for the file steampunk_spotter-6.4.0a1-py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for steampunk_spotter-6.4.0a1-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 43ca4030dff952669957f2fc68a3fcafe470124d6eaf8d9be7360d82fdb7396f
MD5 0b2c80f0ff1dcde0905217f459daaa9a
BLAKE2b-256 3fcc32c9e5c81d29d21f8b87d718d68986ec94d22441ac41810c22bf1fef12b0

See more details on using hashes here.

File details

Details for the file steampunk_spotter-6.4.0a1-py3-none-manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for steampunk_spotter-6.4.0a1-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 2730d0dd35d9ef54cd63e222f344c56b6d831dbf00545a42eed71bd1e23c5233
MD5 4ab9a660542d5c989ce25cb77913d44f
BLAKE2b-256 9df193dd3fe6993194b865514bbb261a95074cb4ce72fa592331e9e26a6b87fa

See more details on using hashes here.

File details

Details for the file steampunk_spotter-6.4.0a1-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for steampunk_spotter-6.4.0a1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d193e09328dfc5b9a748e7ff01c0f88476564685057c91469fe7778092cdaa37
MD5 e54046f8964f7492fd36bfe2b4ea9042
BLAKE2b-256 87ea25e8d54c673ec3043a671ecc46273ff22b4985672f908e9ab6e6e9fa2f4e

See more details on using hashes here.

File details

Details for the file steampunk_spotter-6.4.0a1-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for steampunk_spotter-6.4.0a1-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 79651ebc999b2c49de3b89f2495303b692ce3c5b4efbda20991739e01f03c64f
MD5 ea4bef563743ae25dad636c6d21bce0e
BLAKE2b-256 0e7453b10c7459c23b3bf5f3550bc0baceb0e7709c9c49802c36f01cb5639c27

See more details on using hashes here.

Release history Release notifications | RSS feed

6.4.1

7 files

6.4.0

7 files

This release

6.4.0a1 This release

7 files

6.3.0

7 files

6.1.0

7 files

6.0.0

7 files

5.12.0

7 files

5.11.0

1 file

5.10.0

1 file

5.9.0

1 file

5.8.0

1 file

5.7.0

1 file

5.6.0

1 file

5.5.1

1 file

5.5.0

1 file

5.4.0

1 file

5.3.0

1 file

5.2.1

1 file

5.2.0

1 file

5.1.1

1 file

5.1.0

1 file

5.0.0

1 file

4.4.1

1 file

4.4.0

1 file

4.3.0

1 file

4.2.0

1 file

4.1.0

1 file

4.0.0

1 file

3.3.0

1 file

3.2.0

1 file

3.1.1

1 file

3.1.0

1 file

3.0.0

1 file

2.6.0

1 file

2.5.0

1 file

2.4.0

1 file

2.3.0

1 file

2.2.0

1 file

2.1.0

1 file

2.0.3

1 file

2.0.2

1 file

2.0.1

1 file

2.0.0

1 file

1.2.8

1 file

1.2.7

1 file

1.2.6

1 file

1.2.5

1 file

1.2.4

1 file

1.2.3

1 file

1.2.2

1 file

1.2.1

1 file

1.2.0

1 file

1.1.10

1 file

1.1.9

1 file

1.1.8

1 file

1.1.7

1 file

1.1.6

1 file

1.1.5

1 file

1.1.4

1 file

1.1.3

1 file

1.1.2

1 file

1.1.1

1 file

1.1.0

1 file

1.0.1

1 file

1.0.0

1 file

0.8.3

1 file

0.8.2

1 file

0.8.1

1 file

0.8

1 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