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

gglang

v1.0.2

Published

GGLang — A gaming-themed toy programming language built with TypeScript

Readme

   ██████╗  ██████╗ ██╗      █████╗ ███╗   ██╗ ██████╗
  ██╔════╝ ██╔════╝ ██║     ██╔══██╗████╗  ██║██╔════╝
  ██║  ███╗██║  ███╗██║     ███████║██╔██╗ ██║██║  ███╗
  ██║   ██║██║   ██║██║     ██╔══██║██║╚██╗██║██║   ██║
  ╚██████╔╝╚██████╔╝███████╗██║  ██║██║ ╚████║╚██████╔╝
   ╚═════╝  ╚═════╝ ╚══════╝╚═╝  ╚═╝╚═╝  ╚═══╝ ╚═════╝

🎮 GGLang — The Gaming-Themed Programming Language

GG stands for Good Game. Write code like you're playing one.

Language File Extension License


🕹️ What is GGLang?

GGLang is a toy programming language where every keyword is a gaming term. Variables are equipped, functions are skills, loops are grinds, and errors are glitches. It's built entirely in TypeScript and is designed to make learning about interpreters and compilers fun.

Instead of writing boring old if / else, you embark on a quest — and if things go south, you retreat. Instead of a while loop, you grind until you're done. Your programs don't just start — they spawn.


✨ Features

| Feature | Description | |---|---| | 🎮 Gaming keywords | Every keyword maps to a gaming concept | | 🧮 Full expressions | Arithmetic, comparison, logical, and assignment operators | | 🔁 Control flow | quest / side_quest / retreat (if/else if/else) | | 🔄 Loops | grind (while) with rage_quit (break) and respawn (continue) | | ⚔️ Functions | skill (function) with loot (return) and recursion support | | 🛡️ Error handling | boss_fight / revive / glitch (try/catch/throw) | | 📢 I/O | broadcast (print) and interact (input) | | 📝 Comments | Single-line // and multi-line /* */ | | 🏗️ Built with TypeScript | Clean, hackable, and easy to extend |


🚀 Quick Start

Installation

# Clone the repository
git clone <repo-url>
cd toy-programming-language

# Install dependencies
npm install

# Build the project
npm run build

Hello, World!

Create a file called hello.gg:

spawn {
  broadcast("Hello, World!");
  broadcast("Welcome to GGLang! 🎮");
}

Run it:

npm start -- hello.gg

Try the REPL

npm start

📖 A Taste of GGLang

spawn {
  // Equip your variables like items in your inventory
  equip playerName = interact("Enter your name, adventurer: ");
  equip health = 100;
  artifact maxHealth = 100;  // Artifacts are constants — permanent relics

  // Define a skill (function)
  skill battleCry(name) {
    broadcast("⚔️ " + name + " charges into battle!");
  }

  // Embark on a quest (if/else)
  quest (health == maxHealth) {
    battleCry(playerName);
  } retreat {
    broadcast("You need to heal first!");
  }

  // Grind through enemies (while loop)
  equip enemiesDefeated = 0;
  grind (enemiesDefeated < 5) {
    broadcast("Enemy #" + (enemiesDefeated + 1) + " defeated!");
    enemiesDefeated += 1;
  }

  broadcast("GG, " + playerName + "! 🏆");
}

📚 Documentation

For the complete language reference, syntax guide, and example programs, see the Full Documentation.


📂 Example Programs

| File | Description | |---|---| | hello.gg | Hello World — your first spawn | | fibonacci.gg | Recursive Fibonacci sequence | | fizzbuzz.gg | Classic FizzBuzz challenge | | adventure.gg | Mini text adventure game |


🗺️ Keyword Cheat Sheet

| Concept | GGLang | You'd normally write… | |---|---|---| | Start program | spawn { } | main() | | Variable | equip x = 5; | let x = 5; | | Constant | artifact PI = 3.14; | const PI = 3.14; | | Print | broadcast("hi"); | console.log("hi"); | | If / Else if / Else | quest / side_quest / retreat | if / else if / else | | While loop | grind (cond) { } | while (cond) { } | | Break / Continue | rage_quit / respawn | break / continue | | Function / Return | skill fn() { loot val; } | function fn() { return val; } | | True / False / Null | victory / defeat / phantom | true / false / null | | Try / Catch | boss_fight { } revive(e) { } | try { } catch(e) { } | | Throw error | glitch "msg"; | throw "msg"; | | Input | interact("prompt") | readline("prompt") |


📄 License

This project is licensed under the MIT License — do whatever you want with it. GG! 🎮