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

legend-state-dev-tools

v0.0.17

Published

[![npm version](https://img.shields.io/npm/v/legend-state-dev-tools)](https://www.npmjs.com/package/legend-state-dev-tools) [![license](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE) [![GitHub stars](https://img.shields.io/github/stars/app

Readme

legend-state-dev-tools

npm version license GitHub stars

Visual dev tools for Legend State v3 — inspect, edit, and export observable state in real time.

Live Demo

Demo

Alpha — A personal tool I built for my own projects. It works well for my use cases, but it hasn't been battle-tested in production. Built for Legend State v3 only (not compatible with v1/v2). Contributions and feedback are welcome.


Features

Inspect

Browse your entire observable state as a collapsible tree. Every node updates in real time as state changes — no polling, no manual refresh.

Edit

Click any value to edit it inline. Changes sync back to the underlying observable instantly, so your app reacts immediately.

Real-time Updates

The dev tools subscribe directly to your observables. Every mutation — from any source — appears in the tree the moment it happens.

Export

Download the full state tree (or any subtree) as JSON. Useful for debugging, bug reports, or snapshotting state at a specific point in time.


Quick Start

npm install legend-state-dev-tools
import { observable } from '@legendapp/state';
import { init } from 'legend-state-dev-tools';
import 'legend-state-dev-tools/dist/styles.css';

const state$ = observable({ count: 0, user: { name: 'Alice' } });

const devtools = init(state$);

// Later, to clean up:
// devtools.destroy();

Peer Dependencies

| Package | Version | |---------|---------| | @legendapp/state | >= 3.0.0-beta.0 | | react | >= 18.0.0 | | react-dom | >= 18.0.0 |


API Reference

init(observable$, options?)

Mounts the dev tools UI and returns a handle for cleanup.

Parameters

| Parameter | Type | Description | |-----------|------|-------------| | observable$ | ObservableParam<any> | The Legend State observable to inspect | | options | DevToolsOptions | Optional configuration (see below) |

Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | enabled | boolean | true | Enable or disable the dev tools | | readOnly | boolean | false | Prevent editing of state values | | theme | string | 'githubDark' | Color theme for the JSON editor | | rootName | string | 'state$' | Label shown as the root node name | | position | 'left' \| 'right' | 'right' | Side of the screen for the panel |

Returns

{ destroy: () => void }

Call destroy() to unmount the toolbar, panel, and state subscription.


Themes

The following themes are available (provided by json-edit-react):

| Theme key | Description | |-----------|-------------| | githubDark | GitHub dark (default) | | githubLight | GitHub light | | monoDark | Monochrome dark | | monoLight | Monochrome light |


Roadmap

Done

  • Real-time state tree inspection
  • Inline editing with instant sync
  • Live observable subscription (zero polling)
  • State export as JSON
  • Multiple color themes (dark/light)
  • Draggable toolbar
  • Configurable panel positioning
  • Read-only mode

Coming

  • Edit history with undo/redo
  • Browser DevTools extension (Chrome / Firefox)

Development

git clone https://github.com/apperside/legend-state-dev-tools.git
cd legend-state-dev-tools
npm install
npm run build   # build the core package
npm run dev     # build + start example dev server

A working example is included in examples/basic/.


Architecture

Monorepo with the main package in packages/core/ and examples in examples/.

| Module | Path | Role | |--------|------|------| | index | packages/core/src/index.ts | Public API (init, options, lifecycle) | | state-bridge | packages/core/src/state-bridge.ts | Subscribes to observables, produces snapshots, writes back edits | | json-editor-mount | packages/core/src/ui/json-editor-mount.tsx | Mounts the json-edit-react editor with theme resolution | | panel | packages/core/src/ui/panel.ts | Slide-out panel DOM management | | toolbar | packages/core/src/ui/toolbar.ts | Draggable floating toolbar | | template-engine | packages/core/src/ui/template-engine.ts | Lightweight HTML templating (Eta) | | styles | packages/core/src/styles.css | Panel and toolbar CSS |


Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request on GitHub.


Acknowledgments

A huge thank you to Carlos for creating json-edit-react — the excellent React component that powers the state tree viewer and editor in this project. Without it, these dev tools simply wouldn't exist.

License

MIT