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

@selectfromuser/cli

v2.1.1

Published

Command line tool for Select app deployments

Readme

Select CLI

Command line tool for connecting a local project to Select and deploying static app builds.

Install

npm install -g @selectfromuser/cli

Usage

sapp init [template]
sapp connect --key <key>
sapp connect --local --key <key>
sapp env [prod|dev]
sapp use <alias>
sapp deploy
sapp deploy <alias> <path> -m="message"
sapp deployments
sapp deployments <alias>
sapp deployments <alias> files <deployment-id>
sapp deployments <alias> set <deployment-id>
sapp rollback <deployment-id>
sapp rollback <alias> <deployment-id>
sapp apps
sapp apps <id|alias>
sapp apps <id|alias> get
sapp apps <id|alias> update <file>
sapp app create <alias>
sapp member
sapp member signup -loginid <id> --email <email> --phone <phone> --password <password>
sapp member <id|loginid>
sapp member <id|loginid> set --permission=Admin,User,Manager
sapp member <id|loginid> set --propertyKey=LEVEL --propertyValue="1"
sapp member <id|loginid> set --profile="{\"a\":1}"
sapp member login [-loginid <id>] [--password <password>]
sapp api
sapp api list
sapp api info <service>
sapp api describe <service>
sapp api call /<prefix>/<path> --input '{"a":1}'
sapp api call GET /<prefix>/<path>
sapp api call POST /<prefix>/<path> --input '{"a":1}'
sapp api get <service>
sapp api validate <file>
sapp api plan <file>
sapp api apply <file>
sapp api delete <file>
sapp data list
sapp data <id|name>
sapp data <id|name> query --input="SELECT 1"
sapp data <id|name> query --prod --input="SELECT 1"
sapp data <id|name> query
sapp data <id|name> history
sapp db list
sapp open [alias]

sapp connect creates an app.json file in the current directory. Keep app.json private because it contains credentials.

Commands

init

Create a starter app in the current directory.

sapp init
sapp init local-single-html

Templates:

  • local-single-html: local single HTML app with Tailwind CSS CDN. This is the default.
  • local, html, single-html: aliases for local-single-html.

This writes index.html and does not overwrite an existing file.

connect

Connect the current directory to a Select project.

sapp connect --key <key>
sapp connect --local --key <key>

Options:

  • --key <key>: App Deploy Key(pat_) or Agent API Key(pa_). If omitted, the CLI prompts for it.
  • --deployToken <token>, --apiKey <key>: legacy aliases for --key.
  • --local: use http://localhost:9502/v3.
  • --api-base-url <url>: API base URL for this project.

This writes app.json in the current directory and creates or updates AGENTS.md. App Deploy Key login also creates or updates app starter files. Agent API Key login skips app starter files.

use

Set the default app alias for later commands.

sapp use <alias>

After this, commands such as sapp deploy, sapp deployments, and sapp rollback <deployment-id> can use the saved alias.

env

Set the API execution environment used by sapp api call.

sapp env
sapp env dev
sapp env prod

The default environment is dev. sapp api call uses a different endpoint for each environment:

  • dev: apihub-dev...
  • prod: apihub...

For local API base URLs, the CLI uses apihub-dev.localhost:9502 or apihub.localhost:9502.

deploy

Deploy a static app directory. The target directory must contain index.html.

sapp deploy
sapp deploy <alias>
sapp deploy <alias> <path>
sapp deploy <alias> -m="message"
sapp deploy <alias> <path> -m="message"

Arguments:

  • <alias>: app alias. If omitted, the alias saved by sapp use <alias> is used.
  • <path>: directory to deploy. Defaults to the current directory.

Options:

  • -m, --message <message>: deployment message.
  • --path <path>: directory to deploy.

The CLI respects .gitignore and .sappignore in the deploy directory and skips .git, .gitignore, .sappignore, node_modules, and app.json.

deployments

List deployments for an app.

sapp deployments
sapp deployments <alias>

The active deployment is marked with *.

Show the files saved in a deployment:

sapp deployments <alias> files <deployment-id>

Set a previous deployment as the active deployment:

sapp deployments <alias> set <deployment-id>

This is equivalent to rolling back to that deployment.

rollback

Set a deployment as the active deployment.

sapp rollback <deployment-id>
sapp rollback <alias> <deployment-id>

If <alias> is omitted, the alias saved by sapp use <alias> is used.

app

List, inspect, export, update, and create apps.

sapp apps
sapp apps <id|alias>
sapp apps <id|alias> get
sapp apps <id|alias> update <file>
sapp app create <alias>

Commands:

  • sapp apps: list apps for the connected project.
  • sapp apps <id|alias>: show one app summary, access settings, and connected API services.
  • sapp apps <id|alias> get: print editable app YAML.
  • sapp apps <id|alias> update <file>: update app metadata, deploy config, and access settings from YAML.
  • sapp app create <alias>: create an app using the alias as its title. If omitted, the CLI prompts for the alias.

App commands require an App Deploy Key or Agent API Key with the app scope.

open

Open the Select console or app URL in your browser.

sapp open
sapp open <alias>

Without an alias, this opens the Select project console. With an alias, this opens the app URL.

member

Manage project members.

sapp member
sapp member signup -loginid <id> --email <email> --phone <phone> --password <password>
sapp member <id>
sapp member <loginid>
sapp member <id|loginid> set --permission=Admin,User,Manager
sapp member <id|loginid> set --propertyKey=LEVEL --propertyValue="1"
sapp member <id|loginid> set --profile="{\"a\":1}"
sapp member login
sapp member login -loginid <id> --password <password>

Commands:

  • sapp member: list members.
  • sapp member signup: create a member.
  • sapp member <id|loginid>: show member details.
  • sapp member <id|loginid> set --permission=...: replace member roles.
  • sapp member <id|loginid> set --propertyKey=... --propertyValue=...: set one internal property.
  • sapp member <id|loginid> set --profile=...: replace profile_json.
  • sapp member login: call /api/login and save the session token in app.json.

Member commands require an App Deploy Key or Agent API Key with the member scope. sapp member login uses the project API login flow and stores memberSessionToken; sapp api call uses that token when it exists.

api

Inspect, call, and manage project API definitions.

sapp api
sapp api list
sapp api info <service>
sapp api describe <service>
sapp api call /<prefix>/<path> --input '{"a":1}'
sapp api call GET /<prefix>/<path>
sapp api call POST /<prefix>/<path> --input '{"a":1}'
sapp api get <service>
sapp api validate <file>
sapp api plan <file>
sapp api apply <file>
sapp api delete <file>

Commands:

  • sapp api: show API help.
  • sapp api list: list API services and child APIs.
  • sapp api info <service>: show service summary, endpoints, and connected apps.
  • sapp api describe <service>: show the current API service definition as JSON.
  • sapp api call /<prefix>/<path> --input '{"a":1}': test the child API with POST.
  • sapp api call GET /<prefix>/<path>: test the child API with GET.
  • sapp api call POST /<prefix>/<path> --input '{"a":1}': test the child API with POST.
  • sapp api get <service>: show the current API service definition as YAML.
  • sapp api validate <file>: parse and validate a local API service YAML file.
  • sapp api plan <file>: show create/update/no-change status. Updates show only changed lines with - and +.
  • sapp api apply <file>: create or update API services and child APIs from YAML.
  • sapp api delete <file>: delete the child APIs listed under each service in the YAML file.

API commands require an App Deploy Key or Agent API Key with the api scope. sapp api call uses the same internal test endpoints as the API Service page.

Example API service YAML:

name: CRM
prefix: crm
readme: ""
acl:
  mode: owner
apis:
  - method: GET
    path: properties
    query:
      type: http
      method: GET
      url: https://httpbin.selectfromuser.com/anything
      params:
        page: "{{int:page=1}}"
        keyword: "{{keyword=sample}}"
      headers:
        Accept: application/json
      _variables:
        missing: error
    acl:
      mode: published

Multiple API services can be stored in one file with YAML document separators:

name: CRM
prefix: crm
apis:
  - method: GET
    path: properties
    query:
      type: http
      method: GET
      url: https://httpbin.selectfromuser.com/anything
---
name: SQL Tools
prefix: sql-tools
apis:
  - method: POST
    path: users
    query:
      type: sql
      resourceType: mysql
      sql: |
        SELECT *
        FROM users
        WHERE name LIKE CONCAT('%', {{keyword=sample}}, '%')

data

List data resources and run MySQL data queries.

sapp data list
sapp data <id|name>
sapp data <id|name> query --input="SELECT 1"
sapp data <id|name> query --prod --input="SELECT 1"
sapp data <id|name> query
sapp data <id|name> history
sapp db list

Commands:

  • sapp data list: list project resources.
  • sapp data <id|name>: show resource summary.
  • sapp data <id|name> query --input="...": run SQL against the selected resource.
  • sapp data <id|name> query --prod --input="...": run SQL against the production connection.
  • sapp data <id|name> query: prompt for SQL, then run it.
  • sapp data <id|name> history: show recent query pad history.

Data query defaults to dev; pass --prod to use the production connection. Query runs are saved to GenProjectResourcePad with the agent id. Data commands require an App Deploy Key or Agent API Key with the resource scope. sapp db is an alias for sapp data.

Configuration

The default API endpoint is https://apihub.selectfromuser.com/v3.

Set SELECT_API_BASE_URL to override the default API endpoint.

SELECT_API_BASE_URL=http://localhost:9502/v3 sapp connect --key <key>