# Squiggle > Squiggle is a minimalist programming language for probabilistic estimation. Values can be probability distributions (for example `5 to 10`, a lognormal with a 90% interval from 5 to 10), and arithmetic on them uses Monte Carlo sampling. It is used for Fermi estimates, cost-benefit analyses, and forecasts with explicit uncertainty. Squiggle is a small, immutable, expression-based language and is not JavaScript: only use functions and syntax that appear in these docs. The complete documentation, including every builtin function, is available as one plain-text file at [llms-full.txt](https://www.squiggle-language.com/llms-full.txt). Tools for coding agents: - The `squiggle` CLI (`npx @quri/squiggle-lang`) can run models (`squiggle run model.squiggle --json`), check them for errors (`squiggle check`), and look up builtin functions offline (`squiggle docs Dist.normal`). - Claude Code users can install the Squiggle plugin: `/plugin marketplace add quantified-uncertainty/squiggle`, then `/plugin install squiggle@quantified-uncertainty`. ## Full documentation - [llms-full.txt](https://www.squiggle-language.com/llms-full.txt): All of the documentation below in one plain-text file, with a list of common mistakes and the style guide first. ## Docs - [Introduction](https://www.squiggle-language.com/docs): Squiggle is a minimalist programming language for probabilistic estimation. It's meant for intuitively-driven quantitative estimation instead of data analysis or data-driven statistical techniques. ## Guides - [Distribution Creation](https://www.squiggle-language.com/docs/Guides/DistributionCreation): Various ways to create Squiggle distributions - [Distribution Functions](https://www.squiggle-language.com/docs/Guides/DistributionFunctions): Various functions for operating on distributions - [Basic Types](https://www.squiggle-language.com/docs/Guides/BasicTypes): Basic types supported by Squiggle - [Functions](https://www.squiggle-language.com/docs/Guides/Functions): Overview of functions in Squiggle - [Language Features](https://www.squiggle-language.com/docs/Guides/LanguageFeatures): Language features: an overview of syntax, operators, functions, and more - [Control Flow](https://www.squiggle-language.com/docs/Guides/ControlFlow): This page documents control flow. Squiggle has if/else statements, but not for loops. Instead of for loops, you can use reduce/map constructs, which are also documented here. - [Known Bugs](https://www.squiggle-language.com/docs/Guides/Bugs): Much of the Squiggle math is imprecise. This can cause significant errors, so watch out. - [Gotchas](https://www.squiggle-language.com/docs/Guides/Gotchas): Explore common pitfalls and misunderstandings in Squiggle's handling of distributions - [Debugging](https://www.squiggle-language.com/docs/Guides/Debugging): Tips for debugging Squiggle code - [Roadmap](https://www.squiggle-language.com/docs/Guides/Roadmap): Squiggle is still young. The main first goal is to become stable (to reach version 1.0). ## Ecosystem - [Squiggle AI](https://www.squiggle-language.com/docs/Ecosystem/SquiggleAI) - [Tooling](https://www.squiggle-language.com/docs/Ecosystem/Tooling): Integrations to use Squiggle in Node.js, web, VS Code and other environments - [Gallery](https://www.squiggle-language.com/docs/Ecosystem/Gallery): Links to various Squiggle models and writeups - [Language Models](https://www.squiggle-language.com/docs/Ecosystem/LanguageModels): Use Squiggle with Language Models - [Basic LLM Prompt](https://www.squiggle-language.com/docs/Ecosystem/BasicPrompt): LLM Prompt Example - [Style Guide](https://www.squiggle-language.com/docs/Ecosystem/LLMStyleGuide) ## API - [Boolean](https://www.squiggle-language.com/docs/Api/Boolean) - [Calculator](https://www.squiggle-language.com/docs/Api/Calculator): The Calculator module helps you create custom calculators - [Common](https://www.squiggle-language.com/docs/Api/Common) - [Danger](https://www.squiggle-language.com/docs/Api/Danger): Newer experimental functions which are less stable than Squiggle as a whole - [Date](https://www.squiggle-language.com/docs/Api/Date): Dates are a simple date time type. - [Dict](https://www.squiggle-language.com/docs/Api/Dict): Squiggle dictionaries work similar to Python dictionaries. The syntax is similar to objects in Javascript. - [Dist](https://www.squiggle-language.com/docs/Api/Dist): Distributions are the flagship data type in Squiggle. The distribution type is a generic data type that contains one of three different formats of distributions. - [Duration](https://www.squiggle-language.com/docs/Api/Duration): Durations are a simple time type, representing a length of time. They are internally stored as milliseconds, but often shown and written using seconds, minutes, hours, days, etc. - [Input](https://www.squiggle-language.com/docs/Api/Input): Inputs are now only used for describing forms for calculators. - [List](https://www.squiggle-language.com/docs/Api/List): Lists are a simple data structure that can hold any type of value. They are similar to arrays in Javascript or lists in Python. - [Math](https://www.squiggle-language.com/docs/Api/Math): Simple constants and functions for math in Squiggle. - [MixedSet](https://www.squiggle-language.com/docs/Api/MixedSet): The MixedSet module offers functionality for creating mixed sets, which are sets that can contain both discrete and continuous values. - [Number](https://www.squiggle-language.com/docs/Api/Number): Squiggle numbers are Javascript floats. - [Plot](https://www.squiggle-language.com/docs/Api/Plot): The Plot module provides functions to create plots of distributions and functions. - [PointSet](https://www.squiggle-language.com/docs/Api/PointSet): Point set distributions are one of the three distribution formats. They are stored as a list of x-y coordinates representing both discrete and continuous distributions. - [RelativeValues](https://www.squiggle-language.com/docs/Api/RelativeValues) - [SampleSet](https://www.squiggle-language.com/docs/Api/SampleSet): Sample set distributions are one of the three distribution formats. Internally, they are stored as a list of numbers. - [Scale](https://www.squiggle-language.com/docs/Api/Scale): Scales for plots. - [Spec](https://www.squiggle-language.com/docs/Api/Spec): Function Specifications. - [String](https://www.squiggle-language.com/docs/Api/String): Functions for working with strings in Squiggle - [Sym](https://www.squiggle-language.com/docs/Api/Sym): The Sym module provides functions to create some common symbolic distributions. - [System](https://www.squiggle-language.com/docs/Api/System) - [Table](https://www.squiggle-language.com/docs/Api/Table): The Table module allows you to make simple tables for displaying data. - [Tag](https://www.squiggle-language.com/docs/Api/Tag): The Tag module handles tags, which allow the additions of metadata to Squiggle variables. ## Optional - [Three Formats of Distributions](https://www.squiggle-language.com/docs/Discussions/Three-Formats-Of-Distributions): Probability distributions have several subtle possible formats. Three important ones that we deal with in Squiggle are symbolic, sample set, and point set formats. - [Grammar](https://www.squiggle-language.com/docs/Internal/Grammar) - [Runners and Serialization](https://www.squiggle-language.com/docs/Internal/Runners): Runners provide a pluggable way to evaluate Squiggle code in different environments. - [Multi-Module Projects](https://www.squiggle-language.com/docs/Internal/SqProject): This page describes JavaScript APIs and overall architecture of multi-module projects in Squiggle - [Invariants](https://www.squiggle-language.com/docs/Internal/Invariants): Invariants of Probability Distributions to check with property tests - [Processing Confidence Intervals](https://www.squiggle-language.com/docs/Internal/Processing-Confidence-Intervals): This page explains what we are doing when we take a 90% confidence interval, and we get a mean and a standard deviation from it. - [Changelog](https://www.squiggle-language.com/docs/Changelog)