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

@glyphlang/glyph

v0.1.32

Published

TypeScript your AI agents can't quietly break: a statically typed language that transpiles to TypeScript, with no any, exhaustive matching, and runtime-checked types.

Downloads

4,836

Readme

Glyph

TypeScript your AI agents can't quietly break.

npm downloads license

Glyph is a statically typed language that transpiles to TypeScript, designed from the ground up so AI agents can read, write, and modify code safely. It looks almost like TypeScript — you read it on day one, no tutorial — but the differences are deliberate: each one closes a hole an agent falls through and tsc --strict waves past.

npm install -g @glyphlang/glyph

Website: glyphlang.io  ·  Try it in the browser: playground  ·  Pointing an agent at it? glyphlang.io/llms.txt


The problem it solves

An AI agent will happily write TypeScript that compiles clean and breaks at runtime. It reaches for any at a boundary, casts an unknown, forgets a switch case, and drops a Promise on the floor — and tsc --strict stays green the whole time. On a large codebase it can't even reliably find where something is defined, because overloads, decorators, namespace merging, and barrel re-exports scatter one symbol across many places.

Glyph removes those hazards at the language level. The bugs an agent ships don't compile here.

See it

Glyph reads like TypeScript, but there's no any, match must cover every case, and a type you declare is actually checked at runtime:

type User = {
  id: number,
  name: string,
}

// A boundary value is `unknown` until you prove its shape.
// `User.parse` exists because every type carries a runtime descriptor.
fn handle(body: unknown) -> string {
  return match User.parse(body) {
    Ok(user) => string.upper(user.name),
    Err(_) => "invalid",
  }
}

That compiles to clean, readable TypeScript you can commit, run anywhere TS runs, and mix with any npm package.

Why teams pick it

  • No any, no erasure. What the types say is true when the code runs. Every record type generates a runtime validator (User.parse(x)), so untrusted input is typed only after it's checked.
  • Exhaustive by default. match over a union — or over number/string — must handle every case, or it doesn't compile. Add a variant and every unhandled site lights up.
  • Errors are values. Result and the ? operator instead of thrown exceptions; drop a Result and you get a warning, because a discarded error is a swallowed failure.
  • Greppable. One name, one declaration form. grep "fn parseUser" finds the definition — always. No overloads, decorators, or barrel files.
  • Stable diffs. One canonical format, one element per line, trailing commas, no reflow. A one-line change is a one-line diff — so agent edits stay reviewable.
  • Generate, don't hand-write. glyph gen openapi spec.yaml --client emits a typed HTTP client and server stubs; glyph gen zod / gen dts turn existing schemas into checked Glyph types.
  • Talks to real databases. Import any npm client by name. Class-based clients (new Pool, new MongoClient) construct with new, and SQLite is built in via std/sqlite. A row comes back untrusted, so you Row.parse it into a typed record, and the schema-versus-code mismatch a cast would hide is caught at the boundary. See the databases guide.

Quickstart

glyph init my-app          # scaffold a project
cd my-app
glyph run src/main.glyph   # build + type-check + execute
glyph build --check        # emit TypeScript, verified with tsc --strict
glyph fmt                  # one canonical layout
glyph --explain E0200      # long-form help for any diagnostic

Glyph ships as a single prebuilt binary per platform (macOS, Linux, Windows — Intel and ARM). No postinstall download, no toolchain to set up. Running or type-checking uses your local tsx/tsc.

Built for agents

Point your coding agent at glyphlang.io/llms.txt — a single file that takes it from zero to correct, runnable Glyph: the canonical program shape, the full stdlib surface, the common gotchas, and the complete diagnostic catalogue with one-line fixes. Agents that write Glyph get compile-time feedback precise enough to self-correct.

Model Context Protocol. For an agent that speaks MCP, glyph mcp runs a server over stdio that gives it five queries: type-check a file for coded diagnostics, the inferred type at a cursor, where a name is defined (following imports), every reference to a symbol across the project, and symbol search. It runs the same analysis the editor uses, so the agent's answers match the compiler. Point any MCP client at glyph mcp <project>; details at glyphlang.io/mcp.

Editors. glyph lsp is a full language server (diagnostics, hover, go-to-definition, completion, symbols, workspace-wide find-references and rename, formatting) that any LSP client can drive over stdio. A VS Code extension ships ready-made.

Where to go next

| | | |---|---| | Your first program in 10 minutes | Start Here | | The whole language in five minutes | the tour | | Try it without installing | playground | | Straight-talking answers to engineer questions | glyphlang.io/answers | | The four pillars, in depth | glyphlang.io/pillars/verifiability | | Source, issues, roadmap | github.com/chadetov/glyph |

Status

Glyph is an early preview and moves fast. The compiler toolchain — build, run, fmt, gen, regen, --explain — works end to end, and every release is type-checked against tsc --strict. It is not yet recommended for production; it's ready for you to try, break, and tell us about. Every version's changes are at glyphlang.io/versions.

Stability while pre-1.0: the language can still change between 0.1.x releases. We hold two lines: your code stays runnable (it always compiles to plain TypeScript you own, so there's a permanent escape hatch), and when syntax does change we aim to make glyph fmt migrate it for you. Full policy: docs/stability.md.

Verifying your download

Releases are built in GitHub Actions and published with provenance, so you can confirm an artifact came from this repo's workflow rather than a tampered copy:

# npm packages: published with npm provenance (OIDC-signed)
npm audit signatures

# GitHub Release archives: SLSA build-provenance attestation
gh attestation verify glyph-<version>-<platform>.tar.gz --repo chadetov/glyph

# ...and a SHA-256 for each archive
sha256sum -c SHA256SUMS

License

Dual-licensed under Apache-2.0 or MIT, at your option.