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

llmview

v0.6.1

Published

Reusable views of code for LLM context

Readme

llmview

Reusable views of code for LLM context.

Designed for a middle ground in AI-assisted coding. Rather than copying files manually or letting an LLM agent run its own commands to search your codebase, define views once and reuse them as your code evolves.

Quick start

Install from npm:

npm i -g llmview

Create a .mdx file in your project that describes the context you want to share:

This is my Python backend project.

## Project structure

<llmview treeOnly globs={['**']} />

## Project configuration

<llmview globs={['pyproject.toml', 'Makefile', '.gitignore']} />

## Application code

<llmview globs={['src/my_backend/**', '!src/my_backend/migrations/**']} />

## General documents

<llmview globs={['docs/*.md']} />

## Skills

<llmview frontmatterOnly globs={['skills/*/SKILL.md']} />

## Recent changes

<llmview-exec cmd="git log --oneline -10" />
<llmview-exec cmd="git diff main" />

## The file that generated this context

<llmview globs={['context.mdx']} />

Then render it:

llmview context.mdx

The output is a single document with your prose, file contents, and command output.

Doc format

A .mdx file mixes markdown prose with <llmview> and <llmview-exec> tags. Prose passes through unchanged, while each tag is replaced with rendered output. llmview uses the MDX format to leverage JSX-like component and prop syntax, but it uses a text-only renderer that supports these two tags, rather than React components.

<llmview> tag — include files

Select files with glob patterns. Use ** for recursive matching and ! for negation.

<llmview globs={['src/my_backend/**', '!src/my_backend/migrations/**']} />

Each matched file is rendered in XML format by default:

<file path="src/my_backend/__init__.py" />
<file path="src/my_backend/app.py">
from flask import Flask

app = Flask(__name__)
...
</file>

Props

Every CLI option is also available as a prop on the <llmview> tag. Props set on a tag override the CLI defaults for that tag only.

| Prop | Type | CLI equivalent | Description | | ----------------- | ---------- | ------------------------ | ------------------------------------------------ | | globs | string[] | (positional patterns) | Required. Glob patterns to select files. | | format | string | -f, --format | Output format: xml, json, or markdown. | | number | boolean | -n, --number | Include line numbers in rendered files. | | tree | boolean | -t, --tree | Include directory tree of selected files. | | treeOnly | boolean | -T, --tree-only | Show only the directory tree, no file contents. | | frontmatterOnly | boolean | -F, --frontmatter-only | Show only parsed YAML frontmatter, no file body. | | list | boolean | -l, --list | List selected files only. | | verbose | boolean | -v, --verbose | Print file statistics to stderr. |

Boolean props can be written bare (e.g. treeOnly) or explicitly (e.g. treeOnly={true}).

<llmview-exec> tag — include command output

Run a shell command and include its stdout.

<llmview-exec cmd="git diff main" />

View files

For simpler cases, llmview also supports .llmview files. These are plain lists of glob patterns (with # comments), similar to .gitignore:

# Project configuration
pyproject.toml
Makefile
.gitignore

# Application code
src/my_backend/**
!src/my_backend/migrations/**

# Docs
docs/*.md
llmview context.llmview

File handling

Files are handled differently based on their contents or extension:

  • Binary files are excluded since their contents are not readable
  • CSVs are truncated, preserving the header and the first 10 lines
  • All other files are treated as UTF-8 text, with a 250KB size limit

The project's .gitignore files are automatically respected.

CLI options

Usage: llmview [OPTIONS] <VIEW-FILE>

Arguments:
  <VIEW-FILE>    Path to a .mdx or .llmview file, or - for stdin

Options:
  -f, --format <FMT>      Output format: xml (default), json, markdown
  -l, --list              List selected files only
  -n, --number            Include line numbers in rendered files
  -t, --tree              Include directory tree of selected files
  -T, --tree-only         Show only the directory tree (no file contents)
  -F, --frontmatter-only  Show only parsed YAML frontmatter (no file body)
  -v, --verbose           Print file statistics to stderr
  -h, --help              Show this help message
  -V, --version           Show version number

Output formats

Use -f <format> to choose the output format. The default is xml.

XML (-f xml) wraps each file in <file path="..."> tags — the default and usually the best choice for LLM context.

Markdown (-f markdown) outputs syntax-highlighted code blocks:

`backend/main.py`
```py
from flask import Flask
...
```

JSON (-f json) is useful for piping into other tools:

llmview -f json context.llmview | jq '.files | length'

Reading from stdin

Use - to read patterns from stdin. For example, to render all unstaged changes:

git diff --name-only | llmview -

Verbose mode

Use -v to see what files are matched and character counts (printed to stderr):

llmview -v context.mdx > /dev/null

Listing files

Use -l to list selected files without rendering. For example, to zip them:

llmview context.llmview -l | zip context.zip -@