Skip to content

Installation

This page covers all installation methods for the SDF toolchain: the JavaScript/TypeScript library (@etapsky/sdf-kit), the command-line tool (sdf-cli), and the Python SDK (etapsky-sdf).

sdf-kit (JavaScript / TypeScript)

@etapsky/sdf-kit is the core library for producing and consuming .sdf files programmatically. Install it as a project dependency:

Terminal window
npm install @etapsky/sdf-kit

The package ships with full TypeScript type declarations. No additional @types/ package is needed.

For Bun projects:

Terminal window
bun add @etapsky/sdf-kit

sdf-kit works in both Node.js and modern browsers. The browser build uses the Web Crypto API for signing operations and the File/Blob APIs for ZIP handling. No Node.js built-ins are required in the browser entry point.

sdf-cli

sdf-cli is the command-line tool for inspecting, validating, signing, and converting .sdf files. Four installation methods are available.

npm (global install)

Terminal window
npm install -g @etapsky/sdf-cli

After installation, the sdf command is available globally:

Terminal window
sdf --version
sdf inspect invoice.sdf
sdf validate invoice.sdf

npx (no installation required)

Run any sdf-cli command without a global install:

Terminal window
npx @etapsky/sdf-cli inspect invoice.sdf
npx @etapsky/sdf-cli validate invoice.sdf

This is the recommended approach for CI environments and one-off use. The package is cached locally by npm after the first run.

Homebrew (macOS and Linux)

Terminal window
brew install etapsky/tap/sdf

After installation, the sdf command is available system-wide. Homebrew manages updates:

Terminal window
brew upgrade etapsky/tap/sdf

Binary download

Pre-built binaries are available on GitHub Releases for four platforms:

PlatformArchitectureFilename
macOSarm64 (Apple Silicon)sdf-macos-arm64
macOSx64 (Intel)sdf-macos-x64
Linuxx64sdf-linux-x64
Linuxarm64sdf-linux-arm64

Download the binary for your platform, make it executable, and move it to a directory on your PATH:

Terminal window
# Example: macOS arm64
curl -Lo sdf https://github.com/etapsky/sdf/releases/latest/download/sdf-macos-arm64
chmod +x sdf
sudo mv sdf /usr/local/bin/sdf

Binaries have no runtime dependencies — no Node.js installation required.

Python SDK

Terminal window
pip install etapsky-sdf

For virtual environment use (recommended):

Terminal window
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install etapsky-sdf

The Python SDK depends on cryptography, jsonschema, and reportlab. These are installed automatically by pip.

Supported Environments

Environmentsdf-kitsdf-cliPython SDK
Node.js 20 LTSYesYes
Node.js 22 LTSYesYes
Browser (modern)Yes
Bun 1.3+YesYes (binary)
Python 3.11+Yes
macOS arm64YesYesYes
macOS x64YesYesYes
Linux x64YesYesYes
Linux arm64YesYesYes

Verify Installation

After installing, verify each component works correctly.

sdf-kit — run this in a Node.js REPL or script:

import { buildSDF } from '@etapsky/sdf-kit/producer';
console.log(typeof buildSDF); // 'function'

sdf-cli:

Terminal window
sdf --version
# @etapsky/sdf-cli/0.3.2 darwin-arm64 node-v22.x.x

Python SDK:

Terminal window
python -c "import sdf; print(sdf.__version__)"
# 0.1.1

Next Steps