npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lokr/cli

v0.2.4

Published

Create lokr shares from the terminal.

Downloads

74

Readme

@lokr/cli

Create lokr shares from the terminal.

Install

No install needed. Run via npx:

npx @lokr/cli share .env

Or install globally:

npm install -g @lokr/cli
lokr share .env

Usage

The positional argument is treated as a file path when it looks like one (starts with ., /, ~, contains a slash, or matches name.ext). Otherwise it is shared as literal text.

npx @lokr/cli share .env                     # shares the .env file
npx @lokr/cli share test                     # shares the string "test"
npx @lokr/cli share ./schema.sql             # detected as SQL snippet
npx @lokr/cli share --text "temp-password-42" --expires 1h
echo "$API_KEY" | npx @lokr/cli share --stdin --sensitivity high

Text files smaller than 256 KiB are inlined as a code or markdown block with a detected language (.env, .json, .sh, .yml, .py, .ts, .md, and so on). Larger or binary files are uploaded as file attachments. Pass --language to override detection.

npx @lokr/cli share ./secret.env --sensitivity critical --burn --creator-email [email protected]
cat schema.sql | npx @lokr/cli share --stdin --language sql --title "Schema dump"

Emailing the link directly

Pass --to (or the longer alias --recipient) to email the share link straight from the CLI. This mirrors the "Forward" action in the web UI: each recipient gets a pre-authorised link valid until the share expires.

npx @lokr/cli share .env --to [email protected] --message "Rotate these today."
npx @lokr/cli share ./report.pdf --to [email protected],[email protected] --creator-email [email protected]

Combine with --require-email to also restrict viewing to that allowlist. Recipients still receive a one-click link (so they do not need to type the 6 digit code).

npx @lokr/cli share ./secrets.tar --to [email protected] --require-email --creator-email [email protected]

Flags

| Flag | Description | | --- | --- | | --text <content> | Share a literal string instead of a file. | | --stdin | Read content from stdin. | | --title <title> | Title for the share block. | | --language <lang> | Language hint (makes a text share a code block). | | --sensitivity <level> | low, medium (default), high, critical. | | --burn | Burn on read. | | --expires <when> | 1h, 24h (default), 7d, 30d, <n>h, <n>d, or an ISO datetime. | | --password [value] | Password protect. Prompts if no value is given. | | --max-views <n> | Maximum views. Requires --burn. | | --creator-email <email> | Your email for burn and verification notifications (optional). | | --require-email | Recipients must verify their email before viewing. Needs --recipient/--to. | | --recipient <email...>, --to <email...> | Email the share link to this address. Repeatable, or pass multiple as a comma-separated list. Each variant accepts --to [email protected] or [email protected]. | | --message <text> | Personal note included in the forward email (max 500 characters). | | --json | Print result as JSON to stdout. |

Output

By default the share URL is printed to stdout. Progress and spinners go to stderr, so piping works:

URL=$(npx @lokr/cli share ./file.zip)
echo "Share: $URL"

With --json, stdout is a single JSON object with id, url, and managementToken. Store the management token if you want to revoke the share later.

Self hosted instances

Point the CLI at your own lokr instance:

LOKR_BASE_URL=https://lokr.example.com npx @lokr/cli share .env

Or write it to ~/.config/lokr/config.json:

{ "baseUrl": "https://lokr.example.com" }

The env var takes precedence over the config file.

Rate limits

Traffic identifying itself as lokr-cli/* uses a dedicated rate limit bucket on the server, separate from the browser UI. If you hit a 429 while sharing from CI, either reduce frequency or self host.

Requirements

Node.js 20 or later.