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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@constructive-io/cli

v0.0.3

Published

Platform for schemas, APIs, and application programming

Downloads

231

Readme

constructive — Platform for building Schemas, APIs, and Apps

A unified cloud platform for data, APIs, and application development.

constructive brings together everything teams need to model data, ship APIs, and deploy modern applications. It provides a modular foundation for defining schemas, automating infrastructure, and delivering fast, secure experiences—without the complexity of traditional backend stacks.

✨ Features

  • 🧱 Modular Building Blocks — Compose your app from reusable modules for data, logic, storage, and services. Swap, version, and extend components without rewriting your backend.
  • 🔄 Automated Schema & API Generation — Define your data and relationships once; get auto-generated APIs, migrations, types, and client code across languages.
  • ☁️ Zero-Config Cloud Deployments — Push code, get production. Deploy databases, APIs, functions, and frontends with instant environments and built-in rollout safety.
  • 🏗️ Full-Stack Workspacesconstructive init creates a complete workspace with data models, API routes, auth, edge functions, and CI/CD already wired together.
  • 📊 Versioned Infrastructure — Every schema, API, and service change is tracked and versioned, enabling reproducible deployments and safe rollbacks.
  • 🌐 Portable by Design — Built on open standards and SQL-first workflows, your app runs anywhere—from the constructive cloud to your own infra.
  • 🚀 Optimized Developer Experience — Type-safe SDKs, hot reloading for data and APIs, local-first dev, and zero boilerplate to get from idea → production fast.

🚀 Quick Start

Install & Setup

# Install constructive globally
npm install -g @constructive-io/cli

# Start local Postgres (via Docker) and export env vars
constructive docker start
eval "$(constructive env)"

Tip: Already running Postgres? Skip the Docker step and just export your PG* vars.


Create a Workspace and Install a Package

# 1. Create a workspace
constructive init --workspace
cd my-app

# 2. Create your first module
constructive init
cd packages/your-module

# 3. Install a package
constructive install @pgpm/faker

# 4. Deploy everything
constructive deploy --createdb --database mydb1
psql -d mydb1 -c "SELECT faker.city('MI');"
>  Ann Arbor

🛠️ Commands

Getting Started

  • constructive init - Initialize a new module
  • constructive init --workspace - Initialize a new workspace

Development Setup

  • constructive docker start - Start PostgreSQL container (via Docker)
  • constructive docker stop - Stop PostgreSQL container
  • constructive env - Print PostgreSQL environment variables for shell export

Database Operations

  • constructive deploy - Deploy database changes and migrations
  • constructive verify - Verify database state matches expected migrations
  • constructive revert - Safely revert database changes

Migration Management

  • constructive migrate - Comprehensive migration management
  • constructive migrate init - Initialize migration tracking
  • constructive migrate status - Check migration status
  • constructive migrate list - List all changes
  • constructive migrate deps - Show change dependencies

Module Management

  • constructive install - Install database modules as dependencies
  • constructive extension - Interactively manage module dependencies
  • constructive tag - Version your changes with tags

Packaging and Distribution

  • constructive plan - Generate deployment plans for your modules
  • constructive package - Package your module for distribution

Utilities

  • constructive add - Add a new database change
  • constructive remove - Remove a database change
  • constructive export - Export migrations from existing databases
  • constructive clear - Clear database state
  • constructive kill - Clean up database connections
  • constructive analyze - Analyze database structure
  • constructive rename - Rename database changes
  • constructive admin-users - Manage admin users

💡 Common Workflows

Starting a New Project and Adding a Change

# 1. Create workspace
constructive init --workspace
cd my-app

# 2. Create your first module
constructive init
cd packages/new-module

# 3. Add some SQL migrations to sql/ directory
constructive add some_change

# 4. Deploy to database
constructive deploy --createdb

Working with Existing Projects

# 1. Navigate to your module
cd packages/your-module

# 2. Install a package
constructive install @pgpm/faker

# 3. Deploy all installed modules
constructive deploy --createdb --database mydb1
psql -d mydb1 -c "SELECT faker.city('MI');"
>  Ann Arbor

Testing a module in a workspace

# 1. Install workspace dependencies
pnpm install

# 2. Enter the packages/<yourmodule>
cd packages/yourmodule

# 3. Test the module in watch mode
pnpm test:watch

Database Operations

constructive deploy

Deploy your database changes and migrations.

# Deploy to selected database
constructive deploy

# Create database if it doesn't exist
constructive deploy --createdb

# Deploy specific package to a tag
constructive deploy --package mypackage --to @v1.0.0

# Fast deployment without transactions
constructive deploy --fast --no-tx

constructive verify

Verify your database state matches expected migrations.

# Verify current state
constructive verify

# Verify specific package
constructive verify --package mypackage

constructive revert

Safely revert database changes.

# Revert latest changes
constructive revert

# Revert to specific tag
constructive revert --to @v1.0.0

Migration Management

constructive migrate

Comprehensive migration management.

# Initialize migration tracking
constructive migrate init

# Check migration status
constructive migrate status

# List all changes
constructive migrate list

# Show change dependencies
constructive migrate deps

Module Management

constructive install

Install database modules as dependencies.

# Install single package
constructive install @pgpm/base32

# Install multiple packages
constructive install @pgpm/base32 @pgpm/faker

constructive extension

Interactively manage module dependencies.

constructive extension

constructive tag

Version your changes with tags.

# Tag latest change
constructive tag v1.0.0

# Tag with comment
constructive tag v1.0.0 --comment "Initial release"

# Tag specific change
constructive tag v1.1.0 --package mypackage --changeName my-change

Packaging and Distribution

constructive plan

Generate deployment plans for your modules.

constructive plan

constructive package

Package your module for distribution.

# Package with defaults
constructive package

# Package without deployment plan
constructive package --no-plan

Utilities

constructive export

Export migrations from existing databases.

constructive export

constructive kill

Clean up database connections and optionally drop databases.

# Kill connections and drop databases
constructive kill

# Only kill connections
constructive kill --no-drop

⚙️ Configuration

Environment Variables

constructive uses standard PostgreSQL environment variables (PGHOST, PGPORT, PGDATABASE, PGUSER, PGPASSWORD).

Quick setup (recommended):

eval "$(constructive env)"

Manual setup (if you prefer):

export PGHOST=localhost
export PGPORT=5432
export PGDATABASE=myapp
export PGUSER=postgres
export PGPASSWORD=password

Supabase local development:

eval "$(constructive env --supabase)"

Getting Help

Command Help

# Global help
constructive --help

# Command-specific help
constructive deploy --help
constructive tag -h

Common Options

Most commands support these global options:

  • --help, -h - Show help information
  • --version, -v - Show version information
  • --cwd <dir> - Set working directory

Credits

🛠 Built by Constructive — if you like our tools, please checkout and contribute to our github ⚛️

Disclaimer

AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED "AS IS", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.

No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.