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

alzjs

v1.2.1

Published

AlzScript — English-like language. Frontend + Backend + Database. Simpler than Python.

Downloads

4,100

Readme

AlzScript

A programming language that reads like English. Simpler than Python. Runs on Node.js.

name = "World"
print "Hello, {name}!"

Installation

npm install -g alzjs

Requirements: Node.js 18 or higher


Quick Start

Create a file hello.js:

name = ask "What is your name? "
print "Hello, {name}!"

Run it:

alz hello.js

CLI

alz main.js          Run a file
alz                  Open interactive shell (REPL)
alz repl             Open interactive shell (REPL)
alz build main.js    Compile to main.compiled.mjs
alz check main.js    Check for syntax errors
alz new my-app       Scaffold a new project
alz version          Show version
alz help             Show help

Language Reference

Variables

No var, let, or const. Just assign.

name = "Sarg"
age  = 23
active = true
score = 98.5

String Interpolation

Use {variable} inside any string.

name = "Sarg"
print "Hello, {name}!"
print "Age: {age}, Score: {score}"

Input

name = ask "Enter your name: "
print "Hello, {name}!"

Conditions

age = 20

if age >= 18:
    print "Adult"
else if age == 16:
    print "Almost there"
else:
    print "Minor"

Use is and isnt as readable alternatives to == and !=:

if status is "active":
    print "Online"

if role isnt "admin":
    print "Access denied"

Loops

Repeat n times:

repeat 5 as i:
    print "Step {i}"

Loop over a list:

fruits = ["apple", "mango", "grape"]
each fruit in fruits:
    print "Fruit: {fruit}"

Loop over object entries:

user = { name: "Sarg", role: "admin" }
each key, val in user:
    print "{key}: {val}"

Repeat until:

score = 0
repeat until score >= 100:
    score = score + 10
print "Final score: {score}"

Functions

define greet(name):
    return "Hello, {name}!"

define add(a, b):
    return a + b

print greet("Sarg")
print add(10, 20)

Error Handling

try:
    data = fetch "https://api.example.com/users"
    print data
catch err:
    print "Failed: {err}"

Math

print round(3.7)       // 4
print floor(9.9)       // 9
print ceil(1.1)        // 2
print sqrt(16)         // 4
print power(2, 10)     // 1024
print abs(-42)         // 42
print min(3, 7)        // 3
print max(3, 7)        // 7
print random()         // 0.0–1.0

Hashing & Encoding

h = hash "sha256" "hello"
print h

encoded = encode "base64" "AlzScript"
decoded = decode "base64" encoded
print decoded

Pretty Print

Format any object or array as readable JSON:

user = { name: "Sarg", age: 23, role: "admin" }
print pretty(user)

Output:

{
  "name": "Sarg",
  "age": 23,
  "role": "admin"
}

File System

write "notes.txt" "Hello from AlzScript"
content = read "notes.txt"
print content

add to "notes.txt" "\nSecond line"

exists = file exists "notes.txt"
print exists

delete "notes.txt"

Shell Commands

result = run "echo Hello from shell"
print result

files = run "ls -la"
print files

HTTP Requests

// GET
data = fetch "https://api.example.com/users"
print pretty(data)

// POST
result = post "https://api.example.com/login" with { username: "sarg", password: "secret" }
print result.token

Built-in Database

AlzScript includes a zero-config file-based database. No setup, no SQL, no external services.

// Save a record
db.save("users", { name: "Sarg", role: "admin", age: 23 })

// Load all records
all = db.all("users")
each user in all:
    print "{user.name} | {user.role}"

// Find one record
user = db.find("users", { name: "Sarg" })
print "Found: {user.name}"

// Query with conditions
admins = db.where("users", { role: "admin" })

// Count records
total = db.count("users")
print "Total: {total}"

// First / Last
first = db.first("users")
last  = db.last("users")

// Update
db.update("users", { name: "Sarg" }, { age: 24 })

// Remove
db.remove("users", { name: "Sarg" })

// Clear all records (keep table)
db.clear("users")

// Drop table entirely
db.drop("users")

Records are automatically assigned a unique _id and a timestamp _at.

Data is stored in a local .alzdata/ directory as JSON files.


MySQL

db.mysql.connect({
    host: "localhost",
    user: "root",
    password: "secret",
    database: "myapp"
})

rows = db.mysql.query("SELECT * FROM users WHERE active = 1")
each row in rows:
    print "{row.name} | {row.email}"

db.mysql.close()

HTML Templates

AlzScript includes a built-in template engine for rendering HTML.

Template file — views/index.html:

<!DOCTYPE html>
<html>
<head>
  <title>
show title
  </title>
</head>
<body>
  <h1>Welcome,
show user.name
  </h1>

  <ul>
  each product in products
    <li>
show product.name
    </li>
  end
  </ul>

  if user.role == "admin"
    <p><strong>Admin Panel</strong></p>
  end

  -- this is a comment, it will not appear in output --

</body>
</html>

AlzScript file:

data = {
    title: "My Store",
    user: { name: "Sarg", role: "admin" },
    products: [
        { name: "AlzScript Book" },
        { name: "ALZ T-Shirt" }
    ]
}

html = render "views/index.html" with data
print html

Template syntax:

| Syntax | Description | |---|---| | show variable | Output a variable (HTML-escaped) | | show! variable | Output raw/unescaped HTML | | show expr + 1 | Output an expression | | if condition / end | Conditional block | | each item in list / end | Loop block | | include "file.html" | Include a partial | | extends "layout.html" | Use a layout | | block name / endblock | Named content block | | -- comment -- | Comment (stripped from output) |


Web Server

serve on 3000:
    route "/":
        respond "Hello, World!"

    route "/user/:id":
        id = request.params.id
        user = db.find("users", { _id: id })
        if user is null:
            respond 404 "User not found"
        respond pretty(user)

    route "/login" method="POST":
        body = request.body
        user = db.find("users", { name: body.name })
        if user is null:
            respond 401 "Invalid credentials"
        respond { token: "abc123", user: user.name }

Project Structure

Use alz new to scaffold a new project:

alz new my-app
cd my-app
alz main.js

Generated structure:

my-app/
├── main.js        ← entry point
├── views/         ← HTML templates
├── public/        ← static files
├── .alzdata/      ← local database (auto-created)
└── package.json

What's New in v1.0.2

  • ESM fix — resolved _alzCR and _alzdb duplicate declaration crash on Node.js v20+
  • .js as primary extension — AlzScript files use .js, no .alz extension
  • render as expressionhtml = render "view.html" with data now works in assignments
  • REPL variable persistence — variables defined in one REPL line are available in subsequent lines
  • Template enginerender, show, each, if, include, extends, block
  • Database expanded — added db.where(), db.count(), db.first(), db.last(), db.clear(), db.drop()
  • MySQL supportdb.mysql.connect(), db.mysql.query(), db.mysql.close()
  • New built-inshash, encode, decode, run, pretty()

License

MIT — © ALZ TECH


What's New in v1.0.9

Inline HTML (respond html:)

Write HTML directly inside your AlzScript files — no separate template file needed.

Single-line:

route "/":
    name = "Sarg"
    respond html"<h1>Hello, {name}!</h1>"

Multiline block:

route "/page":
    title = "My App"
    respond html:
        <!DOCTYPE html>
        <html>
        <head><title>{title}</title></head>
        <body>
            <h1>Welcome to {title}</h1>
            <p>Built with AlzScript</p>
        </body>
        </html>

Variables inside HTML blocks use {var} interpolation — same as strings.


Module System (use)

Split your code across multiple files.

utils.js — your module:

define greet(name):
    return "Hello, {name}!"

define add(a, b):
    return a + b

app.js — load it:

-- Load all exports into global scope
use "utils"

print greet("Sarg")
print add(10, 20)

Load as named variable:

-- Load as a named object
use math from "utils"

Module paths are relative to the current file. .js extension is optional.