dub — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited dub (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
dub)The dub CLI is a tool for interacting with the Dub.co link shortening and attribution platform. It lets you shorten URLs, manage links, configure custom domains, and authenticate with your Dub workspace — all from the terminal.
Package name: dub-cli (npm), binary name: dub Source repo: dubinc/dub (monorepo, package at packages/cli)
npm i -g dub-cli@latest
yarn global add dub-cli@latest
pnpm i -g dub-cli@latest| Option | Alias | Description |
|---|---|---|
--version | -v | Display version number |
--help | -h | Display help for command |
dub loginAuthenticate the CLI with your Dub.co account via OAuth2. Opens a browser window for authentication.
dub loginHow it works:
http://localhost:4587/callback@badgateway/oauth2-client librarylinks.read, links.write, domains.readConfigstore (typically ~/.config/configstore/dub-cli.json)Scopes requested:
links.read — read links in workspacelinks.write — create/update/delete linksdomains.read — read workspace domainsToken refresh happens automatically when config is read and the token has expired.
dub configView your configured credentials and workspace configuration as colorized JSON.
dub configConfig store: Uses Configstore with the key dub-cli. The stored config includes:
access_token — OAuth2 access tokenrefresh_token — OAuth2 refresh tokenexpires_at — token expiry timestamp (ms)domain — selected workspace domainConfig file location: ~/.config/configstore/dub-cli.json
dub domainsConfigure your workspace domain for link shortening. Presents an interactive prompt listing all available domains from your Dub workspace.
dub domainsBehind the scenes:
dub.domains.list())setConfig({ domain: slug })dub shortenCreate a short link. If called without arguments, enters interactive prompt mode.
dub shorten [url] [key]Arguments:
| Argument | Description |
|---|---|
url | Destination URL to shorten |
key | Short key/slug for the link (default: auto-generated nanoid) |
If no URL provided (interactive mode):
Uses the Dub SDK's dub.links.create() with the configured domain.
dub linksSearch for links in your Dub workspace and display results in a table.
dub links [options]Options:
| Option | Alias | Description | Default |
|---|---|---|---|
--search [search] | -s | Search term to filter links | — |
--limit [limit] | -l | Number of links to fetch | 10 |
Output columns: Short Link, Destination URL, Clicks, Created At
Uses the Dub SDK's dub.links.list() with search and pageSize params.
dub helpDisplay help for the CLI or a specific command.
dub help [command]| Variable | Description | Default |
|---|---|---|
DUB_API_URL | Base API URL | https://api.dub.co |
DUB_OAUTH_URL | OAuth URL | https://app.dub.co |
commander (v11)@badgateway/oauth2-clientdub (Dub.co TypeScript SDK, wraps the Dub REST API)configstore (JSON file in ~/.config/configstore/dub-cli.json)orapromptsopenchalk (colors), json-colorizer (config JSON), console.table (links)| Task | Command |
|---|---|
| Install the CLI | npm i -g dub-cli@latest |
| Check version | dub --version |
| Authenticate | dub login |
| View current config | dub config |
| Select workspace domain | dub domains |
| Shorten a URL (interactive) | dub shorten |
| Shorten a URL with custom key | dub shorten <url> <key> |
| List links (10 most recent) | dub links |
| Search links by term | dub links -s <term> |
| List more links | dub links -l 50 |
| Get help | dub help |
| Get help for a command | dub help shorten |
To work on the CLI locally from the dubinc/dub monorepo:
git clone https://github.com/dubinc/dub.git
cd dub/packages/cli
pnpm install
pnpm build
npm link # makes `dub` available globallyOr run directly without global install:
pnpm start <command>
pnpm start help
pnpm start links| File | Purpose |
|---|---|
packages/cli/src/index.ts | Entry point, commander setup |
packages/cli/src/commands/shorten.ts | dub shorten implementation |
packages/cli/src/commands/login.ts | dub login implementation |
packages/cli/src/commands/config.ts | dub config implementation |
packages/cli/src/commands/domains.ts | dub domains implementation |
packages/cli/src/commands/links.ts | dub links implementation |
packages/cli/src/utils/config.ts | Config store get/set |
packages/cli/src/api/links.ts | SDK wrapper for link creation |
packages/cli/src/api/domains.ts | SDK wrapper for domain fetch |
packages/cli/src/utils/oauth.ts | OAuth2 client setup |
packages/cli/src/utils/handle-error.ts | Error handler utility |
packages/cli/src/utils/logger.ts | Logger utility |
packages/cli/src/utils/get-nanoid.ts | Nanoid key generator |
packages/cli/src/utils/get-package-info.ts | Package version reader |
packages/cli/package.json | Dependencies & build config |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.