Skip to main content

fherma

Command line interface for the FHERMA kernel catalogue.

pipx install fherma        # or: uv tool install fherma

A command line tool belongs in an environment of its own, and on macOS it has no choice: Homebrew marks its Python as externally managed, so pip install into it is refused. Inside a virtual environment pip install fherma is exactly right.

Either way that is the whole toolchain — fherma-lang comes with it as a dependency, so the install leaves two commands on the path: fherma, and fherma-lang for the language on its own. Check what you got:

$ fherma --version
fherma       0.1.0
fherma-lang  0.1.0
python       3.13.4

$ fherma doctor
✓ python       3.13.4
✓ fherma       0.1.0
✓ fherma-lang  0.1.0
✓ commands     auth, testing
✓ profile      default → https://api.fherma.io
• credentials  no token

doctor is offline by default — the usual reason to run it is that something is wrong, and a network timeout would bury the answer. Pass --online to check the token as well. It exits non-zero only when the toolchain is actually broken; a missing token is not broken, since scaffolding from a local signature never needs one.

Tab completion, once:

fherma completion zsh >> ~/.zshrc      # or bash, or fish

What it is for

A kernel in FHERMA is a computational problem; a specification is one precise statement of it. Before implementations can be submitted against a specification, it needs three functions — a generator, an oracle and a verifier — which say where test data comes from, what the right answer is, and how a verdict is reached.

This tool fetches the scaffold for those three, runs their checks locally, and sends them back.

Getting started

fherma auth login
fherma testing init polymult/rlwe@1.0.0

That writes a bundle:

polymult-rlwe-1.0.0/
├── fherma.toml      generated — which specification this belongs to
├── fherma.py        generated — Point, Inputs, Outputs, Stream, Tensor
├── README.md        generated — the signature, and what to write
├── generate.py      yours
├── oracle.py        yours
├── verify.py        yours, and usually unnecessary
├── vectors/         worked examples, for accepting the oracle
└── assets/          data files the three functions may read

fherma.py is derived from the specification's signature: the types are already correct, so there is nothing to declare and nothing to get wrong. Write the two function bodies; the third is usually unnecessary, since most verdicts are exact equality and that is what the platform does when verify.py says nothing.

The generated files are rewritten by fherma testing init --update; yours never are. Running the three locally — fherma testing check — is not in this release.

Commands

fherma auth        login · logout · whoami
fherma testing     init · status
fherma doctor      check the installation
fherma completion  a script for bash, zsh or fish

Name a specification as kernel/spec@version; the version may be left off, and the latest published one is used.

fherma testing init polymult/rlwe@1.0.0
fherma testing init polymult/rlwe --oracle --verifier    # two of the three
fherma testing init --signature ./sig.fhk                # no platform involved

The scaffold itself comes from fherma-lang and is built in this process, so the platform is asked for one thing — the signature — and --signature needs no network at all.

More arrive as the platform grows; fherma <group> --help lists what a group can do.

Every command takes --json, because this output is read by CI and by the web interface as well as by people. Exit codes are fixed: 0 success, 1 a check did not pass, 2 a usage error, 3 not authorised, 4 the platform could not be reached.

Profiles

fherma --profile staging auth login

Configuration lives in ~/.fherma/config.toml. FHERMA_URL and FHERMA_TOKEN override it, so continuous integration never has to write a token to disk.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fherma-0.1.1.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fherma-0.1.1-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

Details for the file fherma-0.1.1.tar.gz.

File metadata

  • Download URL: fherma-0.1.1.tar.gz
  • Upload date:
  • Size: 21.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for fherma-0.1.1.tar.gz
Algorithm Hash digest
SHA256 adee2574ebb3dababc5ff3b532afe4df6c506e1bab9af78e6981fbfee177ce86
MD5 98908d1015a759ba02da9d508b1f7aa0
BLAKE2b-256 91a5cf3c6547bad1998cdcffb95207377cd4980b073d5033d50425ef0f71a4a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for fherma-0.1.1.tar.gz:

Publisher: publish.yml on fairmath/fherma2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fherma-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fherma-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 24.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for fherma-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 41485608270e685adc715f280fd6eabbb39cfe913298e920478dea3c085d1672
MD5 d4ec36033c14cf61b612899127a07d45
BLAKE2b-256 59df77d4312d0773869fe31b5151d227677ea571de7b1c312ab6e420796864f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for fherma-0.1.1-py3-none-any.whl:

Publisher: publish.yml on fairmath/fherma2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.2.1

2 files

0.2.0

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page