The official command-line interface for PeakURL.
Use peakurl to create short links, inspect existing links, and manage your PeakURL account from the terminal.
Learn more in the full CLI docs: https://peakurl.org/docs/cli
Node.js 20 or later is required.
npm i -g peakurlSign in with your PeakURL API key:
peakurl login \
--base-url https://example.com/api/v1 \
--api-key 0123456789abcdef0123456789abcdef0123456789abcdefCreate and review a short link:
peakurl create \
https://example.com/articles/launch \
--alias launch \
--title "Launch Post"
peakurl list
peakurl whoami
peakurl status
peakurl logoutThe CLI uses PeakURL bearer API keys and validates them against GET /api/v1/users/me before saving credentials.
--base-urlexpects the explicit API base URL, such ashttps://example.com/api/v1- API keys are opaque 48-character hex tokens
- Credentials are stored in the standard per-user config location for
peakurl peakurl logoutremoves the saved config file, but shell environment variables still override auth if they are set
For CI or automation, you can also authenticate with environment variables:
export PEAKURL_BASE_URL=https://example.com/api/v1
export PEAKURL_API_KEY=0123456789abcdef0123456789abcdef0123456789abcdef| Command | Description |
|---|---|
peakurl login |
Validate and save your PeakURL credentials. |
peakurl whoami |
Show the current authenticated account. |
peakurl logout |
Remove saved local CLI credentials. |
peakurl status |
Show the current system status snapshot for the site. |
peakurl core download |
Download and extract the latest PeakURL core package. |
peakurl create <url> |
Create a new short link. |
peakurl import <file> |
Import links from a local CSV, JSON, or XML file. |
peakurl export |
Export accessible links as CSV, JSON, or XML. |
peakurl list |
List links in your account. |
peakurl get <id-or-alias> |
Fetch a single link by ID or alias. |
peakurl delete <id-or-alias> |
Delete a link by ID or alias. |
peakurl webhook <subcommand> |
List, create, delete, and inspect supported webhook events. |
peakurl update |
Show the latest available CLI version and install command. |
Create a short link:
peakurl create \
https://example.com \
--alias example \
--title "Example"List links as JSON:
peakurl list \
--limit 10 \
--jsonInspect a link:
peakurl get exampleLog out from saved local credentials:
peakurl logoutShow the current system status:
peakurl statusThe status command calls GET /api/v1/system/status and prints summary, checks, plus site, server, database, storage, mail, location, and data tables when that information is available.
This route typically requires admin access on the PeakURL install.
If you need the raw payload:
peakurl status --jsonDownload, verify, and extract the current PeakURL core package into the current directory:
peakurl core downloadThe command checks the published release checksum before extracting files. If the current directory already contains release-managed files, the command stops by default.
Use --force only when you intentionally want those files replaced:
peakurl core download --forceDelete a link:
peakurl delete exampleWhen delete receives an alias or short code, the CLI resolves it to the underlying PeakURL row ID before deleting it.
Import links from a local file:
peakurl import ./links.csvThe import command accepts dashboard-style CSV, JSON, and XML files, normalizes them locally, and sends the API-native urls array to POST /api/v1/urls/bulk.
Export links as CSV:
peakurl export --format csvWrite the exported JSON snapshot to stdout:
peakurl export --format json --stdoutList configured webhooks:
peakurl webhook listCreate a webhook:
peakurl webhook create \
https://example.com/api/webhooks/peakurl \
--event link.clicked \
--event link.createdThe create command prints the signing secret once, so save it before closing the terminal output.
List supported webhook events:
peakurl webhook eventsDelete a webhook:
peakurl webhook delete webhook_123Check the latest available CLI version:
peakurl update --checkShow the recommended install command:
peakurl updateInstall the latest version manually:
npm i -g peakurl@latestDisable update notices in the current shell:
export PEAKURL_DISABLE_UPDATE_CHECK=1- Human-readable output is the default
--jsonprints machine-readable JSON where supported--quietminimizes output for scripts
- Website: https://peakurl.org/
- CLI docs: https://peakurl.org/docs/cli
- API docs: https://peakurl.org/docs/api
- npm package: https://www.npmjs.com/package/peakurl
- Issues: https://github.com/PeakURL/CLI/issues
