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

@itgkey/integrate-itgkey

v0.4.10

Published

Add itgkey to an existing Next.js app with minimal setup.

Readme

@itgkey/integrate-itgkey

Add itgkey to an existing Next.js app with minimal setup.

Usage

npx @itgkey/integrate-itgkey@latest

Or target a specific directory:

npx @itgkey/integrate-itgkey@latest ./my-next-app

The CLI will:

  • Add keystatic.config.ts
  • Add page-builder.ts
  • Add editor/device-visibility-* helper files for responsive block visibility controls
  • Add app/renderBlocks.tsx and app/LivePreviewPage.tsx (or src/app/...)
  • Add app/page-records.ts for page collection reads and nested navigation
  • Add app/CmsWidget.tsx and app/CmsSessionBeacon.tsx when scaffolding CMS-aware routes
  • Add API route files under app/api/keystatic/[...params]/route.ts (or src/app/...)
  • Add app/api/link-options/route.ts for page/post link lookups
  • Add admin UI route files under app/keystatic (or src/app/keystatic)
  • Add dynamic frontend routes (/ and /[...slug]) with block rendering
  • Add posts route rendering with block content (/posts/[slug])
  • Add starter content files (pages/hi.yaml, settings/index.yaml, posts/first-post.yaml)
  • Add itgkey-blocks.ts for user-defined component/block schemas
  • Add .github/prompts/itgkey-migration-agent.prompt.md for Codex-driven project-specific migration
  • Add postcss.config.js and tailwind.config.js so block styling works like the template
  • Optionally install required runtime + styling dependencies

When existing frontend routes are detected, the CLI defaults to preserve mode:

  • Keeps your existing frontend route files and layout files
  • Adds preview routes under /itgkey-preview
  • Adds app/itgkey-responsive.tsx helper to convert existing page sections into responsive blocks

When existing itgkey files are detected, the CLI can rebuild managed files to the latest scaffold and remove legacy preview/live [slug] routes that can shadow the new [...slug] routes.

Migration rule: user-facing copy should be CMS-driven.

  • During migration, map current page titles/text/buttons into block fields in Keystatic.
  • Avoid hardcoding site copy in components so content stays editable from /keystatic.
  • Treat each existing frontend component/section as its own block (no mega catch-all block).
  • After migration, verify multiple routes work (at minimum: /, /keystatic, /itgkey-preview, /itgkey-preview/[slug], and one real /posts/[slug] route if posts exist).