SunLicense CLI
sunlicense puts your organization in your terminal. Run it on its own for a full-screen app where every task is one key away, or use its commands in scripts and CI.

- Sign in once with your SunLicense account, and stay signed in to several organizations.
- Issue, revoke, suspend and inspect licenses, create policies and API keys, without opening the dashboard.
- Script it: every action is also a command with
--jsonoutput and--yesfor no prompts.
Install
Pick whichever suits your system. Each one installs the same single binary, checked against the release's checksums.txt, and none of them goes through a web browser, so macOS and Windows run it straight away, without a security warning.
macOS and Linux
curl -fsSL https://sunlicense.com/install.sh | sh
The script picks the build for your system (Intel or ARM), checks it, and installs it to /usr/local/bin, or to ~/.local/bin when that folder isn't writable. It never uses sudo. It also works in WSL, containers (with curl or wget) and Git Bash on Windows, where it installs to ~/bin. Run the same command again to update.
| Variable | Default | |
|---|---|---|
SUNLICENSE_INSTALL_DIR | /usr/local/bin | Where to put sunlicense |
Windows
In PowerShell:
irm https://sunlicense.com/install.ps1 | iexThe script picks the build for your PC (x64 or ARM), checks it, installs it to %LOCALAPPDATA%\Programs\sunlicense and adds that folder to your user PATH. It needs no administrator rights. SUNLICENSE_INSTALL_DIR chooses another folder.
Use Windows Terminal (or any terminal with 24-bit colour) for the full-screen app.
npm
Anywhere Node.js 16 or later runs, including most AI coding assistants:
npx -y @sunlicense/cli@latest login # run it without installing
npm install -g @sunlicense/cli # or install the sunlicense commandnpm downloads only the build for your system. pnpm dlx @sunlicense/cli and bunx @sunlicense/cli work the same way. Update a global install with npm install -g @sunlicense/cli@latest.
The CLI is @sunlicense/cli
The npm package called sunlicense is the JavaScript SDK, for checking licenses in your own app. The command line is @sunlicense/cli.
Homebrew
On macOS or Linux:
brew install sunlicense-com/tap/sunlicenseUpdate with brew upgrade sunlicense.
Scoop
On Windows:
scoop bucket add sunlicense https://github.com/sunlicense-com/scoop-bucket
scoop install sunlicense/sunlicenseUpdate with scoop update sunlicense.
Updating
In a terminal, sunlicense looks for a new version once a day while a command runs, and asks afterwards: "sunlicense 0.4.0 is available (you have 0.3.0). Update now?". Yes downloads the new version and replaces this one; Not now keeps it quiet for a day. Run sunlicense update to update any time, or sunlicense update --check to only look.
Every update is verified before anything changes: checksums.txt must carry a valid signature from SunLicense's release key (built into the CLI), and the download must match its checksum. If any check fails, the CLI keeps the version you have and says why.
It never checks or asks in scripts and CI (no terminal, CI set or --json), in sunlicense mcp, under npx, or when turned off: sunlicense update --auto-check off (or SUNLICENSE_NO_UPDATE_CHECK=1). The check sends only the CLI's version and platform (sunlicense-cli/0.3.0 (darwin/arm64)), no account details.
Installed with npm, Homebrew or Scoop? Then that package manager updates sunlicense: the CLI only tells you a new version is out and the command to run (npm install -g @sunlicense/cli@latest, brew upgrade sunlicense or scoop update sunlicense).
If sunlicense sits in a folder you can't write to (installed with sudo), it shows the install command to run instead, e.g. curl -fsSL https://sunlicense.com/install.sh | sudo SUNLICENSE_INSTALL_DIR=/usr/local/bin sh. Builds from before 0.4.0 can't update themselves: reinstall once with the commands above.
Uninstall: delete the file (rm "$(command -v sunlicense)"), or npm uninstall -g @sunlicense/cli, brew uninstall sunlicense, scoop uninstall sunlicense. To forget your sessions, also delete the config file shown in Where sessions are stored.
Manual download
Prefer one of the commands above. If you do download a file yourself, every build is a single file with no dependencies. Current version: VERSION.
| Intel / AMD (x86-64) | ARM | |
|---|---|---|
| macOS | sunlicense_darwin_amd64 | sunlicense_darwin_arm64 (Apple silicon) |
| Linux | sunlicense_linux_amd64 | sunlicense_linux_arm64 |
| Windows | sunlicense_windows_amd64.exe | sunlicense_windows_arm64.exe |
Check a download against checksums.txt:
curl -fsSL https://sunlicense.com/download/checksums.txt | grep darwin_arm64
shasum -a 256 sunlicense_darwin_arm64 # Linux: sha256sumA file downloaded with a web browser is marked as coming from the internet, and because the CLI isn't signed with a paid Apple or Microsoft certificate, the system warns before running it. Unblock it once:
macOS ("cannot be opened because Apple cannot check it for malicious software"): clear the quarantine flag in Terminal, then move the file to a folder on your PATH:
chmod +x sunlicense_darwin_arm64
xattr -d com.apple.quarantine sunlicense_darwin_arm64
sudo mv sunlicense_darwin_arm64 /usr/local/bin/sunlicenseOr, after the warning, open System Settings → Privacy & Security, scroll to Security, choose Open Anyway next to the message about sunlicense, and confirm.
Windows ("Windows protected your PC"): choose More info, then Run anyway. Or before running it, right-click the file → Properties → tick Unblock at the bottom of the General tab → OK, or in PowerShell:
Unblock-File .\sunlicense_windows_amd64.exeThen rename it to sunlicense.exe and move it to a folder on your PATH, for example:
mkdir $HOME\bin -Force
Move-Item .\sunlicense_windows_amd64.exe $HOME\bin\sunlicense.exe
[Environment]::SetEnvironmentVariable("Path", "$env:Path;$HOME\bin", "User") # then open a new terminalSign in
Use the same email and password as the dashboard.
sunlicense loginOr run sunlicense and sign in on the first screen. Press ctrl+n there to create a new organization instead (you become its Owner), and ctrl+s to point the CLI at another server.

sunlicense whoami shows who you are, your role and plan, and how long the session lasts:

A session lasts 12 hours, like the dashboard. When it ends, the app asks for your password again with your email filled in; a command says so and exits with sunlicense login as the fix.
With a personal access token
For a computer you don't want to sign in to every 12 hours (a build server, an AI assistant's machine), create a personal access token in the dashboard under Settings → Personal access tokens, with only the scopes it needs, and sign in with it:
sunlicense login --with-token # paste the token (slp_…)
echo "$TOKEN" | sunlicense login --with-tokenIt's saved like any other account and works until it expires or you revoke it in the dashboard. It can only do what its scopes allow (details).
Several organizations
Sign in again with another account and both stay saved. Switch with sunlicense switch (or a then enter in the app), or run one command as another account with --account:
sunlicense switch # pick from a list
sunlicense switch "Bolt Labs" # by organization or email
sunlicense licenses --account [email protected]The same email can be saved for production and a local stack (sunlicense login --local signs in to http://localhost); each account remembers its server.
Sign out
sunlicense logout # the current account
sunlicense logout [email protected] # another saved account
sunlicense logout --all # every account on this computerSigning out forgets the session on this computer. A session that was copied elsewhere stays valid until it expires (at most 12 hours). To stop a personal access token everywhere, revoke it in the dashboard under Settings.
Where sessions are stored
| System | File |
|---|---|
| macOS | ~/Library/Application Support/sunlicense/config.json |
| Linux | ~/.config/sunlicense/config.json |
| Windows | %AppData%\sunlicense\config.json |
The file is readable only by you (mode 0600). Set SUNLICENSE_CONFIG to use another file.
Next
- The app: every screen and key.
- Commands and scripting: one-shot commands,
--json, CI, and testing an integration.
