gray new hello-gray
cd hello-gray
gray run
# Develop with validated hot replacement
gray dev
Buildless server language · canonical reference
Fast to run.
Clear to read.
Gray combines PHP-like immediacy with typed boundaries, native server primitives, and Live, Static, and Adaptive execution.
Quickstart
Source to response, immediately.
No application build directory and no framework are required.
Write Gray
{{ set String $name = "Ada"; }}
Hello, {$name}!
Use pure `.gy` programs or mix server blocks with literal output.
Language and tooling
Find the surface you need.
<?gray ... ?>, includes, and {expr}
Compose ordinary files in shared scope and render expressions inside literal text.
Typed when it matters
Mix typeless values with checked parameters, returns, fields, and storage.
Classes with identity
Constructors, methods, references, and contextual visibility are implemented.
Schemas with structure
Declare typed records, pass them through functions, and encode them as JSON.
Native SQLite
Use parameterized SQL, typed rows, binary-safe values, transactions, and mapped schemas.
Bounded native cache
Cache isolated Gray values with TTL, deterministic LRU eviction, binary keys, and observable limits.
Native Session Fabric
Use opaque encrypted sessions, typed state, CSRF, recent authentication, bounded risk, and redacted events.
spawn and await
Structured tasks propagate values, cancellation, and source-aware errors.
Compiler-backed feedback
gray fmt, gray lint, and the LSP share Gray's syntax model.
Three policies, one language
Run from source, ship a standalone artifact, or replace ready server workers.
No matching language surface.
Runnable tutorials
Exact source, not pseudocode.
Every example is formatted and output-checked by the repository suite.
Native Session Fabric
Secure state without hidden middleware.
Explicit Gray APIs, durable adapters, bounded signals, and reproducible local tests.
Session API
Lifecycle, CSRF, browser policy, authentication, rate limits, management, risk, and events.
Read API guideStorage adapters
Choose bounded memory, encrypted SQLite, or encrypted Redis/Valkey deliberately.
Read storage guideKey rotation
Deploy active and retiring encryption and risk keys without silent state loss.
Read rotation guideRetention and fairness
Understand coarse signals, short retention, redaction, and application-owned decisions.
Read privacy guideCompiler-backed API explorer
Documentation from Gray itself.
Loading gray.docs.v1…
Served natively
This documentation is a Gray application.
The status below comes directly from runtime_stats().
loading…