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

@fivfold/core

v0.14.3

Published

FivFold Core -- shared engine for VFS, AST, manifests, strategies

Readme

@fivfold/core

DISCLAIMER: This is a pre-alpha release and currently under heavy testing and scrutiny. Until the first stable version (v1.0.0) is released, we advise not to use this in production.

Shared engine for the FivFold CLI. Provides VFS, AST manipulation, manifests, strategies, templates, detection, and prompts. Framework-agnostic; used by both @fivfold/ui and @fivfold/api.

What is @fivfold/core

@fivfold/core is the shared engine that powers all FivFold CLIs. It provides:

  • Virtual File System (VFS): Stage changes in memory, preview, commit atomically
  • Strategy Pipeline: Pluggable generators (domain, ORM, framework)
  • Manifests: Load and resolve Kit manifests (*.kit.json)
  • Template Engine: Handlebars-based templating with helpers
  • AST Engine: ts-morph-based mutations for existing files
  • Detection: Parse package.json, detect stack (NestJS, Express, TypeORM, etc.)
  • Prompts: Parse CLI flags, smart defaults, interactive prompts
  • Workspace: Find project root, run package manager commands

Exports

All public API is exported from @fivfold/core:

VFS

| Export | Description | |--------|-------------| | VirtualFileSystem | Stage create/modify/delete, preview, commit | | VfsOperation, VfsOperationType | Types for staged operations |

Strategy

| Export | Description | |--------|-------------| | StrategyPipeline | Orchestrates strategies in layers | | IGeneratorStrategy, IFrameworkStrategy, IOrmStrategy, IAuthProviderStrategy | Strategy interfaces | | GeneratorContext, StrategyLayer | Context and layer types | | registerStrategy, getStrategy, getStrategiesByLayer, clearStrategies | Registry |

Manifest

| Export | Description | |--------|-------------| | loadManifest, loadUiManifest, resolveManifestPath, resolveOutputPath | Load and resolve manifests | | KitManifest, UiKitManifest, ManifestFile, AstMutation, FrameworkLayerConfig, OrmLayerConfig, AuthProviderConfig | Schema types |

Template

| Export | Description | |--------|-------------| | TemplateEngine, registerTemplateHelpers | Handlebars engine and helpers | | camelCase, pascalCase, kebabCase, snakeCase | Case conversion helpers |

AST

| Export | Description | |--------|-------------| | TsMorphEngine | ts-morph wrapper for AST mutations | | AstMutationResult | Result type | | registerModuleInAppModule | NestJS: add module to AppModule | | registerMiddlewareInExpressApp | Express: add middleware | | addImportIfNotPresent | Add import statement |

Detection

| Export | Description | |--------|-------------| | detectStack, detectPackageManager | Detect framework, ORM, package manager | | DetectedStack | Detected stack type | | parsePackageJson, hasDependency | Parse and query package.json | | PackageJson | Package.json type |

Prompt

| Export | Description | |--------|-------------| | parseGlobalFlags | Parse --yes, --dry-run, etc. | | CliFlags | Parsed flags type | | getSmartDefaults | Defaults based on detected stack | | SmartDefaults | Smart defaults type | | selectFramework, selectOrm, selectDatabase, promptOutputDir, selectAuthProvider, confirmOverwrite | Interactive prompts |

Workspace

| Export | Description | |--------|-------------| | findProjectRoot | Find project root from cwd | | WorkspaceInfo | Workspace info type | | getInstallCommand, runInstall | Package manager install | | PackageManager | Package manager type |

Key Modules

| Path | Contents | |------|----------| | src/vfs/ | VirtualFileSystem, stageCreate/Modify/Delete, preview, commit | | src/strategy/ | StrategyPipeline, IGeneratorStrategy, registry | | src/manifest/ | loadManifest, loadUiManifest, schema types | | src/template/ | TemplateEngine (Handlebars), helpers | | src/ast/ | TsMorphEngine, mutations (registerModuleInAppModule, etc.) | | src/detection/ | detectStack, parsePackageJson | | src/prompt/ | parseGlobalFlags, getSmartDefaults, interactive prompts | | src/workspace/ | findProjectRoot, getInstallCommand, runInstall |

Usage

@fivfold/ui and @fivfold/api depend on @fivfold/core via workspace:*:

{
  "dependencies": {
    "@fivfold/core": "workspace:*"
  }
}

Build

pnpm run build   # Build to dist/
pnpm run dev     # Watch mode

Adding New Capabilities

  • New AST mutations: Add to src/ast/mutations/, export from index.ts
  • New strategies: Implement IGeneratorStrategy (or framework/ORM interfaces) in the api package; core provides the pipeline
  • New template helpers: Use registerTemplateHelpers in the api package