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

@citadelfoundation/kit-publishing

v0.1.2

Published

Git-native local-first publishing toolkit for Astro sites and local studio workflows

Readme

@citadelfoundation/kit-publishing

Git-native, local-first publishing primitives for Astro sites. The package ships a public CLI, three built-in site templates, a local studio host, and Astro-facing content loaders.

This package runs on Bun. Node.js is not a supported CLI runtime.

Quick start

bunx @citadelfoundation/kit-publishing create my-site --template starter --deploy cloudflare-pages
cd my-site
bun install
bun run studio:dev

That creates a full Astro site workspace with the publishing content tree, a publication.config.ts, and the local studio entrypoint already wired in.

CLI

create

Create a new site from a built-in template:

bunx @citadelfoundation/kit-publishing create <directory> --template <blank|starter|publication> [--deploy <none|cloudflare-pages>]

Or import a template from a local path, Git repo, or npm package:

bunx @citadelfoundation/kit-publishing create <directory> --from <source> [--subdir <path>] [--deploy <none|cloudflare-pages>]

Supported --from sources:

  • local directory path
  • Git URL or a path ending in .git
  • npm package spec prefixed with npm:

Examples:

bunx @citadelfoundation/kit-publishing create my-site --template publication
bunx @citadelfoundation/kit-publishing create my-site --from ./my-template
bunx @citadelfoundation/kit-publishing create my-site --from npm:@scope/my-template

create refuses non-empty target directories, infers a package name and site title from the target directory, and writes the optional Cloudflare Pages preset when requested.

studio

Start the local publishing studio host for an existing site:

bunx @citadelfoundation/kit-publishing studio --root <directory> [--host <host>] [--port <port>]

The site root must contain publication.config.ts with a named publicationWorkspaceConfig export.

template validate

Validate a portable template before you import or publish it:

bunx @citadelfoundation/kit-publishing template validate <source> [--subdir <path>]

This checks the portable manifest, required workspace files, and dependency shape.

--help

bunx @citadelfoundation/kit-publishing --help
bunx @citadelfoundation/kit-publishing create --help
bunx @citadelfoundation/kit-publishing studio --help
bunx @citadelfoundation/kit-publishing template validate --help

Built-in templates

The package bundles three built-in templates as plain Astro workspaces:

blank

A minimal site with the homepage, docs route, blog route, and the canonical publishing content directories, but no seeded docs or editorial content.

starter

A balanced starting point with one docs section, one docs page, and one sample post.

publication

A more opinionated editorial shape with a richer homepage, multiple docs pages, and a seeded blog.

Portable template contract

Portable templates use kit-publishing.template.json at the template root. Required fields:

  • id
  • label
  • summary
  • audience
  • screenshot
  • supportedDeployPresets
  • kitPublishingVersion

Portable templates are normal Astro site directories. They must not depend on internal-only @citadelfoundation/kit-template-* packages or contain workspace: or file: refs.

supportedDeployPresets must use kit-supported preset ids only and must always include none for the local-first path.

Catalog

The built-in gallery data is exported from:

  • @citadelfoundation/kit-publishing/catalog

That catalog includes:

  • manifest metadata for the built-in templates
  • createCommand
  • runCommand
  • deployCtas
  • inline screenshotDataUrl

Consumer sites can render the built-in gallery directly from that export without duplicating template metadata locally.

Deploy preset

Cloudflare Pages is the only supported alpha preset:

bunx @citadelfoundation/kit-publishing create my-site --template starter --deploy cloudflare-pages

The preset writes local deployment scaffolding such as wrangler.toml. It does not add hosted onboarding or change the local-first publishing workflow.

Library usage

Public entry points:

  • @citadelfoundation/kit-publishing
  • @citadelfoundation/kit-publishing/content
  • @citadelfoundation/kit-publishing/server
  • @citadelfoundation/kit-publishing/studio
  • @citadelfoundation/kit-publishing/astro
  • @citadelfoundation/kit-publishing/types
  • @citadelfoundation/kit-publishing/catalog

Astro loaders

import { loadAstroPublishingSnapshot } from "@citadelfoundation/kit-publishing/astro";

const snapshot = await loadAstroPublishingSnapshot(process.cwd());
if (!snapshot.success) {
  throw new Error(snapshot.error.reason);
}

Local studio host

import { startPublishingStudioHost } from "@citadelfoundation/kit-publishing/studio";

const host = await startPublishingStudioHost({ root: process.cwd() });
if (!host.success) {
  throw new Error(host.error.reason);
}

Workspace config type

import type { PublicationWorkspaceConfig } from "@citadelfoundation/kit-publishing";

export const publicationWorkspaceConfig: PublicationWorkspaceConfig = {
  title: "My Site",
};

The package also supports standalone export and vendored-consumer validation flows. Those exports carry provenance metadata and are intended to remain generated artifacts, not a second long-lived implementation surface.

Keep consumer-specific overlays outside the generated package tree, for example:

  • publication.config.ts
  • publication.policy.ts
  • content/**
  • repo-owned boot, test, and CI wiring

Typecheck verification

Use the verification command that matches the package context:

  • Generated or imported site workspace:

    bun run check
  • Standalone exported package copy:

    bun run typecheck

Prefer Bun-native verification commands inside generated sites or exported copies so validation stays scoped to the package or site you are checking.