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

@loftlyy/cli

v0.1.1

Published

Loftlyy brand data CLI

Readme

@loftlyy/cli

Simple CLI for querying Loftlyy brand data.

Install and Use

npm i -g @loftlyy/cli

Or run without installing:

npx @loftlyy/cli list

Quick examples:

loftlyy list
loftlyy search apple
loftlyy get apple
loftlyy palette apple --output json

Command Reference

  • loftlyy list [--limit <n>] - list brands (summary rows)
  • loftlyy get <slug> - get one brand object
  • loftlyy search <query> - full-text and hex-token search
  • loftlyy filter [options] - facet filtering (--industry, --tag, --color-family, --typography-style, --q)
  • loftlyy similar <slug> [--limit <n>] - similar brands
  • loftlyy palette <slug> - palette JSON/table for one brand
  • loftlyy facets - available filter values

Legacy namespace is still supported:

  • loftlyy brands ...
  • loftlyy b ...

Global Options

  • --source <local|remote> - where to load data from
  • --base-url <url> - remote base URL override
  • --output <table|json|ndjson> - output format
  • --strict - fail fast on invalid brand data
  • --no-color - disable ANSI colors

Data Source Behavior

The CLI auto-detects default source:

  • if data/brands exists in the current working directory -> local
  • otherwise -> remote

Remote mode uses:

  • default base URL: https://loftlyy.com
  • endpoint: GET /api/cli
  • response shape: { "brands": Brand[] }

You can override the host:

loftlyy --source remote --base-url https://staging.loftlyy.com list

How It Works

  • local source: scans data/brands/*.ts (excluding index.ts), validates entries, then builds search/facet indexes.
  • remote source: fetches GET /api/cli, validates each brand entry, then builds the same indexes.
  • search is case-insensitive.
  • slug commands (get, similar, palette) are case-insensitive.
  • filter values are case-insensitive.

Maintainer Guide

Prerequisites

  • Node 20+
  • npm account with publish access to @loftlyy/cli

Build the CLI package

From repository root:

pnpm cli:build

Or directly:

npm --prefix cli run build

Build output is cli/dist/.

Bump Version

CLI package version lives in cli/package.json.

Patch:

npm --prefix cli version patch

Minor:

npm --prefix cli version minor

Major:

npm --prefix cli version major

If you do not want git tags/commits created automatically, use --no-git-tag-version.

Publish to npm (manual)

  1. Ensure you can publish the scope/package:
npm whoami
  1. Build:
npm --prefix cli run build
  1. Publish:
npm --prefix cli publish --access public

Auth Token Setup

Local machine (recommended interactive setup):

npm login

CI setup (token-based):

  1. Create an npm automation token in npm account settings.
  2. Store it as NPM_TOKEN in CI secrets.
  3. Configure npm auth in CI before publish:
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc

Then run:

npm --prefix cli publish --access public

Release Checklist

  1. Confirm /api/cli is deployed and returning { brands: [...] }.
  2. Run checks:
pnpm typecheck
pnpm dlx oxlint cli app/api/cli/route.ts
npm --prefix cli run build
  1. Bump cli/package.json version.
  2. Publish @loftlyy/cli.
  3. Smoke test:
npx @loftlyy/cli list
npx @loftlyy/cli search apple
npx @loftlyy/cli get apple