Reference

The language, section by section.

This is the Voxlang specification as it stands in the compiler's own repository. The site reads LANGUAGE.md at build time and splits it into one page per section, so there is no second copy to fall out of date.

Search is also a JSON endpoint: /docs/search?q=<words> returns ranked results as JSON, no page load.

Generated from LANGUAGE.md at d971c06, 2026-10-15.

Contents

  1. Basics
  2. Types
  3. Variables
  4. Names and strings
  5. Functions
  6. Things
  7. Expressions
  8. Control Flow
  9. Lists and Collections
  10. Input/Output
  11. File I/O
  12. Directories, Mounting, and Process Control
  13. Time and Timers
  14. Command-Line Arguments
  15. Environment Variables
  16. Operators
  17. Keywords
  18. Examples
  19. Libraries and Imports
  20. Compiler Usage
  21. Grammar Summary

The whole reference, on one page.

For machines and coding agents

/docs/index.json
every section and heading, with its URL. Use it to map the whole reference or resolve a slug to a page.
/docs/search.json
one entry per heading (title, section, first sentence, keywords), as static data. Use it to search or browse offline, without a request per query.
/docs/anchors.json
the slug map, every address this reference can be linked at. Use it to check an anchor rather than guess one.

The search endpoint: GET https://vox-lang.dev/docs/search?q=<words>[&limit=<n>] returns JSON, {query, spec, slugRule, hits: [{url, title, section, excerpt, score}]}. q is capped at 120 characters and limit at 50, default 20.

spec is {commit, sha256}, the LANGUAGE.md commit and content hash the index was built from; slugRule is the rule for turning a heading into a URL, quoted under Anchors below; hits is ordered best match first, one entry per heading.

Matching is whole-word first, then a prefix match from 2 characters, then a one-typo match on words of 4 or more characters; exact beats prefix beats fuzzy. An empty hits array means those words are not in the reference at all, not that the syntax was wrong: do not guess further from it.

To read a hit: its url is /docs/<slug>/#<anchor>; the matching text is the Markdown twin at /docs/<slug>.md, where the anchor is a heading. Or GET the section page itself with an Accept: text/markdown header, no twin URL needed.

For example, GET /docs/search?q=file%20io currently ranks "File Properties" first, at /docs/file-io/#file-properties; the text is the twin at https://vox-lang.dev/docs/file-io.md, under its "File Properties" heading.

Every response's spec.commit names the exact source commit the index was built from; cite it alongside anything quoted from a hit.

Anchors: the slug rule below builds a link to any heading; /docs/anchors.json is the authority when in doubt.

A URL is the heading, lowercased, with punctuation dropped and spaces turned into hyphens.

Each "##" section of the spec is a page under /docs/, and every heading inside it is a fragment on that page, so "File I/O" is /docs/file-io/ and "Reading a whole file" inside it is /docs/file-io/#reading-a-whole-file.

The whole reference is also one file, for skimming or grepping in a single pass: /docs/all.md, 221 KB. /llms-full.txt is the larger bundle: overview and installation, this manual, every example, then the style guide.