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

@devscholar/node-with-gjs

v0.0.15

Published

Node.js IPC Bridge for GJS

Downloads

867

Readme

node-with-gjs

Beta

Brings GNOME's GJS (GObject Introspection JavaScript runtime) to Node.js, allowing you to use GTK, WebKit, Adwaita and any other GObject-based library from JavaScript/TypeScript. Uses IPC instead of a native addon, so it works with Node.js, Deno, and Bun.

How it works

node-with-gjs spawns a GJS process and bridges it to Node.js via IPC. Your TypeScript code runs in Node.js; GTK/GLib calls are forwarded to GJS transparently. You write normal Node.js code and get full access to the GObject ecosystem.

The only runtime dependency: GJS

node-with-gjs itself requires only GJS — the GNOME JavaScript runtime. It does not depend on any specific UI toolkit.

Which additional system libraries you need depends entirely on what your own code uses:

  • GTK3 UI → install libgtk-3-0 (and the corresponding .gir file)
  • GTK4 UI → install libgtk-4-1
  • WebKit → install libwebkitgtk-6.0-0
  • Adwaita → install libadwaita-1-0

You only need the runtime packages, not the -dev packages. Dev packages (e.g. libgtk-4-dev) contain C/C++ header files for compiling C programs — GJS loads libraries at runtime via GObject Introspection and has no use for them.

System package installation

Tested on Ubuntu 24.04 LTS. Install GJS (required) plus whichever toolkits your project uses:

# GJS (required)
sudo apt install gjs

# GTK3
sudo apt install libgtk-3-0 gir1.2-gtk-3.0

# GTK4
sudo apt install libgtk-4-1 gir1.2-gtk-4.0

# WebKitGTK (GTK4-based)
sudo apt install libwebkitgtk-6.0-0 gir1.2-webkit2-4.1

# Adwaita
sudo apt install libadwaita-1-0 gir1.2-adw-1

GNOME-based Ubuntu installs typically pre-install GJS, GTK4, and Adwaita. On a minimal install you may need to add them manually.

For other distributions, consult your package manager for the equivalent packages.

About the @girs/* npm packages

The @girs/* packages (e.g. @girs/gtk-4.0, @girs/gtk-3.0) are TypeScript type definitions only. They are devDependencies and have zero effect at runtime. They exist so your editor and tsc can type-check calls to GTK/GLib APIs. The actual implementation is provided by the system GObject Introspection data (.gir files).

Node.js version

Node.js 18+ (LTS recommended). Also compatible with Bun and Deno.

Installation

npm install @devscholar/node-with-gjs

Usage

See the node-with-gjs-examples repository for examples covering GTK3, GTK4, WebKit, Adwaita, and console I/O.

Tests

npm test

For detailed testing documentation, see docs/testing.md.

License

MIT