Statac

Start

Installing

Statac is one program in one file, with nothing to install beside it. On a Mac, use Homebrew. On Linux, use the script. On Windows, use Scoop or a package.

Install with Homebrew

brew install statac-ssg/statac/statac

Homebrew is for a Mac, or a Linux machine that has it.

Install with the script

curl -fsSL https://get.statac.dev | sh

For Linux, or a Mac without Homebrew. The script downloads the package for your machine, checks it against the release’s SHA256SUMS, and puts statac in ~/.local/bin and its licences in ~/.local/share/statac. It asks for no password and changes none of your shell’s files: if ~/.local/bin isn’t on your PATH, it gives you the line to add.

No curl? wget -qO- https://get.statac.dev | sh does the same.

To choose the release, the folder or both:

curl -fsSL https://get.statac.dev | sh -s -- --version 0.1.0 --to ~/bin

On Linux it installs the musl package, which runs on any distribution. The same line installs Statac on a machine that builds your site for you. To read the script before running it, see tools/install.sh.

Install with Scoop

scoop bucket add statac https://github.com/statac-ssg/scoop-statac
scoop install statac

For Windows with Scoop.

Install from a package

Each release has a package for each kind of machine, and a SHA256SUMS file to check them by, at github.com/statac-ssg/statac/releases.

Machine The package’s name ends
Mac with Apple silicon aarch64-apple-darwin.tar.gz
Mac with an Intel processor x86_64-apple-darwin.tar.gz
Linux, Intel or AMD, glibc 2.35 or later x86_64-unknown-linux-gnu.tar.gz
Linux, ARM, glibc 2.35 or later aarch64-unknown-linux-gnu.tar.gz
Linux, Intel or AMD, any distribution x86_64-unknown-linux-musl.tar.gz
Linux, ARM, any distribution aarch64-unknown-linux-musl.tar.gz
Windows x86_64-pc-windows-msvc.zip

A Mac needs macOS 11 or later. Ubuntu 22.04 and Debian 12 have a new enough glibc. The musl packages run on any Linux, Alpine included.

On a Mac or Linux

  1. Download your package and SHA256SUMS into one folder, and open a terminal there.

  2. On a Mac, take the download mark off the package:

    xattr -d com.apple.quarantine statac-*.tar.gz
  3. Check the package:

    shasum -a 256 --ignore-missing -c SHA256SUMS

    It prints the package’s name and OK. Anything else, stop. No shasum? Run sha256sum without the -a 256.

  4. Unpack it, and put statac where your shell looks for programs:

    tar -xzf statac-*.tar.gz
    sudo mkdir -p /usr/local/bin
    sudo mv statac-*/statac /usr/local/bin/

    Any folder on your PATH does as well.

Warning:

Don’t skip step 2 on a Mac. The packages aren’t signed, and a Mac won’t run one unpacked from a file that still has its download mark.

On Windows

  1. Download your package and SHA256SUMS into one folder, and open PowerShell there.

  2. Show the package’s hash:

    Get-FileHash statac-*.zip -Algorithm SHA256

    Compare it with the package’s line in SHA256SUMS, ignoring capitals. If they differ, stop.

  3. Unpack it:

    Expand-Archive statac-*.zip
  4. Move statac.exe to a folder on your Path, or add its folder to Path in Windows’ settings, under “Edit environment variables for your account”.

What’s in a package?

File What it is
statac The program: statac.exe on Windows
LICENSE-MIT The MIT licence
LICENSE-APACHE The Apache-2.0 licence
THIRD-PARTY.md The work of others the program carries, and their licences
THIRD-PARTY-GRAMMARS.md The grammars and themes that colour code, and their licences

Statac is under MIT or Apache-2.0, at your choice.

Build from the source

For a machine with no package. You need:

  • Rust 1.99 or later, which rustup installs
  • a C compiler: Xcode’s command line tools on a Mac, gcc or clang on Linux, Visual Studio’s C++ build tools on Windows
  • CMake
  • Perl
  • NASM, on a machine with an Intel or AMD processor

In a copy of the source from github.com/statac-ssg/statac, run:

cargo install --locked --path .

The first build takes about a minute on a recent machine, and several on an older one.

Check it worked

statac --version
statac --help

--help lists the nine commands and their options, as statac alone does. After a command, as in statac build --help, it shows only that command’s.

Update Statac

Installed with Run
Homebrew brew upgrade statac
The script the script again
Scoop scoop update statac

For a package, repeat its steps with the new release’s package.

Where next?

Something unclear or wrong? Open an issue on GitHub.