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

@tailor-platform/sdk-plugin-studio

v0.1.0

Published

Tailor CLI plugin providing the `tailor studio` command (local web UI shell for CLI plugins)

Readme

@tailor-platform/sdk-plugin-studio

Tailor CLI plugin that provides tailor studio: a local web UI shell, built with AppShell, that hosts the UIs of other CLI plugins on a single port.

[!NOTE] This package is a CLI plugin: it ships an external tailor-studio executable that the Tailor CLI dispatches to when you run tailor studio. It is a beta feature.

Installation

npm install -D @tailor-platform/sdk-plugin-studio

Usage

# Serve the UI on port 7777 (or the next free port) and print its URL
tailor studio

# Prefer another port and open the browser
tailor studio --port 8080 --open

The server listens on 127.0.0.1 only. It is meant for a machine you use alone: any other user or process on the same machine can reach the port, and what a tab does runs with your stored login. The checks on each request keep other web pages in your browser out; they do not authenticate a client on the same machine. The default tab is the TailorDB ERD viewer from @tailor-platform/sdk-plugin-tailordb-erd; without that plugin the tab shows how to install it.

Profile

The header at the top of the page shows the profile (and the workspace it points to) that every tab works against, and switches it. The profiles are the ones of tailor profile list. --profile (or TAILOR_PLATFORM_PROFILE) gives the first selection; a profile that does not exist stops the start. The "New profile" button next to the selector creates a profile (name, a user logged in with tailor login, a workspace that user can see, and read/write permission) and selects it. The platform is the one the environment names when tailor studio starts (TAILOR_PLATFORM_URL, TAILOR_PLATFORM_OAUTH2_CLIENT_ID, TAILOR_PLATFORM_CONSOLE_URL): only users logged in on it are offered, their workspaces are read from it, and the new profile stores it. When the environment changes any of them, the header shows a platform: <URL> badge (hover for all the values) and the New profile dialog lists them. The choice is remembered per project in node_modules/.cache/tailor-studio/, so the next tailor studio in the same project starts with it (--profile wins when given). The header turns gray while no profile is selected.

Mounting a plugin's UI

A plugin that provides a tab declares its UI in package.json. The shell currently has one built-in tab, the ERD viewer; discovering the tabs of other plugins is not implemented yet, so this is the contract a plugin's UI has to follow:

{
  "tailorUi": { "id": "my-plugin", "title": "My plugin", "kind": "module", "entry": "./dist/ui.js" }
}

entry must have a default export of type UiHandler, a Web-standard (request, context) => Response:

import { selectionArgs, type UiHandler } from "@tailor-platform/sdk-plugin-studio";

const handler: UiHandler = (request, { basePath, getSelection, onSelectionChange }) =>
  new Response("...");
export default handler;
  • The shell serves the handler under /plugins/<id>/. The request URL it receives has that prefix removed, and basePath is the prefix. Reference assets and APIs with relative URLs.
  • The shell checks every request before it reaches a handler. A request a browser marks Sec-Fetch-Site: cross-site or same-site is rejected, so another page cannot make the browser call a handler; opening the UI from the address bar, a bookmark or --open is unaffected. A request other than GET / HEAD must be marked Sec-Fetch-Site: same-origin, and an Origin it carries must be a local one. A browser sets that mark itself, so a page of another site cannot make it write: fetch from the plugin's page works without any extra header, and a client that does not set the mark, such as curl, is rejected.
  • getSelection() returns the profile / workspace chosen in the bar, { profile?, workspaceId? }, as of that call. selectionArgs(getSelection()) turns it into tailor options (--profile=<name>; the workspace is the one the profile points to when the command runs) and is empty while nothing is selected, in which case the tab should ask the user to choose one in the bar.
  • A tailor command a tab starts for the selection must run with selectionEnv(getSelection()) as its environment. tailor studio starts with the startup user's TAILOR_PLATFORM_TOKEN, the startup profile's TAILOR_PLATFORM_URL and TAILOR_PLATFORM_OAUTH2_CLIENT_ID, and its workspace in TAILOR_PLATFORM_WORKSPACE_ID. The CLI prefers the token and the workspace to --profile and uses the platform for what the profile does not store, so without selectionEnv a command for another profile runs with the wrong user's credentials, on the wrong platform or in the wrong workspace. While nothing is selected the four are kept.
  • onSelectionChange(listener) calls listener whenever the choice changes, from any open window, and returns the function that stops it. A listener that throws is reported in the server log and does not stop the other listeners or fail the change. A tab that keeps work running against the selection can stop it there instead of polling getSelection().
  • A handler may return a streaming text/event-stream response.
  • id is the tab's route (/<id>), so api, plugins and assets are rejected.
  • Only kind: "module" is supported. kind: "process" is reserved for plugins that run as a separate process and is rejected for now.