@safeslug/cli
v0.3.4
Published
Command-line client for SafeSlug.
Readme
SafeSlug CLI
Official command-line client for SafeSlug, a privacy-first URL shortener with encrypted destinations, custom slugs, and link analytics.
Use it to create and manage SafeSlug links directly from your terminal.
Installation
npm install -g @safeslug/cliVerify the install:
safeslug --versionSafeSlug CLI requires Node.js 18 or newer.
Sign In
safeslug auth loginThe CLI opens SafeSlug in your browser and shows a short verification code. Sign in to your SafeSlug account, approve the matching code, then return to your terminal.
Check your session:
safeslug auth statusSign out:
safeslug auth logoutCreate Links
Shorten a URL:
safeslug shorten https://example.comCreate a custom slug:
safeslug shorten https://example.com --custom launchChoose a generated slug length:
safeslug shorten https://example.com --length 10Return machine-readable output:
safeslug shorten https://example.com --jsonManage Links
List your links:
safeslug linksList links as JSON:
safeslug links --jsonView analytics for a link:
safeslug analytics <link-id>Delete a link:
safeslug delete <link-id>Skip the delete confirmation prompt:
safeslug delete <link-id> --yesConfiguration
SafeSlug CLI stores its local session config at:
~/.config/safeslug/config.jsonYou usually do not need to edit this file. Use safeslug auth login and safeslug auth logout instead.
Troubleshooting
If the command is not found after installation, check your global npm bin directory:
npm bin -gIf an old version keeps running, reinstall and clear your shell command cache:
npm uninstall -g @safeslug/cli
npm install -g @safeslug/cli@latest
hash -r
safeslug --versionIf authentication fails, sign out and start a fresh browser approval flow:
safeslug auth logout
safeslug auth loginLicense
MIT
