# Install foma with Homebrew, apk, apt, dnf, Nix, zypper

Finite-state compiler and C library. Version 0.10.0 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:foma
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install foma
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add foma
```

  Evidence: Alpine Linux edge package indexes: foma from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install foma
```

  Evidence: Debian stable package indexes: foma from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install foma
```

  Evidence: Fedora Rawhide package metadata: foma from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#foma
```

  Evidence: nixpkgs package indexes: pkgs/by-name/fo/foma/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- zypper (92%):

```sh
sudo zypper install foma
```

  Evidence: openSUSE Tumbleweed package metadata: foma from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:foma
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/foma>
- **Version:** 0.10.0
- **Source summary:** Finite-state compiler and C library
- **Homepage:** <https://github.com/mhulden/foma>
- **Repository:** <https://github.com/mhulden/foma>
- **Upstream docs:** <https://github.com/mhulden/foma#readme>
- **License:** Apache-2.0
- **Source archive:** <https://github.com/mhulden/foma/archive/refs/tags/v0.10.0.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- cgflookup (cli)
- flookup (cli)
- foma (cli)
- cgflookup (alias)
- flookup (alias)
- foma (alias)

## Build dependencies

- bison
- cmake
- pkgconf

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.10.0
- Local data: ok
- Upstream repository: https://github.com/mhulden/foma
- Upstream latest detected: v0.10.0 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

foma is a finite-state compiler, programming language, command-line toolset, and C library for constructing finite-state automata and transducers, especially for natural language processing tasks such as morphological analysis.

### Project history

The project was originally hosted on Google Code as `code.google.com/p/foma`, where its archive describes it as a finite-state compiler and C library. The archived project page records a 2015 Apache 2.0 license change and a 0.9.18 release, and the current GitHub repository identifies itself as an export from that Google Code project.

foma deliberately followed the Xerox xfst style: the archived project description says its interface is similar to xfst and that many xfst grammars compile without changes. This made it useful to linguists and NLP engineers who wanted an open implementation of familiar finite-state workflows.

### Adoption history

The Google Code archive advertised pre-built binaries for Windows, Linux, and OS X and linked tutorial material from LREC 2010 and FSMNLP 2012, showing use in academic finite-state morphology and spelling-correction communities before the project moved fully to modern source hosting.

The current repository is lean but still maintained as buildable source, with CMake instructions and a WebAssembly build path that exposes a browser demo for testing foma regular expressions.

### How it is used

Users run `foma` to compile finite-state descriptions, use `flookup` to apply compiled automata with lookup strategies, and link against the C API when finite-state operations need to be embedded in other tools.

### Why package nerds care

foma matters to package maintainers because it is a compact, mostly C-based implementation of a specialized NLP workflow that otherwise often depends on proprietary or research-only tooling. Its xfst compatibility, lexc-oriented usage, command-line utilities, and C library make it a small but culturally important finite-state package.

### Timeline

- 2009: The foma project citation describes `Foma: a finite-state compiler and library`.
- 2011: The Google Code archive records creation of the `foma` project.
- 2015: The archived project news records foma 0.9.18 and a license change to Apache 2.0.
- 2020s: The GitHub README documents CMake builds and a WebAssembly demo for browser-based regular-expression testing.

### Related projects

- The project explicitly relates itself to Xerox xfst and lexc syntax, and supports import and export with Xerox, AT&T, and OpenFST-style tooling.

### Sources

- <https://github.com/mhulden/foma>
- <https://raw.githubusercontent.com/mhulden/foma/master/README.md>
- <https://storage.googleapis.com/google-code-archive/v2/code.google.com/foma/project.json>


## Security Notes

library-like package without higher-risk signals.

- **Geiger risk:** green / low
- library-like package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** foma
- **Version Scheme:** 0
- **Revision:** 1
- **Conflicts With:** freeling
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Debian apt - foma - 1:0.10.0+s311.20240712-1: normalized package name match | Debian stable package indexes: foma from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Tools for constructing various finite-state automata | https://fomafst.github.io/
- Debian apt - libfoma-dev - 1:0.10.0+s311.20240712-1: normalized package name match | Debian stable package indexes: libfoma-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Foma development files | https://fomafst.github.io/
- Debian apt - libfoma0t64 - 1:0.10.0+s311.20240712-1: normalized package name match | Debian stable package indexes: libfoma0t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Foma runtime libraries | https://fomafst.github.io/
- Nix - foma: normalized package name match | nixpkgs package indexes: pkgs/by-name/fo/foma/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - foma - 1:0.10.0+s311-1.2build2: normalized package name match | Ubuntu 24.04 LTS package indexes: foma from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Tools for constructing various finite-state automata | https://fomafst.github.io/
- Ubuntu apt - foma-bin - 1:0.10.0+s311-1.2build2: normalized package name match | Ubuntu 24.04 LTS package indexes: foma-bin from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Transitional package for foma | https://fomafst.github.io/
- Ubuntu apt - libfoma-dev - 1:0.10.0+s311-1.2build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libfoma-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Foma development files | https://fomafst.github.io/
- Ubuntu apt - libfoma0-dev - 1:0.10.0+s311-1.2build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libfoma0-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Transitional package for libfoma-dev | https://fomafst.github.io/
- Ubuntu apt - libfoma0t64 - 1:0.10.0+s311-1.2build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libfoma0t64 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Foma runtime libraries | https://fomafst.github.io/
- apk - foma - 0.10.0_git20240712-r0: normalized package name match | Alpine Linux edge package indexes: foma from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Finite-state compiler and C library | https://fomafst.github.io/
- apk - foma-dev - 0.10.0_git20240712-r0: normalized package name match | Alpine Linux edge package indexes: foma-dev from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Finite-state compiler and C library (development files) | https://fomafst.github.io/
- apk - libfoma - 0.10.0_git20240712-r0: normalized package name match | Alpine Linux edge package indexes: libfoma from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Finite-state compiler and C library (libraries) | https://fomafst.github.io/
- dnf - foma - 0.10.0-0.15.20210601gitdfe1ccb.fc44: normalized package name match | Fedora Rawhide package metadata: foma from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Xerox-compatible finite-state compiler | https://github.com/mhulden/foma
- dnf - libfoma - 0.10.0-0.15.20210601gitdfe1ccb.fc44: normalized package name match | Fedora Rawhide package metadata: libfoma from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | The foma C library | https://github.com/mhulden/foma
- dnf - libfoma-devel - 0.10.0-0.15.20210601gitdfe1ccb.fc44: normalized package name match | Fedora Rawhide package metadata: libfoma-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for libfoma | https://github.com/mhulden/foma
- zypper - foma - 0.10.0+git22-1.6: normalized package name match | openSUSE Tumbleweed package metadata: foma from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Finite-state compiler and C library | https://fomafst.github.io/


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [bison](https://www.automicvault.com/pkg/brew/bison/) - Build dependency declared by Homebrew.
- [cmake](https://www.automicvault.com/pkg/brew/cmake/) - Build dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [aarch64-elf-gcc](https://www.automicvault.com/pkg/brew/aarch64-elf-gcc/) - Shares av.db curated category or tags: cli, compiler, compilers, developer-tools.
- [adaptivecpp](https://www.automicvault.com/pkg/brew/adaptivecpp/) - Shares av.db curated category or tags: cli, compiler, compilers, developer-tools.
- [arm-none-eabi-gcc](https://www.automicvault.com/pkg/brew/arm-none-eabi-gcc/) - Shares av.db curated category or tags: cli, compiler, compilers, developer-tools.
- [bunster](https://www.automicvault.com/pkg/brew/bunster/) - Shares av.db curated category or tags: cli, compiler, compilers, developer-tools.
- [dtc](https://www.automicvault.com/pkg/brew/dtc/) - Shares av.db curated category or tags: cli, compiler, compilers, developer-tools.
- [i686-elf-gcc](https://www.automicvault.com/pkg/brew/i686-elf-gcc/) - Shares av.db curated category or tags: cli, compiler, compilers, developer-tools.
- [m68k-elf-gcc](https://www.automicvault.com/pkg/brew/m68k-elf-gcc/) - Shares av.db curated category or tags: cli, compiler, compilers, developer-tools.
- [mlton](https://www.automicvault.com/pkg/brew/mlton/) - Shares av.db curated category or tags: cli, compiler, compilers, developer-tools.
- [stanc3](https://www.automicvault.com/pkg/brew/stanc3/) - Local package facts share a topical domain. Shared terms: cli, compiler, compilers, developer, developer-tools.
- [bnfc](https://www.automicvault.com/pkg/brew/bnfc/) - Local package facts share a topical domain. Shared terms: cli, compiler, compilers, developer, developer-tools.
- [cloog](https://www.automicvault.com/pkg/brew/cloog/) - Local package facts share a topical domain. Shared terms: cli, compiler, compilers, developer, developer-tools.

## Combined YAML source

View the package source record on GitHub. [combined/foma.yml](https://github.com/automic-vault/db/blob/main/combined/foma.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
