Install Spyctl CLI

Spyctl, an open source CLI tool, allows you to view and manage resources within your Spyderbat environment.

Source code: https://github.com/spyderbat/spyctl

The initial step in utilizing any software package is ensuring its correct installation, so let's get started by walking through the installation process for Spyctl.

Prerequisites

  • Python 3.8 or newer

Installation Command

To install spyctl globally requires the pipx utility.

sudo apt install pipx

Install spyctl using pipx.

pipx install spyctl

Verify the installation.

spyctl --version

Alternatively, you can use a virtual environment to install spyctl.

python -m venv spyctl
source spyctl/bin/activate
pip install spyctl

Verify the installation.

spyctl --version

Note: depending on your system, you may need to use python3 or instead of python. If you go the virtual environment route, you may need to install virtualenv first.

apt install python3.X-venv

Where python3.X is the version of python you have installed.

Enabling Shell Completion

To enable shell completion, follow these steps:

The default version of Bash for Mac OS X users does not support programmable shell completion. Guides like this will help you install a newer version of Bash.

Create the Spyctl directory if you haven’t already.

mkdir -p ~/.spyctl

Generate the shell completion script.

_SPYCTL_COMPLETE=bash_source spyctl > ~/.spyctl/spyctl-complete.bash

Add the following line to the end of ~/.bashrc.

. ~/.spyctl/spyctl-complete.bash

After modifying the shell config, you need to start a new shell in order for the changes to be loaded.

Last updated

Was this helpful?