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

@unlayer/cli

v0.1.0

Published

Command-line interface for Unlayer — manage templates, projects, and workspaces from your terminal

Readme

Unlayer CLI

Command-line interface for Unlayer — manage templates, projects, and workspaces from your terminal.

Installation

npm install -g @unlayer/cli

Requires Node.js 20 or later.

Quick Start

# Create an account (opens browser)
unlayer signup

# Or log in with an existing account
unlayer login

# Scaffold a new project
unlayer init my-app

# List your templates
unlayer template list

# Pull templates to local files
unlayer pull

# Compare local design against remote
unlayer diff ./templates/welcome-email-42.json

Authentication

The CLI uses Personal Access Tokens (PAT) for authentication.

# Interactive login (opens browser, creates PAT automatically)
unlayer login

# Non-interactive login (CI/CD)
unlayer login --token unlayer_pat_...

# Or set via environment variable
export UNLAYER_TOKEN=unlayer_pat_...

Commands

Authentication

| Command | Description | |---------|-------------| | unlayer signup | Create an account and connect your CLI | | unlayer login | Authenticate with a Personal Access Token | | unlayer logout | Clear stored credentials | | unlayer whoami | Display current user information |

Content

| Command | Description | |---------|-------------| | unlayer template list | List templates in a project | | unlayer template search <query> | Search templates by name | | unlayer template get <id> | Get a template by ID | | unlayer pull | Pull all templates to local files | | unlayer diff <file> | Compare a local design against its remote version |

Management

| Command | Description | |---------|-------------| | unlayer workspace list | List all accessible workspaces | | unlayer workspace use [id] | Set the active workspace | | unlayer project list | List all projects | | unlayer project use [id] | Set the active project | | unlayer project info [id] | Get detailed project information | | unlayer config show | Show current configuration | | unlayer config set <key> <value> | Set a configuration value | | unlayer config reset | Reset configuration to defaults | | unlayer status | Check CLI health and connectivity |

Project Setup

| Command | Description | |---------|-------------| | unlayer init [name] | Scaffold a new Unlayer project |

Global Flags

| Flag | Description | |------|-------------| | --json | Output as machine-readable JSON | | --non-interactive | Never prompt; fail if input is needed | | -v, --verbose | Enable verbose logging (to stderr) | | -q, --quiet | Suppress decorative output |

CI environments (CI env var or non-TTY stdin) automatically enable --non-interactive and --quiet.

Project Configuration

Create an unlayer.config.json in your project root to set defaults:

{
  "projectId": null,
  "defaults": {
    "outputDir": "./templates"
  }
}

The CLI walks up from the current directory to find this file (like .gitignore).

CI/CD Integration

#!/bin/bash
export UNLAYER_TOKEN=$UNLAYER_PAT_SECRET

# Pull all templates
unlayer pull --json 2>/dev/null

# Compare against remote
unlayer diff ./templates/welcome-email-42.json --json 2>/dev/null

Output Contract

  • stdout — machine-readable data only (JSON, URLs). Safe to pipe and parse.
  • stderr — human-readable messages, spinners, and errors.
  • In --json mode, errors are written to stderr as {"error": "..."}.

Environment Variables

| Variable | Description | |----------|-------------| | UNLAYER_TOKEN | Personal Access Token (PAT) | | UNLAYER_API_URL | Override API base URL | | UNLAYER_WORKSPACE_ID | Override workspace ID | | UNLAYER_PROJECT_ID | Override project ID | | CI | Enables non-interactive mode |

Development

pnpm install
pnpm build
pnpm dev          # watch mode
pnpm typecheck    # type-check without emitting

License

MIT