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-cliIf 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 whoamiLogin
Browser-based OAuth flow — no API key required. The CLI starts a local callback server and opens your browser.
enke loginHow it works:
- CLI starts a local HTTP server on
127.0.0.1:{random-port} - Opens browser to
www.en.ke/login?redirect=http://127.0.0.1:{port}/callback - After login, the browser redirects back to the local server with tokens
- 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]| Option | Description |
|---|---|
--slug | Custom short back-half. Auto-generated if omitted. |
--keep-days | How many days the link stays active. Default: 30. |
--password | Password-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]| Option | Description |
|---|---|
--url | New destination URL. |
--password | New 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]| Option | Description |
|---|---|
--slug | Custom document slug — the preview URL becomes https://en.ke/{slug}. |
--exp-days | Expiration in days (1–365). Default: 30. |
--password | Password-protect the document (min 4 chars). |
--comment | Owner-facing note/label. |
--burn | Delete after first download. |
--no-download | Preview only, no download button. |
--max-downloads | Max 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 whoamiShow 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 infoShow token expiry, API endpoint, and refresh status.
enke version / enke update
enke version enke updatePrint the installed CLI version. Check npm for a newer release and print the upgrade command.
Environment Variables
| Variable | Default | Description |
|---|---|---|
ENKE_API_URL | https://api.en.ke | API base URL |
ENKE_USER_API_URL | https://user.zenkee.com | Auth API base URL |
ENKE_WEB_URL | https://www.en.ke | Web 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@latestRemove the CLI and its stored credentials:
npm uninstall -g enke-cli enke config clearTroubleshooting
enkenot found — add npm's global bin directory to PATH and reopen the terminal (print it withnpm 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, thenenke login. Tokens live in~/.config/enke/config.json.