Installation
SKM is distributed as a single, compiled, dependency-free binary. It can be installed on multiple platforms including macOS, Linux, BSD, and Windows. Choose the method that best aligns with your system and package management preferences.
Prerequisites
- Operating System: macOS, Linux (various architectures), Windows, or BSD variants.
- OpenSSH: SKM relies on standard underlying OS binaries like
ssh-keygen,ssh-add, andssh-copy-id. These must be installed and available in your system'sPATH. (They are included by default on macOS and most Linux distributions).
Method 1: Using Homebrew (macOS / Linux)
If you use Homebrew, installing via the custom tap is the recommended approach. This ensures you can easily update SKM in the future using brew upgrade.
# Tap the author's repository
brew tap timothyye/tap
# Install the SKM package
brew install timothyye/tap/skm
Method 2: Using Go (For Developers)
If you have a Go development environment configured (Go 1.17+ recommended), you can compile and install SKM directly from the source repository. This is ideal if you want the absolute latest commits or are running an uncommon CPU architecture.
# For Go 1.17 and above
go install github.com/TimothyYe/skm/cmd/skm@latest
Note: Ensure your $(go env GOPATH)/bin directory is included in your system's $PATH so your shell can locate the compiled skm command.
Method 3: Manual Installation (Pre-compiled Binaries)
Pre-compiled binaries are generated automatically via GitHub Actions for every release. This is the best method for servers or environments without a package manager.
- Navigate to the SKM GitHub Releases page.
- Download the compressed archive matching your Operating System and Architecture (e.g.,
skm-linux64-x.x.x.tar.gzfor most Linux servers, orskm-mac64-...for Intel Macs). - Extract the archive.
- Move the binary into your PATH.
Example for Linux (AMD64):
# Extract the downloaded archive
tar -xzvf skm-linux64-v0.8.5.tar.gz
# Move the binary to a global bin directory
sudo mv skm /usr/local/bin/skm
# Ensure it is executable
sudo chmod +x /usr/local/bin/skm
Setting up Bash Autocompletion
SKM provides a bash autocomplete script. This vastly improves the user experience by allowing you to press TAB to auto-complete SKM subcommands (like init, use, create) as well as your custom key alias names.
To enable bash autocompletion:
- Locate the
completions/skm.bashfile from the source repository. - Download or copy it to a persistent location on your machine (e.g.,
~/.skm_autocomplete.bash). - Source this file in your
~/.bashrcor~/.bash_profile.
# Add this line to the bottom of your ~/.bashrc
source ~/.skm_autocomplete.bash
Reload your shell (source ~/.bashrc) and type skm use <TAB> to test it.
Verifying the Installation
Once installed, verify that the OS can locate the SKM binary and that the version matches what you expect:
skm --version
If the command returns the version number and the SKM ASCII logo, you are ready to proceed to the Quick Start guide.
Troubleshooting Installation
skm: command not found: The binary is not in your system'sPATH. If installed via Go, check yourGOPATH. If installed manually, ensure/usr/local/bin(or wherever you placed it) is in your shell's path configuration.- Permission Denied: If running the manual binary yields a permission error, ensure you have set the executable flag using
chmod +x skm.