SDKs & CLI

SDK Quick Start

Transit client libraries for Go, Python, Java, and .NET are bundled with the platform under sdk/. Each library handles NHI attestation, automatic secret refresh, retry with exponential backoff, and in-memory delivery with envelope encryption. See the Registry for versioned archives.

Your app connects to the CoreLink Transit Agent running as a sidecar or DaemonSet. The SDK handles NHI attestation automatically -- set NHI_ID and PLATFORM_URL, and secrets are delivered in-memory with envelope encryption. No API keys required.
Add the SDK (included in the platform, import from sdk/go/transit)
go get github.com/techblend/secrets-mgmt/sdk/go/transit
Quick start
import (
    "os"
    "github.com/techblend/secrets-mgmt/sdk/go/transit"
)

func main() {
    client := transit.NewClient("http://transit-agent:9090", transit.Options{
        NHIID:       os.Getenv("NHI_ID"),
        PlatformURL: os.Getenv("PLATFORM_URL"),
    })
    client.Bootstrap()
    secret, err := client.GetSecret("my-db-password")
    if err != nil { log.Fatal(err) }
    fmt.Println(secret)
}
Add the SDK (included in the platform under sdk/python)
pip install ./sdk/python
Quick start
import os
from transit_client import TransitClient

client = TransitClient(
    transit_url="http://transit-agent:9090",
    nhi_id=os.environ["NHI_ID"],
    platform_url=os.environ["PLATFORM_URL"],
)
client.bootstrap()
secret = client.get_secret("my-db-password")
print(secret)
Add the SDK (included in the platform under sdk/java)
<dependency>
  <groupId>io.techblend</groupId>
  <artifactId>transit-client</artifactId>
  <version>1.0.1</version>
</dependency>
Quick start
TransitClient client = new TransitClient(
    "http://transit-agent:9090",
    System.getenv("NHI_ID"),
    System.getenv("PLATFORM_URL")
);
client.bootstrap();
String secret = client.getSecret("my-db-password");
System.out.println(secret);
Add the SDK (included in the platform under sdk/dotnet)
dotnet add package TechBlend.TransitClient --source ./sdk/dotnet
Quick start
using TechBlend.Transit;

var client = new TransitClient(
    "http://transit-agent:9090",
    Environment.GetEnvironmentVariable("NHI_ID"),
    Environment.GetEnvironmentVariable("PLATFORM_URL")
);
await client.BootstrapAsync();
var secret = await client.GetSecretAsync("my-db-password");
Console.WriteLine(secret);
Install from the downloaded package (Registry > SDKs)
tar -xzf corelink-sdk-node.tar.gz
npm install ./node
Quick start
const { TransitClient } = require("@techblend/transit");

const client = new TransitClient({
    transitUrl: "http://transit-agent:9090",
    platformUrl: process.env.PLATFORM_URL,
    nhiId: process.env.NHI_ID,
});

await client.bootstrap();
const secret = await client.getSecret("my-db-password");
Install from the downloaded package (Registry > SDKs)
tar -xzf corelink-sdk-ruby.tar.gz
gem build ruby/transit_client.gemspec && gem install techblend-transit-*.gem
Quick start
require "transit_client"

client = TransitClient::Client.new(
  transit_url: "http://transit-agent:9090",
  platform_url: ENV["PLATFORM_URL"],
  nhi_id: ENV["NHI_ID"]
)

client.bootstrap
secret = client.get_secret("my-db-password")
All documentation Question about this? Talk to us