pangu.js social preview
other4,816MIT

pangu.js

Opinionated paranoid text spacing in JavaScript, with on-device AI semantic judgment

Updated Sep 14, 2026
Platforms
web
Pricing
free-open-source
Status
active
License
MIT

What it does

Core capabilities at a glance

  • Chrome Extension
  • Gemini Nano
  • Local LLM
  • Nodejs
  • Pangu
  • Pangu Spacing
  • Prompt API
  • Text Autospace

Deep dive

The full breakdown - performance, comparisons, and setup

pangu.js

pangu.js is a local-AI tool - Opinionated paranoid text spacing in JavaScript, with on-device AI semantic judgment.

Overview

  • Official support: - pangu.js - pangu.py - pangu.go - pangu.java - pangu.space - Community support: - pangu.clj - pangu.dart - pangu.ex - pangu.objective-c - pangu.php - pangu.rb - pangu.rs - pangu.swift - pangu.skill

Install 為什麼你們就是不能加個空格呢? and it spaces every page you browse. It also comes with the AI Spacing feature:

Regex rules can't distinguish semantic nuances like these, so the extension asks an LLM. It uses Chrome's built-in Prompt API, which runs Gemini Nano on your device. Fully offline, nothing leaves your machine. Needs a one-time model download from the options page. It's free, btw.

GPT-6 Astra writes the prompts. It runs the prompt-experiments skill: propose a change, then test it against the real Gemini Nano in Chrome. When a case fails, it interviews Gemini Nano for clues. When progress stalls, it searches online for new approaches to test. Prompts for a model, tuned by a bigger model, judged on real data.

Make sure to import from 'pangu/browser' in ESM, which is the DOM-aware build ('spaceNode()', 'autoSpacePage()') with matching TypeScript types and resolves correctly across all bundlers.

You SHOULD NOT use 'pangu.js' to space Markdown documents, this library is specially designed for HTML webpages and plain texts without any markup language. See issue #127.

pangu.js is open-source, written primarily in TypeScript, with 4,816 GitHub stars under the MIT license. It was last updated on 2026-09-14.

Key capabilities

From the project's documentation:

  • 這裡沒有18+的內容 means "or more" => 這裡沒有 18+ 的內容
  • Switch 2+瑪利歐賽車世界同捆組 joins two things => Switch 2 + 瑪利歐賽車世界同捆組
  • 女朋友今天的氣溫是-273.15度 is a negative number => 女朋友今天的氣溫是 -273.15 度
  • 博客來-4% 法則:讓錢活得比你久的提領金律 is a separator => 博客來 - 4% 法則:讓錢活得比你久的提領金律

How it fits a local-AI stack

pangu.js runs on your own hardware, so pair it with a model and a GPU sized to your needs. Use the VRAM calculator to pick a model that fits your card, and see what you can run for hardware guidance. Related local-AI tools in the directory:

Sources

Stats from GitHub, 2026-09-14.

Frequently asked

Quick answers to common questions

What is pangu.js?

pangu.js is a other tool for local AI workloads. Opinionated paranoid text spacing in JavaScript, with on-device AI semantic judgment

Is pangu.js free and open source?

Yes, pangu.js has 4,816 GitHub stars and is licensed under MIT. You can self-host it for free on web.

What platforms does pangu.js support?

pangu.js runs on web.

What hardware do I need for pangu.js?

The hardware requirements depend on which models you run. Check our hardware directory for compatible GPUs and systems. pangu.js has 4,816 GitHub stars and an active community.

Does pangu.js support GPU acceleration?

pangu.js's GPU support depends on your specific setup. Check the documentation for details. For the best performance, pair it with an NVIDIA RTX 4090 or 5090.

What are the best alternatives to pangu.js?

Popular alternatives include other other tools in our directory. Browse our full collection at /tool for comparisons, community reviews, and benchmark data to find the right fit for your workflow.

How much does pangu.js cost?

pangu.js is free-open-source. It is completely free and open source to self-host.

Pairs well with

Complementary tools, models, and hardware

Comments coming soon

Configure NEXT_PUBLIC_GISCUS_REPO_ID and NEXT_PUBLIC_GISCUS_CATEGORY_ID at giscus.app to enable.