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

@greensecurity/apps-cli

v0.1.0-alpha.0

Published

Build, preview and publish Green Security third-party apps.

Downloads

54

Readme

@greensecurity/apps-cli

Build, preview and publish apps for the Green Security platform. Requires Node.js 22+.

npx @greensecurity/apps-cli login                    # device-code login as yourself
npx @greensecurity/apps-cli create my-app --app-id 42
cd my-app
npx @greensecurity/apps-cli add view gs.company.vendor.detail
npx @greensecurity/apps-cli dev                      # live preview inside the Green Security app
npx @greensecurity/apps-cli build                    # dist/bundle.js + sha384 integrity
npx @greensecurity/apps-cli upload --bundle-url https://cdn.example.com/my-app/0.1.0/bundle.js

The installed binary is gs-apps; every command has --help.

Apps are built on @greensecurity/javascript-sdk >=0.46.0-0 <1.0.0 (apps/runtime's defineApp, apps/ui, apps/hooks). create --no-install works offline; if that SDK release is not on npm yet, install it from a checkout: npm install /path/to/repconnex/api-docs-sdks react react-dom.

| Command | What it does | | ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | login / logout / whoami | OAuth device-code login; tokens stored in ~/.config/greensecurity/credentials.json (0600) per environment. logout revokes the login on the server | | create <name> | Scaffold an app from a template (--template, --app-id, --no-install) | | add view <surface-id> | Add a view to green-app.json and generate its component | | grant permission <resource.action> "<purpose>" | Request an API permission | | grant url <https-url/> "<purpose>" | Allow a connect-src (or --image for img-src) source | | revoke permission\|url … | Remove them again | | validate | Check the manifest (including CSP limits) and that every view is registered in defineApp({ views }) | | dev | Bundle, serve and register a dev session (--localhost, --lan, --tunnel, --tunnel-url) | | build | Production bundle; records ui_extensions.bundle.integrity | | upload | Verify the hosted bundle matches the local build, then publish the manifest | | developers list\|add\|remove | Manage the app's developers (owners only) |

Every command exits with status 0 when it succeeds and 1 when it fails, so validate and upload can gate CI. An unknown command or flag, or a flag value that can't be parsed, also exits non-zero. create uses the default template unless you pass --template.

Back-end-only apps have no views: green-app.json has no ui_extensions, and your own service calls the API with installation tokens. Create one with create <name> --template backend. For such an app:

  • validate checks the manifest only.
  • build says there is nothing to bundle and exits 0.
  • upload posts the manifest without any bundle.
  • dev refuses, because there is no UI to preview.

add view on a back-end-only app turns it into a UI app. It adds src/index.tsx, tsconfig.json and the SDK dependencies (only those missing), and it undoes all of this if any step fails.

Environment: --env local|staging|production or GREEN_SECURITY_API_URL (default production; https, or plain http only to localhost, 127.0.0.1 or [::1], since your login goes with every request). GREEN_SECURITY_WEB_URL overrides the web host used for preview links.

The login is a 15-minute access token plus a single-use refresh token. The CLI renews them when less than a minute is left, or once after a 401, so a long dev session keeps working. The login ends after 30 days without use, and at the latest 90 days after login. Renewal is serialised across concurrent gs-apps processes through a lock (one credentials.json.lock.<id> file per process): presenting a refresh token twice makes the server revoke the whole login. If a renewal's answer is lost, the CLI retries once at once with the same refresh token (the server allows that for 30 seconds); a rate-limited renewal backs off and never ends the login. A login saved by an older gs-apps, before refresh tokens, asks you to run login once more.