Skip to main content

Manual install

macOS manual install#

  1. Download the tarball using the curl command. The -o option specifies the file name that the downloaded tarball is written to. In this example, the file is written to snip.tar.gz in the current folder.
$ curl -L https://github.com/sniptt-official/snip-cli/releases/download/v0.0.40/snip-macos-x64.tar.gz -o snip.tar.gz

NOTE: You can install to any folder, or choose the recommended /usr/local/snip-cli.

To verify the integrity of the tarball, run the following command and check that the output matches the one on the relevant release page.

$ sha256sum snip.tar.gz
  1. Extract the binary.
$ tar -xf snip.tar.gz
  1. Create a symlink to the user's bin folder.
$ sudo ln -sf snip /usr/local/bin/snip

NOTE: You must have write permissions to the specified folder. Creating a symlink to a folder that is already in your path eliminates the need to add the install folder to the user's $PATH variable.

  1. Verify the installation.

Assuming /usr/local/bin is on your PATH, you can now run:

$ snip --version

Uninstall#

  1. Find the folder that contains the symlink to the main binary.
$ which snip/usr/local/bin/snip
  1. Using that information, run the following command to find the installation folder that the symlink points to.
$ ls -l /usr/local/bin/sniplrwxr-xr-x  1 user  admin  4  4 Jun 16:20 /usr/local/bin/snip -> /folder/installed/snip-cli/snip
  1. Delete the symlink in the first folder. If your user account already has write permission to this folder, you don't need to use sudo.
$ sudo rm /usr/local/bin/snip
  1. Delete the main installation folder.
$ rm -rf /folder/installed/snip-cli

Linux manual install#

  1. Download the tarball using the curl command. The -o option specifies the file name that the downloaded tarball is written to. In this example, the file is written to snip.tar.gz in the current directory.
$ curl -L https://github.com/sniptt-official/snip-cli/releases/download/v0.0.40/snip-linux-x64.tar.gz -o snip.tar.gz

NOTE: You can install to any directory, or choose the recommended /usr/local/snip-cli.

To verify the integrity of the tarball, run the following command and check that the output matches the one on the relevant release page.

$ shasum -a 256 snip.tar.gz
  1. Extract the binary.
$ tar -xf snip.tar.gz
  1. Create a symlink to the user's bin directory.
$ sudo ln -sf snip /usr/local/bin/snip

NOTE: You must have write permissions to the specified directory. Creating a symlink to a directory that is already in your path eliminates the need to add the install directory to the user's $PATH variable.

  1. Verify the installation.

Assuming /usr/local/bin is on your PATH, you can now run:

$ snip --version

Uninstall#

  1. Find the directory that contains the symlink to the main binary.
$ which snip/usr/local/bin/snip
  1. Using that information, run the following command to find the installation directory that the symlink points to.
$ ls -l /usr/local/bin/sniplrwxr-xr-x  1 user  admin  4  4 Jun 16:20 /usr/local/bin/snip -> /directory/installed/snip-cli/snip
  1. Delete the symlink in the first directory. If your user account already has write permission to this directory, you don't need to use sudo.
$ sudo rm /usr/local/bin/snip
  1. Delete the main installation directory.
$ rm -rf /directory/installed/snip-cli