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

@meridianlabs/log-viewer

v0.3.270

Published

Log viewer for inspect_ai logs.

Readme

Inspect Log Viewer

React app for viewing eval logs produced by Inspect AI. It runs standalone (served by inspect view), against statically hosted log directories, inside the Inspect VS Code extension, and can be embedded in external applications via the @meridianlabs/log-viewer npm package.

For repo setup (corepack, pnpm, install), see the root README.

Development

Run commands from this directory, or from the repo root with pnpm <command> --filter=@meridianlabs/log-viewer (the root scripts pass the filter through to turbo run, preserving task dependencies — see scripts.md):

| Command | Description | | ---------------- | ----------------------------------------- | | pnpm dev | Start the Vite dev server on :5173 | | pnpm build | Build the bundled app | | pnpm build:lib | Build the embeddable library into lib/ | | pnpm test | Run unit/integration tests (vitest) | | pnpm e2e | Run Playwright e2e tests | | pnpm check-all | Type check, lint, format, test, and build |

Built output is not committed; the library is built at publish time (prepublishOnly).

You may optionally set the VIEW_SERVER_API_URL environment variable at build time to use an API server running on a different host.

Embedding (@meridianlabs/log-viewer)

Versioning disclaimer: this package does NOT use semantic versioning. The public surface evolves with the host application's needs — expect breaking changes in any release and adapt accordingly.

npm install @meridianlabs/log-viewer

The viewer requires its bundled CSS:

import "@meridianlabs/log-viewer/styles/index.css";

Example Usage

An embedder installs a per-dir API factory with setApiFactory before initializing the store and rendering <App />. The viewer resolves the log directory (from initialLogDir or a ?log_dir= URL param), calls your factory with it, and renders:

import {
    App,
    clientApi,
    createViewServerApi,
    initializeStore,
    setApiFactory,
} from "@meridianlabs/log-viewer";
import type { Capabilities } from "@meridianlabs/log-viewer";

import "@meridianlabs/log-viewer/styles/index.css";

// Install the API factory first — installing after the backend has
// resolved throws.
setApiFactory(
    (logDir) =>
        clientApi(
            createViewServerApi({
                logDir,
                // Optional transport options: apiBaseUrl, headerProvider, customFetch
                apiBaseUrl: "https://mycompany.com/api",
            })
        ),
    "s3://my-bucket/logs" // initialLogDir; omit to require ?log_dir= in the URL
);

const capabilities: Capabilities = {
    downloadFiles: true,
    downloadLogs: false,
    webWorkers: true,
    streamSamples: false,
};
initializeStore(capabilities);

export function MyApp() {
    return <App />;
}

To re-point the viewer at a different log directory after boot, call setLogRoot(dir) — it rebuilds the API through the same factory.

Embedder chrome

If your own UI (rendered as a sibling of <App />, not a descendant) calls the viewer's selection hooks (useSelectedSampleSummary, useSelectedScores, useLogSelection), wrap that chrome in <InspectQueryClientProvider> so the hooks resolve the viewer's react-query client, and gate it on useViewerReady() — the hooks throw before the viewer's app config resolves.

See src/index.ts for the full public surface.