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

@morphdsl/cli

v0.1.9

Published

Morph cli

Readme

@morph/cli

Code generation from domain schemas

Parse, compile, and decompile .morph DSL files

Quick Start

# Run the CLI
bun run morph --help

Environment Variables

| Variable | Description | | ----------------- | ---------------------------------------------------- | | MORPH_STORAGE | Storage backend: memory, jsonfile, sqlite, redis | | MORPH_DATA_FILE | Path for jsonfile storage (default: .test-data.json) |

Operations

generate

Generate all packages from a domain schema

Parameters:

| Name | Type | Required | Description | | -------- | -------- | -------- | -------------------------------------------- | | name | string | Yes | Project name for package naming | | schema | string | Yes | The domain schema as .morph DSL or JSON text |

Returns: GenerationResult

Errors:

  • InvalidSchemaError: The input schema is malformed

Example:

morph generate <name> <schema>

init

Initialize a new morph monorepo scaffold

Parameters:

| Name | Type | Required | Description | | ------ | -------- | -------- | ------------ | | name | string | Yes | Project name |

Returns: GenerationResult

Example:

morph init <name>

newProject

Create a new morph project (init + generate)

Parameters:

| Name | Type | Required | Description | | -------- | -------- | -------- | -------------------------------------------- | | name | string | Yes | Project name | | schema | string | Yes | The domain schema as .morph DSL or JSON text |

Returns: GenerationResult

Errors:

  • InvalidSchemaError: The input schema is malformed

Example:

morph new-project <name> <schema>

validate

Validate a domain schema

Parameters:

| Name | Type | Required | Description | | -------- | -------- | -------- | -------------------------------------------- | | schema | string | Yes | The domain schema as .morph DSL or JSON text |

Returns: void

Errors:

  • InvalidSchemaError: The input schema is malformed

Example:

morph validate <schema>

decompileSchema

Convert a domain schema JSON to .morph DSL text

Parameters:

| Name | Type | Required | Description | | -------- | -------- | -------- | ---------------------------- | | schema | string | Yes | Domain schema as JSON string |

Returns: string

Errors:

  • InvalidSchemaError: The input is not valid domain schema JSON

Example:

morph decompile-schema <schema>

formatDsl

Format .morph DSL source text (parse and re-emit)

Parameters:

| Name | Type | Required | Description | | -------- | -------- | -------- | ------------------------------------ | | source | string | Yes | The .morph DSL source text to format |

Returns: string

Errors:

  • ParseFailedError: The source could not be parsed

Example:

morph format-dsl <source>

parseMorph

Parse and compile a .morph DSL source to domain schema JSON

Parameters:

| Name | Type | Required | Description | | -------- | -------- | -------- | -------------------------- | | source | string | Yes | The .morph DSL source text |

Returns: ParseResult

Errors:

  • ParseFailedError: The source could not be parsed

Example:

morph parse-morph <source>

validateDsl

Validate a .morph DSL source file

Parameters:

| Name | Type | Required | Description | | -------- | -------- | -------- | -------------------------------------- | | source | string | Yes | The .morph DSL source text to validate |

Returns: void

Errors:

  • ParseFailedError: The source could not be parsed

Example:

morph validate-dsl <source>

templateSchema

Get a template .morph schema showing all available DSL features and field types

Returns: string

Example:

morph template-schema

Errors

| Error | Description | | -------------------- | ------------------------------ | | InvalidSchemaError | The input schema is malformed | | ParseFailedError | The source could not be parsed |