@skooly/cli
v0.2.0
Published
CLI for Skooly URL shortener - create short links, view analytics, manage URLs
Downloads
42
Maintainers
Readme
@skooly/cli
Command-line interface for Skooly URL shortener.
Installation
npm install -g @skooly/cliRequirements
- Node.js 18+
- Skooly VIP account (API keys require VIP plan)
- API key from https://skoo.ly/tools/developers
Usage
Authentication
# First, create an API key at https://skoo.ly/tools/developers
# Log in (requires username, password, AND API key)
skooly login
# Check current user
skooly whoami
# Log out
skooly logoutURL Management
# Create a short link
skooly shorten https://example.com/long-url
# Create with custom code
skooly shorten https://example.com -c mycode
# Create on your custom domain (must be verified on your account)
skooly shorten https://example.com -D shiftpmos.com
# -> https://shiftpmos.com/abc123
# Repoint a link to a new destination (keeps the same code + analytics)
skooly update mycode https://example.com/new-location
skooly repoint mycode https://example.com/new-location # same thing
# List your links
skooly list
skooly list --page 2 --limit 20
# View analytics
skooly analytics mycode
# Delete a link
skooly delete mycode
skooly delete mycode --force # Skip confirmationCustom Domains
If you've added and verified a custom domain in the Skooly dashboard, you can create branded short links from the CLI.
# One-off: target a domain for a single link
skooly shorten https://example.com -D shiftpmos.com
# Set a default so every link lands on your branded domain automatically
skooly config set domain shiftpmos.com
skooly shorten https://example.com # -> https://shiftpmos.com/abc123
# Override the default for one link, or force plain skoo.ly
skooly shorten https://example.com -D none # -> https://skoo.ly/s/abc123
# Inspect / clear the default
skooly config # list settings
skooly config get domain
skooly config unset domainOnly domains that are verified on your account can be used. If a domain isn't found or isn't verified yet, the CLI tells you which domains are available.
Output Formats
# Human-readable tables (default)
skooly list
# JSON output (for scripting)
skooly list --json
skooly analytics mycode --jsonCommands
| Command | Alias | Description |
|---------|-------|-------------|
| login | - | Log in and create API key |
| logout | - | Clear local credentials |
| whoami | - | Show current user info |
| shorten <url> | - | Create short link (-D <domain> for a custom domain) |
| update <code> <url> | repoint | Change a link's destination (keeps code + analytics) |
| list | ls | List your links |
| analytics <code> | stats | View link analytics |
| delete <code> | rm | Delete a link |
| config [action] [key] [value] | - | View/change settings (e.g. default domain) |
Configuration
Credentials are stored in:
- Windows:
%APPDATA%\skooly-nodejs\Config\config.json - macOS:
~/Library/Preferences/skooly-nodejs/config.json - Linux:
~/.config/skooly-nodejs/config.json
API Key Scopes
When you log in, an API key is created with full scope (read + write).
You can create read-only keys at https://skoo.ly/settings/api-keys
License
MIT
