Skip to main content
Learn how to use the Pierre SDK to create a repo, create a commit, read files, and apply diffs. These operations are some of the building blocks for agent workflows.

1. Sign up and create a private key

  • Create an account at code.storage.
  • Create a new Organization if needed (e.g., your-org)
  • Create a key on the organization’s Keys page.
  • Store the private key and set these environment variables. Replace your-org with your organization name:
See Authentication for more details.

2. Install the SDK

See SDK for more details.

3. Initialize the client

Pass PIERRE_ORG and PIERRE_PRIVATE_KEY to the client:

4. Create a repository

Each repository belongs to your organization and has a unique ID. Code Storage can generate a UUID, or you can supply an ID such as team/project-alpha. A new repository uses main as its default branch.
To sync with GitLab, Bitbucket, or another HTTPS host, pass a base repository. See GitHub Sync and Generic Sync.

5. Create a commit

Write files and commit them to repo without a local clone.

6. Read repository data

Read files, list commits, and stream file content from repo.

7. Apply a diff

Commit a unified diff to repo without a local clone.