Skip to main content

A programming language designed for LLM code generation

Project description

Geno

CI PyPI version Status: Preview License: Apache 2.0

Install | Language Tour | Examples | Documentation | Maturity | Contributing

Geno is a statically typed, functional-first programming language for reliable small programs written with LLMs. You can write Geno directly or generate it with a model; executable examples, contracts, explicit block boundaries, and capability-gated effects make the result easier to check and repair. Geno runs directly and compiles to Python and JavaScript.

Project status: Preview. Geno is ready for evaluation, examples, and early tools, but its pre-1.0 language and tooling may change. Beta and Experimental below describe individual component readiness, not overall project stability. See the preview program and maturity matrix.

Here is the core idea. Save this as score.geno:

func score_label(score: Int) -> String
    requires score >= 0
    example 95 -> "excellent"
    example 70 -> "passing"
    example 40 -> "needs work"

    if score >= 90 then
        return "excellent"
    else if score >= 60 then
        return "passing"
    else
        return "needs work"
    end if
end func

func main() -> String
    return score_label(95)
end func
$ geno test score.geno
3 passed, 0 failed

$ geno run score.geno
=> excellent
  • example clauses are executable specifications.
  • requires states a checked precondition.
  • Explicit end tokens make generated block boundaries unambiguous.

Quickstart

Geno requires Python 3.10-3.13. Install the published CLI, create a project, then test and run it:

pip install geno-lang
geno --version
geno init hello --template cli
cd hello
geno test Main.geno
geno run Main.geno

The generated program finishes with:

>>> Hello, World! <<<

Continue with Getting Started, or jump to the Language Tour.

Why Geno?

LLMs are good at producing plausible code. Geno is designed to make plausible code easier to constrain, validate, and ship.

Common failure mode Geno design choice What you get
Bracket and indentation drift end func, end if, end match Clear parse boundaries in generated code
Untested behavior Required example clauses Inline executable specs for most functions
Type confusion Explicit function signatures plus local inference Stable interfaces without noisy locals
Accidental effects Capability-gated filesystem, network, process, env, clock, random, print, regex Effects are visible at the command line
Edge-case misses Exhaustive pattern matching and requires / ensures contracts Better compiler feedback before runtime
Runtime escape risk Capability gates and surface-specific sandboxing Safer execution of generated programs

Where Geno Runs

Surface Start here Status Boundary
Python CLI geno run, geno test, geno compile -o app.py Beta Effectful builtins require explicit capabilities
Node.js CLI geno compile --target js -o app.js Beta Generated JavaScript is for trusted execution; capability flags do not confine Node.js APIs
Browser app geno build -o dist/ Beta Produces static HTML/JS artifacts with browser-specific capabilities
Hosted runtime geno serve Beta Provides an HTTP API with isolated execution, auth, rate limiting, and metrics

Package management, the LSP and VS Code extension, the formatter, and the self-hosted frontend are experimental. See Supported Targets and the Maturity Matrix for the detailed contract.

Language At A Glance

Geno is immutable by default and includes:

  • Static typing with local inference, generics, traits, and impl blocks
  • Algebraic data types, exhaustive pattern matching, guards, and rest patterns
  • Result / Option, try / catch, throw, and ? propagation
  • Lists, arrays, vectors, maps, mutable maps, and sets
  • Lambdas, pipelines with |>, async functions, and await
  • F-strings plus CSV, TOML, and JSON helpers
  • Python and JavaScript compilation

The Language Tour explains these features with runnable examples. Target-specific behavior is documented in Portable Runtime Semantics. The Language Specification defines the normative 0.4 contract.

Examples

Example What it shows
examples/fibonacci.geno Recursion, iteration, examples-as-tests
examples/safe_divide.geno Result, Option, and pattern matching
examples/apps/geno-check Multi-module CLI validation app
examples/apps/geno-dash Browser dashboard with canvas widgets
examples/apps/geno-snap Hosted API mock server

More release-gated applications are listed in Reference Apps.

Safety And Limits

Geno separates pure computation from effects. Builtins that touch the filesystem, network, process execution, environment, clock, random values, output, or regex require explicit capabilities.

The CLI and hosted runtime use sandboxed execution with process isolation. The in-process embedding API has cooperative limits, and generated JavaScript is not a security boundary. Before running untrusted programs, read the Security Policy, Execution Surface, and Capability Reference.

The package ecosystem and editor tooling are still young, and breaking changes remain possible before 1.0. For current limitations, consult the Maturity Matrix and Common Pitfalls.

Research

Geno tracks a reproducible runtime benchmark snapshot, whose committed run meets the suite target of <=2x for at least 80% of measured problems. The LLM correctness benchmark documents its methodology, but public frontier-model results are deferred and no Geno-vs-Python correctness advantage is currently claimed.

Develop Geno

This repository contains the language implementation, standard library, documentation, benchmarks, example applications, self-hosted frontend, and VS Code extension.

git clone https://github.com/davidiach/geno-lang.git
cd geno-lang
pip install -e ".[dev]"

Read CONTRIBUTING.md for the development workflow and local checks, GOVERNANCE.md for decision rights, and the design proposal process for substantial changes. Use GitHub Discussions for questions, the preview feedback template for early-user reports, and SECURITY.md for private vulnerability reporting. Release history is recorded in CHANGELOG.md.

License

Apache License 2.0. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geno_lang-0.4.2.tar.gz (497.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geno_lang-0.4.2-py3-none-any.whl (530.2 kB view details)

Uploaded Python 3

File details

Details for the file geno_lang-0.4.2.tar.gz.

File metadata

  • Download URL: geno_lang-0.4.2.tar.gz
  • Upload date:
  • Size: 497.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for geno_lang-0.4.2.tar.gz
Algorithm Hash digest
SHA256 e3a85923066602bc86dd978be4adc699c2f4967304edf33973fda2bd3ac68736
MD5 dd460e6ee185c9c2a2c7fb1ca5c5bbbf
BLAKE2b-256 e79f6c71ceede86cf375dbfc82d7274972bdad4e0c3f0f312e75444e68e3de88

See more details on using hashes here.

Provenance

The following attestation bundles were made for geno_lang-0.4.2.tar.gz:

Publisher: publish.yml on davidiach/geno-lang

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file geno_lang-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: geno_lang-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 530.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for geno_lang-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2159d01d7abe2299f158938facdb76be6ee7349471389db57aaecefddee3ef2e
MD5 ecddd1dd13d3eff6ccb305758e651349
BLAKE2b-256 125413306e78196aaa1940294f02411b660654305005d118a7be900904a160d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for geno_lang-0.4.2-py3-none-any.whl:

Publisher: publish.yml on davidiach/geno-lang

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page