Skip to content

Installation

Prerequisites

  • Python 3.12 or newer (tested on 3.12, 3.13, and 3.14)
  • pdflatex must be available in your PATH to generate PDF reports (with --no-pdflatex the LaTeX source is saved instead)

Install cgt-calc

You can install the calculator using uv, pipx, or standard pip:

uv tool install cgt-calc

Or run it directly without installing:

uvx cgt-calc

Nix

The Nix community maintains a cgt-calc package in nixpkgs, which bundles pdflatex so no separate LaTeX install is needed:

nix run nixpkgs#cgt-calc

Installing LaTeX

macOS

brew install --cask mactex-no-gui

Debian/Ubuntu

apt install texlive-latex-base

Windows

Install MiKTeX.

Shell completions

cgt-calc can generate a tab completion script for bash, zsh, fish and tcsh. Save it where your shell looks for completions, e.g.:

# bash
cgt-calc --print-completion bash > ~/.local/share/bash-completion/completions/cgt-calc

# zsh (the target directory must be in your $fpath)
cgt-calc --print-completion zsh > ~/.zfunc/_cgt-calc

# fish
cgt-calc --print-completion fish > ~/.config/fish/completions/cgt-calc.fish

Regenerate the script after upgrading to pick up new options.