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

@swizzyai/swizzy-web-service-cli

v0.1.19

Published

CLI and TUI for managing @swizzyai/swizzy-web-service projects

Readme

@swizzyweb/swizzy-web-service-cli

CLI and TUI for scaffolding and managing @swizzyweb/swizzy-web-service projects.

Installation

npm install -g @swizzyweb/swizzy-web-service-cli

Usage

Run without arguments to launch the interactive TUI:

swizzy

Or pass a command directly for non-interactive use:

swizzy <command> [options]

Commands

create-web-service

Scaffold a new swizzy-web-service project.

swizzy create-web-service --name <name> [--type <type>] [--scope <scope>] [--install]

create-router

Add a new WebRouter to the project.

swizzy create-router --name <name> --path <path> [--no-standard-middleware]

create-controller

Add a new WebController to an existing router.

swizzy create-controller --name <name> --action <action> --router <router> [--method <method>] [--body] [--query] [--implementation-file <path>] [--import <statement>]

--implementation-file reads a file and uses its contents as the getInitializedController body, set at creation time. --import (repeatable) adds any extra import statements the implementation needs.

Controllers generated with --body or --query use SwizzyJsonMiddleware from @swizzyweb/swizzy-web-service for JSON body parsing instead of Express's raw json() middleware.

update-controller-implementation

Replace the getInitializedController body of an existing controller. Prefer this over hand-editing the controller file — it patches only the method body and validates the result is syntactically valid TypeScript before writing, so the surrounding state/request interfaces are never disturbed.

swizzy update-controller-implementation --router <router> --controller <ctrl> --implementation-file <path> [--import <statement>]

update-middleware-implementation

Replace a middleware's handler body, the same way as above.

swizzy update-middleware-implementation --router <router> --middleware <name> --implementation-file <path> [--import <statement>]

add-jsdoc

Add JSDoc comments to routers and controllers in the current project. Targets the whole project by default, or a specific router/controller with --router / --controller.

swizzy add-jsdoc [--router <name>] [--controller <name>]

manage-state

Manage state properties with automatic upward propagation (Controller → Router → WebService → app.ts).

swizzy manage-state --action <add|update|delete> --level <controller|router|service> --name <propName> [--router <router>] [--controller <ctrl>] [--type <type>] [--default <val>]

update-controller-params

Update or delete request body/query parameters for an existing controller.

swizzy update-controller-params --router <router> --controller <ctrl> [--action <upsert|delete>] [--body <fields>] [--query <params>]

add-service-arg / update-service-arg / delete-service-arg

Manage typed service arguments in app.ts and all web-service-config*.json files.

swizzy add-service-arg --name <name> --type <type> [--default <val>]
swizzy update-service-arg --name <name> [--type <newType>] [--default <newVal>]
swizzy delete-service-arg --name <name>

generate-config

Generate a baseline web-service-config.json for a project using its packageName.

swizzy generate-config [--force]

upsert-stack

Create or update a multi-service stack configuration. Handles local paths (auto-detects class names) and NPM packages.

swizzy upsert-stack --service <[ClassName:]location> [--service ...]

Example: swizzy upsert-stack --service MyBackend:./backend --service MyProxy:@swizzyweb/proxy-web-service

list-configs / read-config

Discover and inspect configuration files in the workspace.

swizzy list-configs
swizzy read-config --path <path>

remove-from-stack

Delete a service definition from a stack configuration.

swizzy remove-from-stack --name <ClassName>

build

Build the project (runs npm run build).

run / dev

Run the service or start a dev server with watch mode and auto-restart.

logs

View the most recent logs for a running Swizzy web service or stack.

swizzy logs [dir] [-n, --lines <number>] [-f, --follow]

generate-tests

Generate test stubs for controllers that don't have one yet. Automatically adds @swizzyai/swizzy-web-service-test-framework as a devDependency if it is not already present.

swizzy generate-tests

generate-spec

Generate an OpenAPI 3.0 spec from the current project. Can also scaffold a Node.js client package using @hey-api/openapi-ts.

swizzy generate-spec [--json] [--output <path>] [--client-package] [--client-package-name <name>] [--client-output <dir>]

generate-skeleton

Scaffold a new project from an OpenAPI 3.0 spec file.

swizzy generate-skeleton --spec <path> [--output <dir>]

request

Interactively send HTTP requests to discovered endpoints.


TUI

The interactive TUI has been enhanced with a new Action Menu. Press Enter on any component in the project tree to access all management tasks:

  • Manage State: Interactively add/update/delete state properties with propagation.
  • Manage Parameters: Add/modify/delete request body and query fields.
  • Compose Stack: Build multi-service configurations.
  • Config Discovery: Scan the workspace for configuration files.

Technical Features

  • Robust Patching: AST patchers automatically repair missing commas/semicolons and handle complex nested structures via brace-counting.
  • Syntax Validation: Implementation commands run the TypeScript compiler API over the patched source before writing to disk — invalid patches are rejected without touching the file.
  • Safe Implementation Editing: update-controller-implementation and update-middleware-implementation surgically replace only the method body, leaving all surrounding interfaces and imports intact.
  • Navigation: Full Escape key support and consistent "Back" options throughout.