← All Tools

enke CLI

Secure link, file & context relay from the terminal. Built for developers and AI agents.

Requirements

Node.js 18 or newer (20 LTS recommended) and npm. Check with node -v and npm -v. The CLI runs on macOS, Linux, and Windows.

Install

npm install -g enke-cli

If enke is not found afterwards, add npm's global bin directory to PATH — print it with npm config get prefix.

Verify the install

Print the version, then confirm the logged-in account:

enke version enke whoami

Login

Browser-based OAuth flow — no API key required. The CLI starts a local callback server and opens your browser.

enke login

How it works:

  1. CLI starts a local HTTP server on 127.0.0.1:{random-port}
  2. Opens browser to www.en.ke/login?redirect=http://127.0.0.1:{port}/callback
  3. After login, the browser redirects back to the local server with tokens
  4. Tokens are stored at ~/.config/enke/config.json (chmod 0600)

Link Commands

enke link create

Shorten a URL.

enke link create <url> [--slug x] [--keep-days 30] [--password x]
OptionDescription
--slugCustom short back-half. Auto-generated if omitted.
--keep-daysHow many days the link stays active. Default: 30.
--passwordPassword-protect the link.

enke link list

List your short links. Use --all to page through everything, or --cursor to continue from a previous page.

enke link list [--cursor c] [--all]

enke link stats

enke link stats <slug>

Output: total clicks, daily breakdown (last 7 days), top referrers, top countries, device types.

enke link update

Change the destination URL or password. One of --url or --password is required.

enke link update <slug> [--url x] [--password x]
OptionDescription
--urlNew destination URL.
--passwordNew password (pass an empty value to remove it).

enke link delete

enke link delete <slug>

Document Commands

enke doc upload

Upload and share a file securely. Returns a short URL https://en.ke/{slug} with preview page.

enke doc upload <file-path> [--slug x] [--exp-days 30] [--password x] [--comment x] [--burn] [--no-download] [--max-downloads 5]
OptionDescription
--slugCustom document slug — the preview URL becomes https://en.ke/{slug}.
--exp-daysExpiration in days (1–365). Default: 30.
--passwordPassword-protect the document (min 4 chars).
--commentOwner-facing note/label.
--burnDelete after first download.
--no-downloadPreview only, no download button.
--max-downloadsMax download count (0 = unlimited).

enke doc list

enke doc list [--cursor x] [--limit 20] [--all]

enke doc get

enke doc get <slug>

enke doc delete

enke doc delete <slug>

Deletes the R2 file and KV metadata. Irreversible.

enke doc update

enke doc update <slug> [--exp-days 30] [--password x] [--burn] [--no-download] [--max-downloads 5]

enke doc renew

Reset expiration timer to plan's renewal period.

enke doc renew <slug>

enke doc expire

enke doc expire <slug> <days>

Other Commands

enke whoami

enke whoami

Show logged-in user (email, name, plan).

enke landing create

Create a landing page. <slug> and <title> are required; --links takes , pairs.

enke landing create <slug> <title> [--links url1,title1;url2,title2]

enke token info

enke token info

Show token expiry, API endpoint, and refresh status.

enke version / enke update

enke version enke update

Print the installed CLI version. Check npm for a newer release and print the upgrade command.

Environment Variables

VariableDefaultDescription
ENKE_API_URLhttps://api.en.keAPI base URL
ENKE_USER_API_URLhttps://user.zenkee.comAuth API base URL
ENKE_WEB_URLhttps://www.en.keWeb frontend URL

Config File

Stored at ~/.config/enke/config.json (or $XDG_CONFIG_HOME/enke/config.json). Permissions: 0600.

Upgrade & uninstall

Upgrade with npm. enke update only checks whether a newer version exists.

npm install -g enke-cli@latest

Remove the CLI and its stored credentials:

npm uninstall -g enke-cli enke config clear

Troubleshooting

  • enke not found — add npm's global bin directory to PATH and reopen the terminal (print it with npm config get prefix).
  • The browser did not open — copy the printed URL into a browser. The callback only listens on 127.0.0.1.
  • Authentication keeps failing — run enke logout, then enke login. Tokens live in ~/.config/enke/config.json.

Cookie Usage Notice

We use necessary cookies to enhance your browsing experience, analyze website traffic, and provide personalized content based on your interests. By clicking "Accept All Cookies," you consent to the storage and use of cookies.

Learn more

Cookie Usage Notice

We use necessary cookies to enhance your browsing experience, analyze website traffic, and provide personalized content based on your interests. By clicking "Accept All Cookies," you consent to the storage and use of cookies.

Learn more