Skip to main content

Installing sloctl

Reading time: 0 minute(s) (0 words)

This guide provides platform-specific instructions for installing sloctl.

MacOS

  1. Install Homebrew if required.
  2. Run the following commands in your terminal:
        brew tap nobl9/sloctl
    brew install sloctl
💡Homebrew unsupported macOS version resolution

If you encounter a Homebrew error, such as:
Error: unknown or unsupported macOS version: :dunno

Resolve it by running
brew update-reset

  1. Verify that sloctl is installed correctly:
    sloctl version # Displays the installed version of sloctl

Windows

  1. Download the sloctl binary file from the sloctl releases page.
  2. Create the /nobl9/ folder in the following locations:
    • Admin users in C:\Program Files\
    • Non-admin users in your user directory
  3. Rename the binary to sloctl.exe.
  4. Move sloctl.exe to your created directory (Step 2).
  5. Verify that sloctl is installed correctly:
      sloctl version # Displays the installed version of sloctl

After completing these steps, admin users have sloctl properly installed and ready for configuring.

When you're installing sloctl as a non-admin user, add sloctl to the system path to finish installation:

  1. Go to Control Panel > System and Security > System.
  2. Click Advanced System Settings > Environment variables.
  3. Select Path for User variables (or for System Variables, when this section is available).
  4. Click Edit. Add the directory path where you placed sloctl.exe and save your changes.
  5. Verify that sloctl is installed correctly:
      sloctl version # Displays the installed version of sloctl

Linux

  1. Download the sloctl binary file from the sloctl release page.
  2. Move the binary file to a directory included in your $PATH, like /usr/local/bin.
  3. Rename the binary file to sloctl.
  4. Type sloctl in your terminal to run the program.
  5. Verify that sloctl is installed correctly:
      sloctl version # Displays the installed version of sloctl
💡Permission errors on Linux

If you encounter file permission issues, ensure your sloctl binary has executable permissions.

You can run chmod +x sloctl to add execute permissions to the file. Alternatively, use other chmod option.

Go

  1. Install the latest version of sloctl:
    go install github.com/nobl9/sloctl/cmd/sloctl@latest
  2. Verify installation.
    Ensure the $GOPATH/bin directory is included in your system's $PATH. If not, add it with this example command:
    export PATH=$PATH:$(go env GOPATH)/bin
  3. Verify that sloctl is installed correctly:
      sloctl version # Displays the installed version of sloctl

Docker

  1. Pull the latest sloctl image from the repository:
    docker pull nobl9/sloctl
  2. Build the Docker image:
    Replace <IMAGE_NAME> with your preferred image name
    docker build -t <IMAGE_NAME>.
  3. To use environment variables for authentication, set them following the configuration guide.
  4. Run the image:
    docker run
    -e SLOCTL_CLIENT_ID=$SLOCTL_CLIENT_ID \
    -e SLOCTL_CLIENT_SECRET=$SLOCTL_CLIENT_SECRET \
    <IMAGE_NAME> get slos --no-config-file
  5. Verify that sloctl is installed correctly:
      sloctl version # Displays the installed version of sloctl