Skip to main content
This page documents the earlier Code Storage SDKs: @pierre/storage, pierre-storage, and code-storage-go. New code uses the Pierre SDK. To move code to the new SDK, use the pierre-migrate skill.

Installation & Setup

Set PIERRE_ORG and PIERRE_PRIVATE_KEY as shown in the Quick Start. Pass them to the client:
Await store.createRepo() or store.findOne() to get a repo object. store.findOne() returns null if the repository does not exist. In Go, import os to read the environment variables. SDK calls take a context.Context, and TTL values are time.Duration (for example time.Hour).
Need to create a JWT without an SDK client? See Authentication → How to sign a JWT.

Token signing

The Python package exports generate_jwt for code that needs a token without a GitStorage client. The helper selects ES256 or RS256 from the key type.
Python
See Storage Access & Permissions for repository claims and scopes.

Error Handling

The SDK surfaces API failures as ApiError and ref update failures as RefUpdateError.

Methods

Each method of the earlier SDK has its own page.

Client methods

Repository methods