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

@damatjs/cli-module

v1.0.6

Published

Damat module authoring and installation CLI capability

Readme

@damatjs/cli-module

Standalone capabilities for authoring and installing Damat modules.

import { moduleCliCapability } from "@damatjs/cli-module";

module plan/add/list/update/remove use the same transactional engine as Kit and accept registry refs, paths, directories, Git, npm, and tarballs. Source is stable and editable. Node and Damat package storage are explicit early-alpha modes requiring --experimental-package. Installation targets may be overridden repeatedly, for example --target routes=src/http --target jobs=src/workers.

The installer owns only files it adds. It never edits damat.config.ts, tsconfig.json, .env*, barrels, or call sites; commands report that work for the user or AI. Module scaffolds write root damat.json and rely on conventional src/index.ts discovery.

Source capability mappings are split into backend-owned roots. Routes install under src/api/routes/<id>, workflows under src/workflows/<id>, jobs under src/jobs/<id>, events under src/events/<id>, pipelines under src/pipelines/<id>, and links under src/links/<id>. The remaining module implementation stays under src/modules/<id>.

Provider modules use these same commands and remain kind: "module". Their installation instructions tell the backend owner which top-level provider role to bind after registering the installed module.

The package also owns module init/dev/build/validation, migrations, codegen, and the embedded authoring guide.

A fresh scaffold declares only the module and tests capabilities it actually contains. Model, migration, route, workflow, job, event, pipeline, link, and generated type paths are added only when those artifacts exist, so a new package can be planned, loaded, and started immediately.

module init accepts or interactively collects PostgreSQL credentials, writes both .env.example and ignored .env, installs dependencies, creates the module development database, and applies that module's migrations. Its database:setup command is intentionally module-scoped: a backend remains the owner of shared durability, jobs, durable-event, and pipeline catalogs. Initialization also creates a main Git repository and initial commit by default. Pass --no-git to skip the Git probe and all repository commands; missing Git or setup failures warn while preserving the complete scaffold.

module dev owns development preflight and lifecycle. It loads the environment and normalized capability plan, rejects an occupied fixed port before creating the watcher or database pool, creates a missing database only for a database-backed module, and then starts the watched standalone runtime. The child prints readiness directly after listening, including the /api mount and Ctrl-C guidance, and reports the actual port selected by --port 0. On a source change, the CLI asks the current child to shut down, awaits worker and resource cleanup, and only then starts its replacement. Interactive Ctrl-C may reach the foreground parent and child together. The watcher requests graceful stop over IPC, and the child acknowledges its idempotent shutdown. An operating-system signal is reserved for an unacknowledged fallback, avoiding duplicate signals during worker cleanup.

All module failures honor the composed CLI's global verbose mode. Both damat --verbose module dev and damat module dev --verbose include the underlying error and stack.

module build type-checks with the module project's installed TypeScript compiler through bun run tsc --noEmit; it does not use registry resolution.

See internals and the manifest contract.