Official SDKs for the SafeURL API, an AI-powered URL safety screening service.
This repository contains:
- Go SDK — Native Go client generated from OpenAPI.
- TypeScript SDK — Type-safe TypeScript client generated from OpenAPI using Hey API.
safeurl-sdk/
├── go/ # Go SDK source and generation scripts
└── ts/ # TypeScript SDK source and generation scripts
go get github.com/gnoverse/safeurl-sdk/gonpm install @safeurl/sdkThis repo uses release-please with release-please-config.json. Merge the release pull request on main to tag releases and publish changelogs for the TypeScript (ts/) and Go (go/) packages.
Publishing @safeurl/sdk to npm from CI requires a repository secret NPM_TOKEN (automation token with publish access to the @safeurl scope). Without it, the release still completes on GitHub; the npm publish step fails until the secret is configured.
These SDKs are generated from the SafeURL OpenAPI specification.
The fetched spec is stored once at the repository root as openapi.json.
Install just to use the repo's task runner:
brew install just # macOS
# or: cargo install just| Command | Description |
|---|---|
just gen |
Fetch the OpenAPI spec and regenerate both SDKs |
just smoke |
Run Go and TypeScript smoke tests against a local API |
just genOr directly:
sh scripts/fetch-openapi.shjust smokeOr directly:
sh scripts/test-sdk-smoke.shThe script expects the local SafeURL stack to be running and reads the shared
secret from ~/dev/safeurl/.env by default, or from SAFEURL_ENV_FILE /
SAFEURL_REPO_DIR if you need to point at a different checkout.
You can still override the secret with SAFEURL_SDK_TEST_SERVICE_SECRET or
SAFEURL_SERVICE_SECRET. SAFEURL_SDK_TEST_BASE_URL defaults to
http://localhost:8081.
Apache-2.0