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

create-leji

v1.4.1

Published

Bootstrap a Leji context layer: `npm create leji` runs `leji init` on a new repository and `leji adopt` on one that already has docs or an agent entrypoint. Leji is the open specification for the shared context layer of AI-native teams.

Readme

create-leji

Bootstrap a Leji context layer with one command. Leji is the open specification for the shared context layer of AI-native teams.

npm create leji@latest            # the current directory
npm create leji@latest my-app     # a directory, created if it is not there yet

No install step: npm create fetches the package, runs it once, and leaves nothing behind. npx create-leji@latest does the same thing.

What it runs

create-leji looks at the target directory once and delegates to the leji CLI. It asks no question of its own and writes nothing itself.

| The target directory | What runs | | --- | --- | | does not exist yet, or has nothing to adopt | leji init | | has a docs root (docs/, doc/, documentation/, any capitalization) or an agent entrypoint (CLAUDE.md, AGENTS.md, GEMINI.md, .cursorrules, .cursor/rules, .windsurfrules, .github/copilot-instructions.md) | leji adopt | | already has a leji.json | nothing. It names the next command, leji start, and exits 0 | | cannot be read: a file, a broken symlink, or a directory without permission | nothing. It exits 2 |

Only the target directory is inspected, at those exact paths. Nothing is searched recursively, so pointing it at one package of a monorepo classifies that package and not the repository around it. Nothing outside the target decides the answer either: each path is resolved before it is read, and one that resolves outside the target, or to nothing at all, counts as absent. A docs symlink pointing somewhere else is not a docs root here.

It is a heuristic, and it can be wrong: a generated docs/ that is not documentation reads as an existing repository, and a code repository whose only entrypoint is CLAUDE.md does too.

Overrides

npm create leji@latest -- --init     # scaffold a new layer, whatever is there
npm create leji@latest -- --adopt    # scaffold alongside what is there

--init and --adopt force the branch and are the escape hatch when the routing rule reads your repository wrong. They take a directory like any other invocation (npm create leji@latest my-app -- --adopt). Giving both is an error.

Flags

Everything else passes straight through to the command that runs, in order, so every flag it accepts works here:

npm create leji@latest my-app -- --yes --level indexed --name acme-context

leji init and leji adopt do not declare the same flags: --level and --name are init's, --wire-adapters is adopt's. A flag the routed command does not declare is a usage error from leji's own flag check, not something create-leji absorbs, so when you need a branch-specific flag, pick the branch with --init or --adopt rather than relying on the routing rule.

The target directory is the positional argument, or a --dir <path> you write yourself, or --root <path> when there is no --dir, or the current directory, in that order. Both flags take either spelling, --dir <path> or --dir=<path>, as leji does. That is exactly how leji resolves it, so the directory the routing rule reads is always the directory the command acts on. Give it once: a positional plus --dir in either spelling is an error.

Package managers differ in how flags reach the package. npm needs -- before them:

npm create leji@latest -- --yes
pnpm create leji --yes
yarn create leji --yes
bun create leji --yes
npx create-leji@latest --yes

--yes takes every default and asks nothing, which is what CI wants. --dry-run prints the write plan and touches no file.

  • Specification: https://leji.org
  • License: Apache-2.0