Skip to main content

login

Store a Spec Hub API token. Without --token, the command opens <hub>/login?cli=1 in the browser and prompts for the token shown after sign-in. The token is written to ~/.config/theformalera/credentials.json (mode 0600), keyed by Hub URL. THEFORMALERA_TOKEN takes precedence over the stored token, so CI never needs login.

init

Detect Triton (@triton.jit) and CUDA/CUTLASS (__global__, cutlass) code and write theformalera.toml. init also:
  • writes AGENTS.md (verification rules for coding agents), unless one exists;
  • adds .theformalera/ to .gitignore, if there is one;
  • finds a CUTLASS include directory (third_party/cutlass/include or cutlass/include);
  • sets [lemmas] contribute to the default for the run mode and plan (off for local).

scan

List every annotated kernel, and the coverage of each locked model’s compute graph. scan reads annotations from the source and never imports your modules.
Kernels under [policy] require_annotation without an annotation are listed at the end. --json prints one object per kernel: name, file, line, language, kind (kernel or launcher), keys, parameters, grid, bind, layout, domain, assume, configs and autotune configs.

pull

For every model under [models]:
  1. resolve the version: the locked one if it still satisfies the requirement, else the newest that does;
  2. download the package and check its content hash against the lock (a mismatch stops the command);
  3. verify the publisher’s signature;
  4. install it into the content-addressed cache (~/.cache/theformalera/specs/<digest>);
  5. unless --no-build, build its Lean workspace (reusing $THEFORMALERA_MATHLIB if set, else lake exe cache get).
Then report spec security advisories for the locked versions, and write theformalera.lock.

annotate

Draft @tfe.implements annotations for the unannotated @triton.jit kernels in a file, from parameter names and data flow. Drafts are printed, never written. A wrong draft can only make verification fail, never pass.

version