Install the SDKs
Install the Safeguard AI SDK for TypeScript, Python or Go from npmjs.com or registry.safeguard.sh.
Install the SDKs
Version 0.1.0 is published. Install only the official names below.
TypeScript and Node.js
npm install @safeguard-sh/sdkThis installs from npmjs.com. The same release, byte for byte, is on Safeguard's registry:
npm install @safeguard-sh/sdk --registry https://registry.safeguard.sh/npm/Requires Node 18 or newer. The package ships ESM, CommonJS and type declarations and has no dependencies.
Python
pip install safeguard-sdk --index-url https://registry.safeguard.sh/pypi/simple/If your pip cannot fetch the one dependency (httpx) through that index, which older registry behaviour does not serve, install the package without dependencies and then the dependency from PyPI:
pip install --no-deps safeguard-sdk --index-url https://registry.safeguard.sh/pypi/simple/ && pip install "httpx>=0.25,<1"Requires Python 3.9 or newer. Import it as safeguard_sdk.
Go
export GOPROXY=https://registry.safeguard.sh/go
export GONOSUMDB=safeguard.sh
go get safeguard.sh/sdk@v0.1.0Requires Go 1.22 or newer and the standard library only. The module is served from the Safeguard registry, not from the public Go proxy.
Check the install
Set SAFEGUARD_API_KEY (how to create one) and run the Quickstart.
Trust only the official package names @safeguard-sh/sdk, safeguard-sdk and safeguard.sh/sdk, installed from npmjs.com or registry.safeguard.sh as shown here. Any other package that claims to be a Safeguard SDK was not published by Safeguard.