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

@objectstack/cli

v3.0.6

Published

Command Line Interface for ObjectStack Protocol

Readme

@objectstack/cli

Command Line Interface for building metadata-driven applications with the ObjectStack Protocol.

Installation

pnpm add -D @objectstack/cli

The CLI is available as objectstack or the shorter alias os.

Quick Start

# Initialize a new project
os init my-app

# Generate metadata
os generate object task
os generate view task
os generate flow task

# Validate configuration
os validate

# Start development server
os dev

# Compile for production
os compile

Commands

Development

| Command | Description | |---------|-------------| | os init [name] | Initialize a new ObjectStack project in the current directory | | os dev [package] | Start development mode with hot reload | | os serve [config] | Start the ObjectStack server with plugin auto-detection |

Build & Validate

| Command | Description | |---------|-------------| | os compile [config] | Compile configuration to a JSON artifact (dist/objectstack.json) | | os validate [config] | Validate configuration against the ObjectStack Protocol schema | | os info [config] | Display metadata summary (objects, fields, apps, agents, etc.) |

Scaffolding

| Command | Description | |---------|-------------| | os generate <type> <name> | Generate metadata files (alias: os g) | | os create <type> [name] | Create a new package/plugin/example from template |

Available generate types: object, view, action, flow, agent, dashboard, app

Plugin Management

| Command | Description | |---------|-------------| | os plugin list [config] | List plugins defined in configuration (alias: os plugin ls) | | os plugin info <name> [config] | Show detailed plugin information | | os plugin add <package> | Add a plugin import and entry to config | | os plugin remove <name> | Remove a plugin from config (alias: os plugin rm) |

Quality

| Command | Description | |---------|-------------| | os test [files] | Run Quality Protocol test scenarios against a running server | | os doctor | Check development environment health |

Configuration

The CLI looks for objectstack.config.ts (or .js, .mjs) in the current directory:

import { defineStack } from '@objectstack/spec';
import * as objects from './src/objects';

export default defineStack({
  manifest: {
    id: 'com.example.my-app',
    namespace: 'my_app',
    version: '1.0.0',
    type: 'app',
    name: 'My App',
  },
  objects: Object.values(objects),
});

CLI Options

Global

  • -v, --version — Show version number
  • -h, --help — Show help

os init

  • -t, --template <template> — Template: app (default), plugin, empty
  • --no-install — Skip dependency installation

os compile

  • -o, --output <path> — Output path (default: dist/objectstack.json)
  • --json — Output compile result as JSON (for CI pipelines)

os validate

  • --strict — Treat warnings as errors
  • --json — Output result as JSON

os serve

  • -p, --port <port> — Server port (default: 3000)
  • --dev — Run in development mode (load devPlugins, pretty logging)
  • --no-server — Skip starting HTTP server plugin

os generate

  • -d, --dir <directory> — Override target directory
  • --dry-run — Preview without writing files

os plugin list

  • --json — Output as JSON

os plugin add

  • -d, --dev — Add as a dev-only plugin
  • -c, --config <path> — Configuration file path

os plugin remove

  • -c, --config <path> — Configuration file path

Plugin CLI Extensions

Plugins can extend the CLI with custom commands via the contributes.commands manifest field. The CLI automatically discovers and loads these commands at startup.

How to Create a CLI Plugin

1. Declare commands in the plugin manifest:

export default defineStack({
  manifest: {
    id: 'com.acme.marketplace',
    version: '1.0.0',
    type: 'plugin',
    name: 'Marketplace Plugin',
    contributes: {
      commands: [
        {
          name: 'marketplace',
          description: 'Manage marketplace applications',
          module: './dist/cli.js',
        },
      ],
    },
  },
});

2. Export Commander.js commands from the module:

// src/cli.ts
import { Command } from 'commander';

const marketplaceCommand = new Command('marketplace')
  .description('Manage marketplace applications')
  .addCommand(
    new Command('search')
      .argument('<query>')
      .action(async (query) => { /* ... */ })
  )
  .addCommand(
    new Command('install')
      .argument('<app>')
      .action(async (app) => { /* ... */ })
  );

// Named export (recommended)
export const commands = [marketplaceCommand];
// Also supports: export default Command | Command[]

3. Register the plugin in the host project and use:

os plugin add @acme/plugin-marketplace
os marketplace search "crm"
os marketplace install com.acme.crm

For a complete guide, see the Plugin CLI Extensions section in the Plugins guide.

os info

  • --json — Output as JSON

os doctor

  • -v, --verbose — Show fix suggestions for warnings

Typical Workflow

os init                          # 1. Create project
os generate object customer      # 2. Add a Customer object
os generate object order         # 3. Add an Order object  
os generate view customer        # 4. Add a list view
os plugin add @objectstack/plugin-auth  # 5. Add auth plugin
os validate                      # 6. Validate everything
os dev                           # 7. Start dev server
os compile                       # 8. Build for production

License

Apache-2.0