Pierre SDK and CLI
Date:November 03, 2026Author:Nicolas GallagherCategory:ANNOUNCEMENTS, ENGINEERINGPierre now has a CLI and a new SDK for TypeScript, Python, and Go. These libraries are generated from the HTTP API to keep them up-to-date. As a result, the CLI and SDK use the same operations and field names as the canonical, non-deprecated HTTP API. This helps agents work with Code Storage seamlessly across different surfaces.
npm install @pierre/sdk
pip install pierre-sdk
go get github.com/pierrecomputer/sdk/go
npm install -g @pierre/cliThe TypeScript package of the SDK and the CLI need a current release of Node.js 22, 24, or 26. The Python package needs Python 3.10 or later, and the Go module needs Go 1.25 or later.
Each client reads PIERRE_ORG and PIERRE_PRIVATE_KEY from the environment. For each request, the
SDK signs a 5-minute token with only the scopes of that operation.
Each operation has a catalog ID, for example repos.branches.create:
- The SDK method path is the catalog ID:
pierre.repos.branches.create(). - The CLI command is the catalog ID with
:between the resources, then the method:pierre repos:branches create. - The API reference page of the operation has the catalog ID as its title.
Search the docs for a catalog ID to find the operation in each form.
The fields have the HTTP wire names. TypeScript and Python use them as they are, Go puts them in the JSON tags of its fields, and the CLI flags are the wire names in kebab-case. This request creates a branch:
curl "https://api.$PIERRE_ORG.code.storage/api/repos/my-repo/branches/create" \
-H "Authorization: Bearer $PIERRE_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "target_branch": "feature/preview", "base_ref": "main" }'The same request in TypeScript:
import { Pierre } from '@pierre/sdk';
const pierre = new Pierre(); // reads PIERRE_ORG and PIERRE_PRIVATE_KEY
const branch = await pierre.repos.branches.create({
repo_name: 'my-repo',
target_branch: 'feature/preview',
base_ref: 'main',
});
console.log(branch.target_branch);In Python:
from pierre import Pierre
pierre = Pierre() # reads PIERRE_ORG and PIERRE_PRIVATE_KEY
branch = pierre.repos.branches.create(
repo_name="my-repo",
target_branch="feature/preview",
base_ref="main",
)
print(branch["target_branch"])In Go:
package main
import (
"context"
"fmt"
"log"
pierre "github.com/pierrecomputer/sdk/go"
)
func main() {
client, err := pierre.NewClient() // reads PIERRE_ORG and PIERRE_PRIVATE_KEY
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
branch, err := client.Repos.Branches.Create(ctx, pierre.ReposBranchesCreateParams{
RepoName: "my-repo",
TargetBranch: pierre.String("feature/preview"),
BaseRef: pierre.String("main"),
})
if err != nil {
log.Fatal(err)
}
fmt.Println(branch.TargetBranch)
}And with the CLI:
pierre repos:branches create feature/preview --repo-name my-repo --base-ref mainEach page of the API reference shows the request in TypeScript, Python, Go, the CLI, and cURL. For
an example, see repos.branches.create.
pierre calls each operation through @pierre/sdk. It also gives Git a credential for each Code
Storage remote, so no token appears in a remote URL or in a file. Create a key on the Keys page
of your dashboard, store it, and configure Git:
pierre auth login --hostname acme.code.storage --with-key < key.pem
pierre auth setup-git
pierre repos create my-app
git clone https://acme.code.storage/my-app.gitpierre api <catalog-id> calls any operation by its catalog ID, and pierre --help lists the
commands.
Install the Pierre skills for your coding agent:
npx skills add pierrecomputer/skillsSelect pierre. The skill tells the agent to read the current docs before it writes a call or runs
a command. If your code uses an old SDK, also select pierre-migrate. It moves code from the old
SDKs and the deprecated HTTP routes to @pierre/sdk and the current routes. Before it changes
behavior, it asks you. See Agent setup for
the docs MCP server.
The new SDK replaces the Code Storage SDKs: @pierre/storage, pierre-storage, and
code-storage-go. Code that uses them keeps working, because this release changes no route that
they call. The old SDKs get no new releases. Use the new SDK for new code, and move existing code
with the pierre-migrate skill.