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

@orbitneststudio/cli

v0.5.0

Published

Command-line interface for the OrbitNest platform — auth, projects, migrations, type generation, and SQL.

Readme

@orbitneststudio/cli

The command-line interface for the OrbitNest platform.

orbitnest brings the day-to-day backend workflow into your terminal and your repo: sign in once, link a directory to a project, run versioned SQL migrations, and generate TypeScript types straight from your live schema — the same ergonomics you expect from a modern backend toolchain.

npm install -g @orbitneststudio/cli
# or run without installing:
npx @orbitneststudio/cli --help

Requires Node.js 18+.


Quick start

# 1. Sign in (credentials are stored in ~/.orbitnest/credentials.json, mode 0600)
orbitnest login

# 2. Link the current directory to one of your projects
orbitnest link my-project        # by slug, name, or id
#   → writes .orbitnest/config.json (safe to commit)

# 3. Scaffold and apply a migration
orbitnest migration new "create posts table"
#   → edits migrations/001_create_posts_table.sql
orbitnest db push

# 4. Generate types from the live schema
orbitnest gen types              # → orbitnest.types.ts

Commands

Auth

| Command | Description | | --- | --- | | orbitnest login | Sign in. Reads --email / --password, then ORBITNEST_EMAIL / ORBITNEST_PASSWORD, then prompts interactively (password input is masked). | | orbitnest logout | Revoke the refresh token and clear the local session. | | orbitnest whoami | Show the current session, API URL, and token expiry. |

Projects

| Command | Description | | --- | --- | | orbitnest projects | List your projects (name, slug, id). | | orbitnest link [id\|slug\|name] | Link the current directory to a project. With no argument and a single project, links it automatically; otherwise lists choices. Writes .orbitnest/config.json. |

Database & migrations

| Command | Description | | --- | --- | | orbitnest migration new <name> | Scaffold migrations/NNN_<name>.sql with up / -- migrate:down sections. | | orbitnest db push | Apply every pending migration in order, inside a transaction each. | | orbitnest db status | Show which migrations are applied, pending, or modified-after-apply. | | orbitnest db rollback [id] | Roll back the latest applied migration (or a specific id) using its -- migrate:down section. | | orbitnest db reset --yes | Destructive. Drop every table in the project (internal auth_* tables are spared) and re-apply all migrations from scratch. Requires --yes. | | orbitnest db sql "<SQL>" | Run ad-hoc SQL against the linked project. --file <path> runs a file. | | orbitnest db connect | Print the direct Postgres connection string (when the deployment has direct connections enabled). | | orbitnest gen types | Introspect the schema and emit TypeScript interfaces + a Database map. --out <file> (default orbitnest.types.ts) or --stdout. |

Integrations

| Command | Description | | --- | --- | | orbitnest webhooks list | List the project's webhooks. | | orbitnest webhooks create --url <u> [--events INSERT,UPDATE,DELETE] [--table <t>] [--name <n>] | Create a webhook (prints the signing secret once). | | orbitnest webhooks delete <id> / test <id> | Remove a webhook / send it a test event. | | orbitnest sms get | Show the project's Twilio/SMS config. | | orbitnest sms set [--sid <s>] [--token <t>] [--from <n>] [--enable\|--disable] | Configure Twilio (auth token stored encrypted). | | orbitnest sms test <phone> | Send a test SMS. |

Options

| Option | Applies to | Description | | --- | --- | --- | | -p, --project <id\|slug> | db / gen | Target a specific project, overriding the linked one. | | -d, --dir <path> | migration / db | Migrations directory (default migrations). | | -o, --out <file> | gen types | Output file. | | --stdout | gen types | Print to stdout instead of a file. | | -f, --file <path> | db sql | Read SQL from a file. | | --url <url> | login | API base URL (default https://api.orbitnest.io). | | -h, --help | — | Show help. | | -v, --version | — | Show version. |


Migrations

A migration is a plain .sql file named NNN_description.sql. The numeric prefix defines apply order. An optional -- migrate:down line splits the file into a forward (up) section and a rollback (down) section:

-- Migration 001: create posts table
-- Forward (up) SQL — applied by `orbitnest db push`.
CREATE TABLE posts (
  id   uuid PRIMARY KEY DEFAULT gen_random_uuid(),
  title text NOT NULL,
  created_at timestamptz DEFAULT now()
);

-- migrate:down
-- Rollback SQL — applied by `orbitnest db rollback`.
DROP TABLE posts;

How it works:

  • A migrations registry table tracks migration_id, name, checksum, executed_at, and status.
  • Each migration runs wrapped in BEGIN; … COMMIT; — a failure rolls the whole file back and is recorded as failed.
  • Already-applied migrations are skipped. If an applied file's checksum no longer matches, db push refuses to continue (add a new migration instead of editing history).

Type generation

orbitnest gen types reads information_schema.columns for your public schema (skipping internal auth_*, pg_*, and _* tables) and emits a strongly-typed module:

// Generated by @orbitneststudio/cli — do not edit by hand.
export interface Posts {
  id: string;
  title: string;
  created_at?: string | null;
}

export interface Database {
  "posts": Posts;
}

Re-run it after every schema change and commit the output, or wire it into a predev / prebuild script.


Configuration & files

| Path | Scope | Contents | | --- | --- | --- | | ~/.orbitnest/credentials.json | global, 0600 | Access/refresh tokens, API URL, user. Shared with the OrbitNest MCP server. | | ./.orbitnest/config.json | per-directory | Linked projectId, slug, name. Safe to commit. |

Environment variables (override stored values):

  • ORBITNEST_API_URL — API base URL.
  • ORBITNEST_EMAIL, ORBITNEST_PASSWORD — non-interactive login.
  • NO_COLOR — disable ANSI colors.

Development

npm install
npm run build      # bundle to dist/ with tsup (CJS + shebang)
npm run dev        # watch mode
npm run typecheck  # tsc --noEmit

node dist/index.js --help

License

MIT © OrbitNest