SePay CLI runs on macOS, Linux and Windows, on x64 or arm64 machines (Apple silicon Macs included). Find your operating system in the table, then pick one install method:
| Operating system | Install with |
|---|---|
| macOS | Homebrew, one-line install script, npm, go install |
| Linux | One-line install script, Homebrew, npm, go install |
| Windows | PowerShell script, Scoop, npm, go install |
Use npm when Node.js is already on your machine, or to pin the whole team to one version in a project. Use go install when Go is already on your machine.
Use one method only. Two methods leave two sepay commands on your machine, and it's hard to tell which one runs.
Install on macOS
Homebrew on macOS
SePay ships the CLI through its own tap, sepayvn/sepay-cli, not through homebrew-core. Install with the full name and Homebrew adds the tap for you:
$ brew install sepayvn/sepay-cli/sepayOr add the tap once, then use the short name:
$ brew tap sepayvn/sepay-cli$ brew install sepayHomebrew also installs shell completion for Bash, Zsh and Fish.
One-line install script on macOS
Without Homebrew, install with the script:
$ curl -fsSL https://get.sepay.vn/sepay-cli-install.sh | shThe script downloads the latest release for your operating system and architecture, checks its SHA-256 checksum, and puts sepay in ~/.local/bin, with no sudo. If the download doesn't match the checksum, the script stops and installs nothing.
When cosign is on your machine, the script also verifies the release signature, and refuses to install a release that has no signature. To never install without the signature check, set SEPAY_REQUIRE_SIGNATURE=1: on a machine without cosign the script then stops and installs nothing.
Three options change how it installs; pass them after sh -s --:
| Option | Matching environment variable | Default | Use it to |
|---|---|---|---|
--version | SEPAY_VERSION | latest release | Install a specific version (x.x.x) |
--dir | SEPAY_INSTALL_DIR | ~/.local/bin | Put sepay in another directory |
--no-modify-path | SEPAY_NO_MODIFY_PATH | not set | Keep the script from editing your shell's startup file |
$ curl -fsSL https://get.sepay.vn/sepay-cli-install.sh | sh -s -- --version x.x.x --dir ~/binIf the install directory isn't on your PATH, the script appends to the end of your shell's startup file (picked from $SHELL) a block from the line # >>> sepay-cli PATH >>> to the line # <<< sepay-cli PATH <<<:
| Shell | Startup file |
|---|---|
| zsh | ~/.zshrc, or $ZDOTDIR/.zshrc when ZDOTDIR is set |
| bash on macOS | The first of ~/.bash_profile, ~/.bash_login, ~/.profile that exists; when none does, it creates ~/.bash_profile |
| bash on Linux | ~/.bashrc |
| fish | ~/.config/fish/conf.d/sepay.fish, or $XDG_CONFIG_HOME/fish/conf.d/sepay.fish when XDG_CONFIG_HOME is set |
sh, dash, ksh, or no $SHELL | ~/.profile |
| Any other shell (tcsh, nushell…) | No file is edited; the script only tells you to add the install directory to PATH yourself |
Running the script again doesn't add the block twice. The script can't change the PATH of the terminal already open: open a new terminal, or run the export PATH=... line the script prints.
To keep the script from editing your startup file, pass --no-modify-path or set SEPAY_NO_MODIFY_PATH=1: the script then only prints the export PATH=... line for you to add. With the variable empty or 0 the script still edits the file; with --no-modify-path it never does, whatever the variable says. If the install directory is a relative path, or contains ", `, $, \, : or a line break, the script doesn't edit the file either and only tells you to add it yourself.
If another sepay comes earlier on your PATH, the script says note: another sepay at <path> comes first on your PATH; remove that copy or put the install directory before it, or typing sepay still runs the old one.
Install on Linux
One-line install script on Linux
$ curl -fsSL https://get.sepay.vn/sepay-cli-install.sh | shThis is the same script as on macOS: it checks the SHA-256 checksum and the signature, and puts sepay in ~/.local/bin with no sudo. If the install directory isn't on your PATH, the script adds it in ~/.bashrc (for bash) or your shell's startup file. The --version, --dir and --no-modify-path options and SEPAY_REQUIRE_SIGNATURE work as in One-line install script on macOS.
Homebrew on Linux
If your Linux machine has Homebrew, install as on macOS:
$ brew install sepayvn/sepay-cli/sepayInstall on Windows
PowerShell script on Windows
Run it in PowerShell (Windows PowerShell 5.1 or later, or PowerShell 7):
$ irm https://get.sepay.vn/sepay-cli-install.ps1 | iexThe PowerShell script runs the same checks as the macOS and Linux script: the SHA-256 checksum, the signature when cosign is on your machine, and SEPAY_REQUIRE_SIGNATURE=1 to never install without cosign. It puts sepay.exe in %LOCALAPPDATA%\Programs\sepay and adds that directory to your Windows user PATH, with no admin rights. Open a new PowerShell window to use sepay.
This script takes no options. Set environment variables before the command to change how it installs:
| Environment variable | Default | Use it to |
|---|---|---|
SEPAY_VERSION | latest release | Install a specific version (x.x.x) |
SEPAY_INSTALL_DIR | %LOCALAPPDATA%\Programs\sepay | Put sepay.exe in another directory |
SEPAY_NO_MODIFY_PATH | not set | Set it to 1 so the script leaves PATH alone |
$ $env:SEPAY_VERSION = 'x.x.x'; irm https://get.sepay.vn/sepay-cli-install.ps1 | iexScoop on Windows
Add SePay's bucket, then install:
$ scoop bucket add sepay https://github.com/sepayvn/scoop-sepay-cli$ scoop install sepay/sepayInstall with npm or Go (any operating system)
npm
Needs Node.js 18 or later, and works on macOS, Linux and Windows:
$ npm install -g sepay-cligo install
Needs Go 1.21 or later. Go 1.21 and later download a newer toolchain when needed, so you don't have to upgrade Go first. The first run prints switching to go1.x.x and downloads a few dozen MB.
$ go install github.com/sepayvn/sepay-cli/cmd/sepay@latestTo install a specific version, replace @latest with the version number, with a leading v:
$ go install github.com/sepayvn/sepay-cli/cmd/sepay@vx.x.xGo puts sepay in $(go env GOBIN), or in $(go env GOPATH)/bin when GOBIN isn't set. With a default setup that's ~/go/bin on macOS and Linux, and %USERPROFILE%\go\bin on Windows. On macOS and Linux the Go installer doesn't add this directory to your PATH (the Windows installer does), so if typing sepay prints command not found, add it to ~/.zshrc (or ~/.bashrc for Bash):
$ echo 'export PATH="$(go env GOPATH)/bin:$PATH"' >> ~/.zshrc$ source ~/.zshrc$ sepay versiongo install doesn't set up shell completion; follow Shell completion to add it.
Verify the installation
The command prints the version, commit and build date. For an official release, the second line is that version's release notes page:
$ sepay versionsepay version x.x.x (xxxxxxx, YYYY-MM-DD)https://github.com/sepayvn/sepay-cli/releases/tag/vx.x.xVerify a download
The install script already checks the SHA-256 (and the signature, when cosign is installed). If you download an archive by hand from GitHub Releases, check it yourself. Every release has checksums.txt, its signature checksums.txt.sig and certificate checksums.txt.pem; download them next to the archive, then run:
cosign verify-blob checksums.txt \--signature checksums.txt.sig \--certificate checksums.txt.pem \--certificate-identity-regexp '^https://github\.com/sepayvn/sepay-cli/\.github/workflows/release\.yml@refs/(heads/main|tags/v.*)$' \--certificate-oidc-issuer https://token.actions.githubusercontent.comsha256sum -c --ignore-missing checksums.txt # macOS: shasum -a 256 -c --ignore-missing checksums.txtgh attestation verify sepay_<version>_linux_amd64.tar.gz -R sepayvn/sepay-cli
The first command proves checksums.txt was signed by SePay's release workflow. The second proves the archive matches it. The last checks which commit of the SePay CLI repository built the archive.
Install into a project
To keep your team and CI on the same CLI version, install it into the project with npm and run it with npx sepay:
$ npm install --save-dev sepay-cliCheck the version installed in the project:
$ npx sepay versionnpm records the installed version in package.json and package-lock.json; CI installs that exact version with npm ci.
Shell completion
Optional: press Tab to complete commands, flags, flag values such as --env, config keys and profile names. A Homebrew install already has it for Bash, Zsh and Fish. Open a new shell once it's set up.
Bash needs the bash-completion package (apt install bash-completion or brew install bash-completion). Add completion to ~/.bashrc:
$ echo 'source <(sepay completion bash)' >> ~/.bashrcZsh needs compinit enabled in ~/.zshrc first. Add completion to ~/.zshrc:
$ echo 'source <(sepay completion zsh)' >> ~/.zshrcFor Fish, write the script to the completions directory:
$ sepay completion fish > ~/.config/fish/completions/sepay.fishFor PowerShell, load completion into the open session; add the same line to $PROFILE to get it in every session:
$ sepay completion powershell | Out-String | Invoke-ExpressionUpdate
From version 0.1.8, SePay CLI has a sepay update command (alias sepay upgrade). Older versions don't have it: update them by running the install command again, or with the update command of the tool you installed with, in the table below.
$ sepay updateThe command downloads the latest release from GitHub Releases for your operating system and architecture, checks its SHA-256 against the release's checksums.txt, runs the new binary once, and only then replaces the sepay you are running. When cosign is on your machine, it also verifies the signature of checksums.txt. Set SEPAY_REQUIRE_SIGNATURE=1 to refuse the update on a machine without cosign.
Before replacing anything, the command asks y/N. Add --yes to skip the question; without a terminal (scripts, CI) --yes is required.
| Command | What it does |
|---|---|
sepay update | Install the latest release |
sepay update --check | Only report whether a newer release exists, without installing it. Works with every install method |
sepay update --check --json | The same, as JSON for scripts |
sepay update --version x.y.z | Install exactly version x.y.z |
Example of sepay update --check --json on a machine that installed with Homebrew:
{"current": "0.1.7","latest": "0.2.0","update_available": true,"channel": "homebrew","update_command": "brew upgrade sepay"}
channel is how you installed, and update_command is the update command for that method. With the install script, channel is standalone and update_command is sepay update.
sepay update only replaces a binary installed by the one-line install script (curl or PowerShell) or unpacked from a GitHub Releases archive. For any other install method it replaces nothing: it prints that tool's update command and exits with code 1.
| Installed with | sepay update prints |
|---|---|
| Homebrew | brew upgrade sepay |
| Scoop | scoop update sepay |
| npm | npm install -g sepay-cli@latest, plus npm install -D sepay-cli@latest for a project install |
| go install | go install github.com/sepayvn/sepay-cli/cmd/sepay@latest |
With --version, an npm or go install gets the command that installs that exact version (e.g. go install github.com/sepayvn/sepay-cli/cmd/sepay@v0.2.0). Homebrew and Scoop only install their newest release, so the command says it can't install the version you picked.
Once a day, the CLI checks whether there's a newer release. When a newer stable release is out, or the version you run has been deprecated, it prints a notice to stderr after every successful command, with the upgrade command for the method you installed with. It never installs anything itself.
The notice only shows when stderr is a terminal, and never in CI (when CI is set) or with --json, -o yaml or --quiet. Turn it off entirely with SEPAY_NO_UPDATE_NOTIFIER=1.
Uninstall
Uninstall with the same method you installed with:
| Installed with | Uninstall |
|---|---|
| Homebrew | brew uninstall sepay, then brew untap sepayvn/sepay-cli if you no longer need the tap |
| Scoop | scoop uninstall sepay |
| One-line install script (macOS, Linux) | Delete ~/.local/bin/sepay (or in the directory you chose with --dir), and delete the block marked sepay-cli PATH in your shell's startup file (for fish, delete the sepay.fish file) |
| One-line install script (Windows) | Delete the %LOCALAPPDATA%\Programs\sepay directory (or the one you set in SEPAY_INSTALL_DIR), then remove it from your PATH |
| npm | npm uninstall -g sepay-cli |
| go install | rm "$(go env GOPATH)/bin/sepay" (or the sepay file in GOBIN if you set it) |
For a project install, use npm uninstall sepay-cli.
Go has no uninstall command: deleting the sepay file is enough. The downloaded source stays in the module cache; go clean -modcache clears it, but also clears the libraries of every other Go project on your machine.
Before uninstalling, run sepay logout to remove your token. Uninstalling doesn't delete the configuration directory; to remove it, find its location for your operating system in Environments and configuration.