npm.io
0.1.9 • Published 1h ago

@glyphlang/win32-x64

Licence
MIT OR Apache-2.0
Version
0.1.9
Deps
0
Size
5.9 MB
Vulns
0
Weekly
0
Stars
5

Glyph

A statically typed, transpile-to-TypeScript language designed so AI agents can read, write, and modify code safely.

Glyph looks almost like TypeScript. A TS developer reads a Glyph file on day one without a tutorial. The differences are deliberate and small in number, and every one of them exists to make code an agent can reason about correctly, edit without breakage, and explain back to a human without lying.

npm install -g @glyphlang/glyph

Website: glyphlang.io · Try it: playground · Building with an AI agent? Point it at AGENTS.md / glyphlang.io/llms.txt — one file that takes an agent from zero to correct, runnable Glyph.

The four pillars

Every design decision is tested against these. If a feature improves one without harming the others, it ships. If not, it doesn't.

  1. Abstraction — express intent at the level the writer is thinking. Pattern matching over switch ladders, Result over thrown exceptions, named records over positional tuples.
  2. Verifiability — anything the type system claims must be true at runtime. No any. No structural-typing surprises. No type erasure.
  3. Diff stability — a one-line change produces a one-line diff. Fixed-width, single-element-per-line formatting. No barrel files. Trailing commas everywhere.
  4. Greppability — every symbol has exactly one syntactic form at its declaration site. grep -n "fn parseUser" finds the definition. Always.

Verifiability and greppability are the wedge. Abstraction and diff stability are the polish.

Why Glyph

  1. Built for AI agents. They can read, write, and change code safely.
  2. Looks like TypeScript. You can read it on day one, no tutorial.
  3. Compiles to TypeScript. It runs anywhere TS runs and uses any npm package.
  4. No any. What the types say is true when the code runs.
  5. One name, one form. grep always finds where something is defined.
  6. Errors are values, not exceptions. You handle them with match.
  7. match must cover every case. The compiler tells you what you missed.
  8. A one-line change makes a one-line diff. Reviews stay small.
  9. Tests live next to the code. They run on every build.
  10. Clear error messages. Each one tells you how to fix the problem.

Where to start

If you want to Read
See the whole language in five minutes docs/guide/tour.md
Install Glyph and run your first program docs/guide/getting-started.md
Map your TypeScript knowledge onto Glyph docs/guide/for-typescript-developers.md
Build something real (a todo CLI) docs/guide/tutorial.md
Understand the project's thesis docs/manifesto.md
See concrete Glyph programs examples/
Read the language specification docs/language/spec.md
See the roadmap docs/roadmap/overview.md
See the full implementation plan docs/implementation-plan.md
Compare Glyph against TS, Python, Rust benchmarks/
See what the benchmarks show (honestly) benchmarks/FINDINGS.md
See bugs Glyph catches that tsc --strict misses benchmarks/verifiability/

Building

cd glyph-compiler
cargo test --workspace

Requires Rust 1.95 or later (pinned via rust-toolchain.toml).

Verifying a release

Releases are built in GitHub Actions and published with provenance:

npm audit signatures                                                   # npm packages (OIDC provenance)
gh attestation verify glyph-<version>-<platform>.tar.gz --repo chadetov/glyph   # SLSA attestation
sha256sum -c SHA256SUMS                                                 # per-archive checksums

License

Dual-licensed under either of

at your option.