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

@magneticjs/cli

v0.1.7

Published

Magnetic CLI — build, dev, and deploy server-driven UI apps

Readme

@magneticjs/cli

Build, develop, and deploy Magnetic server-driven UI apps.

Installation

npm install -g @magneticjs/cli

This also downloads the magnetic-v8-server binary for your platform via postinstall.

Commands

magnetic dev

Start a local development server with hot rebuild on file changes.

cd my-app
magnetic dev                    # http://localhost:3003
magnetic dev --port 4000        # custom port
magnetic dev --dir ./my-app     # specify app directory

What happens:

  1. Scans pages/ for TSX page components
  2. Detects server/state.ts for business logic
  3. Auto-generates the V8 bridge (route map + state wiring)
  4. Bundles with esbuild into a single IIFE
  5. Starts magnetic-v8-server on the specified port
  6. Watches for changes, rebuilds + restarts on save

magnetic build

Generate the production bundle without starting a server.

magnetic build --dir ./my-app
magnetic build --dir ./my-app --minify --verbose

Output: dist/app.js (~15KB typical)

magnetic push

Build and deploy to a Magnetic platform server.

magnetic push --dir ./my-app --server https://platform.magnetic.app --name my-app

Or configure in magnetic.json:

{
  "name": "my-app",
  "server": "https://platform.magnetic.app"
}

Then just: magnetic push

How It Works

The CLI is a build tool, not a runtime. It:

  • Scans your pages/ directory and maps filenames to routes
  • Generates a bridge file that wires pages + state + router
  • Bundles everything into a single JS file for the V8 engine
  • The Rust V8 server executes this bundle to render JSON DOM descriptors

You write: pages, components, state CLI generates: bridge, bundle Rust server runs: V8 + HTTP + SSE

File Conventions

| File | Route | |------|-------| | pages/IndexPage.tsx | / | | pages/AboutPage.tsx | /about | | pages/SettingsPage.tsx | /settings | | pages/[id].tsx | /:id (dynamic) | | pages/NotFoundPage.tsx | * (catch-all) |

Server Binary

The Rust binary (magnetic-v8-server) is automatically downloaded during npm install. If the download fails, you can build from source:

cd rs/crates/magnetic-v8-server
cargo build --release

Supported platforms: macOS (ARM64, x64), Linux (x64, ARM64)

License

MIT