4 Installation
James edited this page 2026-11-25 00:30:55 -05:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Installation

Anvil runs on Fedora and on CachyOS and Arch Linux (x86_64). On Fedora the target is the current release, Fedora 45 at the time of writing; CachyOS and Arch are rolling, and every CI run builds and tests against them as they are that day. Anvil needs a graphics driver that provides OpenGL 4.5 core profile, and runs on Wayland with X11 as the fallback.

From the package repository

Fedora

Anvil is packaged as an RPM in the forge's dnf repository. Installing it is two commands:

sudo dnf config-manager addrepo --from-repofile=https://git.pandanas.net/api/packages/Code-Liberation-Front/rpm.repo
sudo dnf install anvil

dnf checks the package against the key the repository file names.

CachyOS and Arch

Anvil is packaged for pacman in the forge's Arch repository. The repository signs its packages with its own key, which pacman has to be told to trust once; then the repository is added to /etc/pacman.conf and Anvil installed:

curl -fsSO https://git.pandanas.net/api/packages/Code-Liberation-Front/arch/repository.key
sudo pacman-key --add repository.key
sudo pacman-key --lsign-key 'Code-Liberation-Front@noreply.git.pandanas.net'
printf '\n[Code-Liberation-Front.main.git.pandanas.net]\nSigLevel = Required\nServer = https://git.pandanas.net/api/packages/Code-Liberation-Front/arch/main/$arch\n' |
    sudo tee -a /etc/pacman.conf
sudo pacman -Syu anvil

After that, sudo pacman -Syu keeps Anvil up to date with the rest of the system.

What it installs

The package installs the anvil binary, a desktop entry (look for Anvil in your launcher), an icon, and the .anvil file type, so double-clicking a document opens it in Anvil.

Each release on the releases page also attaches both packages, their checksums and the keys that sign them, for installing without the repository.

From source

For a version newer than the latest release, or to change it. On CachyOS or Arch, install the packages Building from source lists for them, then follow the same steps from git clone on. On Fedora:

sudo dnf install cmake ninja-build gcc-c++ git clang-tools-extra libasan libubsan \
                 doctest-devel opencascade-devel eigen3-devel json-devel \
                 minizip-ng-devel pugixml-devel zlib-ng-compat-devel \
                 glfw-devel libglvnd-devel mesa-libGL-devel liberation-sans-fonts
git clone https://git.pandanas.net/Code-Liberation-Front/Anvil.git anvil && cd anvil
git submodule update --init

cmake --preset release
cmake --build --preset release
ctest --preset release

./build/release/bin/anvil

git submodule update --init fetches the two vendored libraries, Dear ImGui and SolveSpace's solver. --recursive is not needed.

liberation-sans-fonts (ttf-liberation on CachyOS and Arch) is in the list because the sketch Text tool draws its outlines from Liberation Sans.

You can also build the packages yourself: scripts/build-rpm.sh for the RPM, scripts/build-arch.sh for pacman. For other distributions, packaging/flatpak/ holds a Flatpak manifest, built and run by scripts/flatpak-build.sh.

Building from source covers the other build presets, the test suite and the container image.

Starting Anvil

anvil                  # an empty document
anvil bracket.anvil    # open a document

Anvil opens one document at a time. Giving it two paths is refused.

Useful options:

Option What it does
--inspect FILE Prints a document's document.json to standard output and exits. See Saving and recovery.
--log-level LEVEL trace, debug, info, warn, error or off. The default is info.
--width PIXELS, --height PIXELS Initial window size. The default is 1600 × 950.
--no-vsync Disables vertical sync.
--gl-debug Requests a debug OpenGL context and logs what the driver reports.
--startup-timing Prints the milliseconds from launch to the first drawn frame.
--screenshot PNG Captures the window once it has settled, then exits.
--script FILE Drives the interface from a script, then exits. This is how the project tests itself; it is described in docs/automation.md in the repository.
-V, --version Prints the version.
-h, --help Prints this list.

Log messages go to the terminal Anvil was started from. If the window does not appear, start it from a terminal and read what it says; Troubleshooting lists the usual causes.

Where Anvil keeps its files

What Where
Settings, toolbar layout, window layout ~/.config/anvil/ (or $XDG_CONFIG_HOME/anvil/)
Crash-recovery snapshots ~/.local/state/anvil/recovery/ (or $XDG_STATE_HOME/anvil/recovery/)

Your documents are wherever you save them. Nothing is sent anywhere.

Next

Read Finding your way around, then make your first part. To let an AI assistant work on your models with you, see Using an AI assistant.