Spyderbat
Book a DemoStart FreeContact Us
  • Spyderbat Product Docs
  • Getting Started
    • Create an Organization
    • Install the Nano Agent
    • Three Things to Try with Spyderbat Community Edition
    • Manage Users and Roles
  • Installation
    • Spyderbat Nano Agent
      • Kubernetes
        • Pre Deployment Environment Data Collection Script
      • Linux Standalone
      • AWS Unattended Install
        • Secure your Registration Code with AWS Secrets Manager
      • Create a Golden Image with the Nano Agent Pre-Installed
    • Spyderbat AWS Agent
      • AWS Linux VM
      • Kubernetes
      • Configuration Guide - AWS Linux VM
      • Configuration Guide - Kubernetes
    • Install Spyctl CLI
      • Initial Configuration
    • Install Spydertop CLI
    • Install the Spyderbat Event Forwarder
      • Helm Chart
      • Traditional Installer
  • Concepts
    • Guardian & Interceptor
      • Ruleset Policies
      • Workload Policies
    • Flashback (Go Back In Time)
      • Investigations
    • Search
      • Saved Searches
    • Summarize
      • Spydertrace Summarize
    • Dashboards
      • Dashboard Categories
    • Reports
    • Notifications
      • Notification Targets
      • Notification Templates
    • Actions
    • Integrations
      • AWS Integration
      • Spyderbat Event Forwarder
    • Suppression & Tuning
    • Scout (Detections)
      • Custom Flags
  • Tutorials
    • Flashback
      • How to Use the Investigations Feature in Spyderbat
    • Guardian
      • How to Lock Down Your Workloads With Guardian Policies Using Spyctl
      • How to Put Guardrails Around Your K8s Clusters Using Spyctl
    • Integrations
      • How to Configure Event Forwarder Webhook for Panther
      • How to Set Up Spyderbat to Ingest Falco Alerts
      • How to Create and Use a Spyderbat API Key
    • Notifications
      • How to Set Up Notifications Using Spyctl
      • How to Set up Agent-Health Notifications Using Spyctl
    • Dashboards
    • Miscellaneous
      • How to Set Up Spyderbat to Monitor Systems From vulnhub.com
    • Scout (Detections)
      • How to Set Up Custom Flags Using Spyctl CLI
  • Reference
    • Policies
      • Response Actions
    • Rulesets
    • Selectors
    • Notifications
    • Spyctl CLI
      • Spyctl Commands
      • Guardian Policy Management using Spyctl
      • Notification Template Management using Spyctl
      • Notification Target Management using Spyctl
    • Search
      • All Operators
      • All Fields
      • All Related Objects
  • Quick Links
    • Contact Us
    • Try Spyderbat for Free
    • Book a Demo
Powered by GitBook

© SPYDERBAT, Inc., All Rights Reserved

On this page
  • Prerequisites
  • Installation Command
  • Enabling Shell Completion

Was this helpful?

Export as PDF
  1. Installation

Install Spyctl CLI

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

Last updated 2 months ago

Was this helpful?

Source code:

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.

To install Spyctl, simply run this command in your terminal of choice:

pip install spyctl

To verify the installation:

spyctl --version

Enabling Shell Completion

To enable shell completion, follow these steps:

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

Generate and save the shell completion script.

_SPYCTL_COMPLETE=fish_source spyctl > ~/.config/fish/completions/spyctl-complete.fish

Create the Spyctl directory if you haven’t already.

mkdir -p ~/.spyctl

Generate the shell completion script.

_SPYCTL_COMPLETE=zsh_source spyctl > ~/.spyctl/spyctl-complete.zsh

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

. ~/.spyctl/spyctl-complete.zsh

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

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

https://github.com/spyderbat/spyctl
this