Install Harbor SDKs
Install the TypeScript and Python packages for Harbor clients and system integrations.
Harbor keeps the public package surface small: two TypeScript packages and one Python package. The current v0.1.2 release is distributed through GitHub release artifacts, not npm or PyPI registry publication.
Packages
| Package | Current artifact | Use it for |
|---|---|---|
@hrbr/client | hrbr-client-0.1.2.tgz | Promise-first TypeScript calls to the hosted or local Harbor API. |
@hrbr/sdk | hrbr-sdk-0.1.2.tgz | Composite Harbor contracts, inspect helpers, runtime and platform adapters, registry types, and local platform helpers. |
harbor-sdk | harbor_sdk-0.1.2-py3-none-any.whl | Sync and async Python clients over the same Harbor protocol. |
The source package repository is github.com/zonko-ai/harbor-sdk. The generated protocol artifacts still come from the main Harbor monorepo, then land in that publish-shaped repository.
Download the signed release assets from v0.1.2.
Requirements
| Runtime | Requirement |
|---|---|
| TypeScript / JavaScript | Node.js 22 or newer. |
| Effect host code | effect@4.0.0-beta.70 when importing @hrbr/client/effect or Effect-backed @hrbr/sdk surfaces. |
| Python | Python 3.10 or newer. |
TypeScript install
Install the normal application client from the v0.1.2 release tarball:
npm install https://github.com/zonko-ai/harbor-sdk/releases/download/v0.1.2/hrbr-client-0.1.2.tgzCreate a workspace-scoped client with either a Harbor workspace API key or an application-owned bearer token:
import { createHarborClient } from '@hrbr/client'
const harbor = createHarborClient({
baseUrl: 'https://api.tryharbor.ai',
workspaceId: process.env.HARBOR_WORKSPACE_ID!,
auth: { kind: 'api_key', key: process.env.HARBOR_API_KEY! },
})
const health = await harbor.api.getHealth()
const run = await harbor.runtime.execute({
code: 'return "hello from Harbor"',
})
console.log(health.status)
console.log(run.result)Install the composite system SDK when you need Harbor-owned building blocks instead of the app client:
npm install https://github.com/zonko-ai/harbor-sdk/releases/download/v0.1.2/hrbr-sdk-0.1.2.tgzimport { Core, Inspect, Platform, Plugins, Protocol, Runtime } from '@hrbr/sdk'
import { initLocalProject } from '@hrbr/sdk/platform/local'
const project = initLocalProject({
workspaceId: 'workspace_local',
workspaceName: 'Local SDK Workspace',
authToken: 'local-token',
})
console.log(Core.ROUTES.exec)
console.log(Inspect.INSPECT_RESULT_KIND)
console.log(Protocol.harborOpenApiDocument.info.title)
console.log(Runtime.Core.RuntimeExecutionMode)
console.log(Plugins.ToolSearchMode)
console.log(project.workspaceId)Python install
Install the Python wheel from the v0.1.2 release and use the public
harbor_sdk facade:
python -m pip install https://github.com/zonko-ai/harbor-sdk/releases/download/v0.1.2/harbor_sdk-0.1.2-py3-none-any.whlfrom harbor_sdk import HarborClient
client = HarborClient(
api_key="hrbr_...",
workspace_id="workspace_...",
)
run = client.runtime.execute(code='return "hello from Harbor"')
print(run.result)api_key defaults to HARBOR_API_KEY,
workspace_id defaults to HARBOR_WORKSPACE_ID, and
base_url defaults to https://api.tryharbor.ai.
HARBOR_API_BASE_URL and HARBOR_SDK_BASE_URL can
override the API base URL for local or staging targets.
Source checkout
For local development or artifact regeneration, install from the checkout:
git clone https://github.com/zonko-ai/harbor-sdk.git
cd harbor-sdk
git checkout v0.1.2
bun install
bun run smoke
bun run python:sdk:testThe Python package can also be installed editable from the checkout:
python3 -m pip install -e packages/python