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

@wawjs/waw-core

v26.0.2

Published

**waw-core** is the foundational system module of the waw platform. It provides the default CLI command set used to create, manage, and operate waw projects, and it extends the shared `waw` execution context with a small, stable set of runtime utilities.

Readme

waw-core

waw-core is the foundational system module of the waw platform. It provides the default CLI command set used to create, manage, and operate waw projects, and it extends the shared waw execution context with a small, stable set of runtime utilities. Core is intentionally minimal and opinionated only about developer workflows; it does not implement application logic, frameworks, routing, or data layers.

🤖 AI agents: read AI_INSTRUCTIONS.md first — it is the agent-oriented working guide for this module (conventions to follow, how to extend it, and gotchas to avoid). This README is the human reference.


Responsibilities

waw-core is responsible for:

  • Project scaffolding and initialization (waw new)
  • Module scaffolding (waw add / waw a)
  • CSS framework switching for supported front-end project types (waw css)
  • Synchronization and publishing of module repositories (waw sync)
  • Image asset download / optimization (waw asset)
  • Version reporting (waw version and aliases)
  • PM2-based process management (waw start / stop / restart)
  • Self-maintenance of the waw install (waw wipe, waw update)
  • Providing small runtime helpers attached to the waw object

All functionality is exposed either through CLI commands (cli.js) or through runtime extensions loaded from index.js. cli.js stays thin and delegates to focused utility files (util.scaffold.js, util.maintain.js, util.pm2.js, util.asset.js, util.ai.js, util.runtime.js).


Runtime Extensions

When loaded during runtime, core executes index.js, which requires util.runtime.js and attaches the following helpers to the global waw context:

  • waw.wait(ms) — returns a Promise that resolves after the specified number of milliseconds
  • waw.http(hostname, port = 443) — a minimal HTTP client helper supporting get, post, put, patch, and delete, with mutable request headers and JSON handling

These helpers are intentionally small and synchronous-friendly, and they are meant to be used by other modules rather than replaced.


CLI Commands

CLI commands are implemented in server/core/cli.js and delegated to utility files.

waw new <name> [repo|number] [branch]

Creates a new project directory by cloning a template repository. The project name may be provided as an argument or entered interactively. The template repository can be selected interactively, passed as a numeric option, or provided directly as a URL.

The interactive list offers the built-in starters (waw Server, Angular, React, Vue, Unity) and a set of regional "IT Space" entries. Selecting a space (e.g. IT Kamianets) opens a second menu of that space's project/theme repositories.

If no branch is specified, master is used by default. After cloning, git metadata is removed (waw.git.remove) to keep the generated project clean.


waw add <module> / waw a <module>

Creates a new module inside the project’s modules directory (waw.modulesPath) using the default module template at module/default/. If the module name is not provided, it is requested interactively. The module name is lowercased; if the target folder already exists the command aborts. Scaffolding runs the template’s scaffold.js, which is invoked with a context spread from waw plus name, Name, base (target folder), and template (template root).


waw css

Switches the CSS base for supported front-end project types (angular, react, vue, wjst). The command interactively prompts for a CSS framework, deletes the project’s stylesheet folder, and force-syncs the selected framework repo into it. The folder is src/scss for most project types and scss for wjst. This command exits early for non–front-end projects (when projectType is missing or waw).

Available frameworks per project type include Basic, Bootstrap, Tailwind, Foundation, and Bulma; Angular additionally offers Material. Each maps to a WebArtWork/*-css* repository.


waw sync [commit message] [branch]

Synchronizes module directories based on their module.json repository configuration.

  • Without a commit message, waw sync performs a destructive force-sync from each module’s repository.
  • With a commit message, it publishes the current module state to the repository, enforcing repository hygiene before committing.

If no branch is provided, master is used.


waw asset <image-url> <output-path>

Downloads an image from a URL, resizes it to fit within 512×512 (preserving aspect ratio, never enlarging), converts it to WebP, and writes it relative to the project path. A .webp extension is appended if missing, and parent directories are created as needed. Requires the sharp package, resolved either locally or from the global npm root; if sharp cannot be loaded the command errors out.


waw start, waw stop, waw restart

Manages the running project using PM2. The process name is derived from config.name / config.title or the current working directory. The started script is <wawPath>/util.runtime.js. PM2 settings — exec_mode (default fork), instances (default 1), and max_memory_restart (config.pm2.memory, default 800M) — are read from config.pm2 if present.


waw --version, waw version, waw ver, waw v

Prints the waw install location, the installed waw version (from package.json), and a list of accessible modules. Aliases: --version, -version, --v, -v, version, ver, v.


waw wipe

Removes the server folder from the waw install directory (waw.wawPath). Used to clear out installed server modules.


waw update

Removes the server folder from the waw install and force-syncs the latest waw from https://github.com/WebArtWork/waw.git.


waw love

Prints a friendly message and exits.


waw ai

Prints aggregated AI instructions by concatenating the global AI_INSTRUCTIONS.md, each loaded module’s AI_INSTRUCTIONS.md, and a final description of the Web Art Work ecosystem.


Module Manifest

The core module is defined by server/core/module.json. It declares a repository URL, installs pm2 as a dependency, and is ordered before all other modules using "before": "*" to ensure its CLI commands and runtime helpers are available first.


Development Notes

  • Core must remain stable; changes here affect all waw projects.
  • Keep cli.js thin and delegate logic to util.*.js files.
  • Prefer Node.js APIs over shell commands for portability.
  • Avoid breaking changes unless explicitly versioned and documented.

License

MIT © Web Art Work