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

@segly/cli

v0.1.0

Published

Agent-friendly command line and MCP client for Segly image segmentation

Readme

@segly/cli

Agent-friendly CLI and local MCP server for the Segly v1 API.

npx @segly/cli auth use-key
npx @segly/cli layers predict character.png \
  --workflow character-simple > layers.json
npx @segly/cli segment create character.png \
  --workflow character-simple \
  --layers-file layers.json \
  --max-credits 5

Review layers.json before the paid command. Prediction is authenticated but costs zero credits; segmentation starts only after the exact reviewed layer list and the explicit five-credit limit are supplied.

As a journaled alternative, segment create --predict-layers --max-credits 5 uploads and predicts but deliberately stops before paid submission. Review the returned layers and retain its operation_id, then rerun the same command with that --operation-id plus --accept-predicted-layers. The acceptance flag submits the stored proposal exactly once; it never silently accepts a fresh prediction.

Browser OAuth is available through segly auth login when Segly's OAuth discovery metadata reports an active authorization server. Dark-gated machine enrollment and recovery are exposed through segly machine create and segly auth recover; they report unavailable until the payment and legal launch gates are enabled.

segment create is asynchronous by default. Add --wait to wait for a terminal result, and --download ./results to prepare and download an artifact after a successful result.

Authentication

Set SEGLY_API_KEY, pipe a key into segly auth use-key, or enter it at the hidden interactive prompt. The CLI uses the Linux desktop secret service when secret-tool is available. Its fallback is a mode-0600 file inside a mode-0700 Segly config directory on Unix systems and current-user Windows DPAPI encryption on Windows. Recovery and webhook signing secrets are stored separately from the normal credential.

The default API is https://api.segly.io. Override it with SEGLY_API_URL or --api-url for staging and local development.

Safe automation

  • Output is JSON on stdout; progress goes to stderr.
  • Every paid request requires --max-credits 5.
  • Multiple images also require --max-total-credits.
  • Explicit layers can be repeated with --layer or loaded from a JSON array, prediction response, or newline list with --layers-file.
  • --predict-layers is preview-only until the same operation is resumed with --accept-predicted-layers.
  • Retriable paid requests reuse a journaled idempotency key.
  • Use --operation-id to resume a command after a process or network failure.
  • Purchases are explicit and never triggered by an insufficient-credit error.

Run npx @segly/cli mcp to expose the same operations over stdio MCP.