---
title: "Documentation"
url: https://una-lang.org/en/docs/
release: v0.4.0
---

# Documentation

Learn the language, look up a construct, or hand your agent its reference. Every page matches the release named on it.

## Start

- [Get started](https://una-lang.org/en/docs/get-started.md): Install Una, write a contract, watch it fail and fix it, then build a native executable.
- [Editor setup](https://una-lang.org/en/docs/editor.md): Diagnostics and formatting in your editor, through the language server.

## Guides

- [All guides](https://una-lang.org/en/docs/guides.md): Task by task: failures, HTTP, JSON, time, tests and more.

## Learn

- [Una by Example](https://una-lang.org/en/learn.md): The book: small complete programs, one idea per page.
- [Examples](https://una-lang.org/en/docs/examples.md): Complete packages to check, test and run, from the smallest.

## Language guide

- [At a glance](https://una-lang.org/en/docs/language.md): Edition 0.2 on one page, with a link to each construct.
- [Lexical structure](https://una-lang.org/en/docs/language/lexical-structure.md): Names, literals, comments and indentation.
- [Modules and imports](https://una-lang.org/en/docs/language/modules.md): Split a package into modules and import between them.
- [Kinds and types](https://una-lang.org/en/docs/language/types.md): Records, variants, refined types and units of measure.
- [Functions and contracts](https://una-lang.org/en/docs/language/functions.md): Write a function and say what it requires and ensures.
- [Expressions and control flow](https://una-lang.org/en/docs/language/control-flow.md): Conditions, pattern matching, loops and blocks.
- [Errors](https://una-lang.org/en/docs/language/errors.md): Failures are values: declare them, raise them, handle them.
- [Capabilities and effects](https://una-lang.org/en/docs/language/capabilities.md): Say what a function may touch outside the program.
- [Information flow](https://una-lang.org/en/docs/language/information-flow.md): Label sensitive data and keep it where it belongs.
- [Requirements](https://una-lang.org/en/docs/language/requirements.md): Tie a contract to the requirement it comes from.
- [Examples as tests](https://una-lang.org/en/docs/language/examples.md): Examples in the source that run as tests.
- [Verification](https://una-lang.org/en/docs/language/verification.md): What una check proves, and what it reports when it cannot.
- [Canonical form](https://una-lang.org/en/docs/language/canonical-form.md): One way to write each program: what una fmt does.
- [A complete package](https://una-lang.org/en/docs/language/complete-example.md): A whole package read from top to bottom.
- [Not in this edition](https://una-lang.org/en/docs/language/not-yet.md): What edition 0.2 leaves out, and where a later edition adds it.

## Reference

- [Standard library](https://una-lang.org/en/docs/std.md): The types and functions every program has.
- [Command line](https://una-lang.org/en/docs/cli.md): Every una command and its options.
- [Configure a package](https://una-lang.org/en/docs/configure.md): The files of a package and every key they take.
- [Diagnostics](https://una-lang.org/en/docs/errors.md): Each diagnostic code: what it means and how to fix it.
- [Specification](https://una-lang.org/en/docs/spec.md): The normative text, chapter by chapter.

## Agent interface

- [Una for agents](https://una-lang.org/en/docs/agents.md): The full guide for an agent that writes, checks and repairs Una.
- [Una, compact](https://una-lang.org/en/docs/agents/compact.md): The language in one page, sized for an agent's context.
- [The loop](https://una-lang.org/en/docs/agents/loop.md): The cycle an agent repeats: format, check, fix, test.
- [JSON output](https://una-lang.org/en/docs/agents/json.md): The JSON each command returns, and how to read a diagnostic.
- [Repairs](https://una-lang.org/en/docs/agents/repairs.md): The fixes a diagnostic proposes, in the order to try them.
- [Build report](https://una-lang.org/en/docs/agents/build-report.md): What a build proved, trusted and assumed, as one document.
- [Schemas](https://una-lang.org/en/docs/agents/schemas.md): The schemas of the JSON documents the tools print.

## Explanation

- [Security model](https://una-lang.org/en/docs/security.md): What Una guarantees, what it trusts, and what is outside its model.
- [Editions](https://una-lang.org/en/docs/editions.md): How the language changes without breaking your package.
- [Known limits](https://una-lang.org/en/docs/known-limits.md): What does not work yet, and what the release does not promise.
