# CODE STORAGE > DOCS > Documentation for Code Storage, Git infrastructure for agents. Create repositories, write commits, and get Git remote URLs through the SDK, the HTTP API, or Git over HTTPS. - [Introduction](https://code.storage/docs/getting-started/introduction.md): Code Storage is a versioned, programmable storage layer that powers the largest agentic workloads in the industry. - [Agent Setup](https://code.storage/docs/getting-started/agent-setup.md): How to set up your agent to use the latest docs. Choose from MCP, llms.txt, Markdown pages, and skills. - [Quick Start](https://code.storage/docs/getting-started/quick-start.md): A quick look at how to set up your credentials and use the SDK to create a repository, commit files, and read repository data. - [Organizations](https://code.storage/docs/platform/organizations.md): How to join or create an organization, manage team access, and configure applications for your organization. - [Authentication](https://code.storage/docs/platform/authentication.md): How to create a key, store its private key, and sign JWTs with the scopes and claims that each operation needs. - [Access & Permissions](https://code.storage/docs/repos/access.md): Choose Storage scopes, repository claims, and ref policies for each client. - [Git Operations](https://code.storage/docs/repos/git-operations.md): Use standard Git commands with Code Storage over HTTPS. Clone, push, pull, and fetch with JWT-authenticated remotes. - [Git LFS](https://code.storage/docs/repos/git-lfs.md): Track large files with Git LFS over the same JWT-authenticated remote you already use. No separate LFS server, no extra configuration. - [Git Notes](https://code.storage/docs/repos/git-notes.md): Attach metadata to commits without changing commit history, and keep different note streams isolated by ref. - [Ref Policies](https://code.storage/docs/repos/ref-policies.md): Use JWT ref policies for branch protection. Limit the refs that a token can update and the update types it permits. - [Commit Signing](https://code.storage/docs/repos/commit-signing.md): Register OpenPGP or SSH public keys. Use a ref policy to require signed commits on selected refs. - [Import Namespace](https://code.storage/docs/repos/imports.md): Push large repositories into Code Storage. Code Storage immediately moves them to cold storage to keep disk use low. - [Ephemeral Namespace](https://code.storage/docs/repos/ephemeral-branches.md): Create isolated refs for previews, CI artifacts, and experiments. Promote an ephemeral branch to the default namespace. - [Repository Forks](https://code.storage/docs/repos/forking.md): Create independent repository copies for experiments, templates, and isolated development. - [GitHub Sync](https://code.storage/docs/repos/github-sync.md): Mirror a GitHub repository through Code Storage with GitHub App sync, public mode, and Git LFS. - [Generic Sync](https://code.storage/docs/repos/generic-sync.md): Mirror a GitLab, Bitbucket, Gitea, Forgejo, Codeberg, or SourceHut repository through Code Storage over HTTPS. - [Webhooks](https://code.storage/docs/repos/webhooks.md): Receive real-time HTTP POST notifications when code changes and sync lifecycle events. Subscribe to push and repo sync events, verify HMAC signatures for security, and integrate Code Storage into your CI/CD pipelines, monitoring systems, and product workflows. - [External Sandbox Integration](https://code.storage/docs/repos/external-sandboxes.md): Clone repositories into third-party sandboxes, such as Modal, E2B, and Daytona, with authenticated Git URLs. - [Load Agent Memory](https://code.storage/docs/guides/agent-memory.md): Load selected memory files into a sandbox from one exact version, then save changes without losing another update or exposing a private key. - [Capture Agent State](https://code.storage/docs/guides/capture-agent-state.md): Capture agent state as ephemeral commits, exchange commit pointers, and keep normal branches unchanged. - [Restore Agent State](https://code.storage/docs/guides/restore-agent-state.md): Restore the last agent state in a new sandbox and reject writes from the old sandbox. - [Show Live Diffs](https://code.storage/docs/guides/live-diffs.md): Render an agent branch as a live diff and refresh the view when a new state arrives. - [Manage Product Files](https://code.storage/docs/guides/manage-product-files.md): Store product files in a managed repository, validate each complete change, and apply one exact revision. - [Run Parallel Attempts](https://code.storage/docs/guides/parallel-attempts.md): Start several agent attempts from one commit, compare their diffs, and promote the best result. - [Proxy Git with Your Own Auth](https://code.storage/docs/guides/proxy-git-with-your-own-auth.md): Give your users Git remotes on your own domain. Authenticate each request with your own system, then forward it to Code Storage with a short-lived token. - [Export Your Repositories](https://code.storage/docs/guides/export-repositories.md): Receive a copy of your Git repositories and LFS objects in an Amazon S3 bucket that you own, then verify and restore them on another Git host. - [Pierre SDK](https://code.storage/docs/sdks.md): Install the Pierre SDK for TypeScript, Python, or Go, set its credentials, and use the options, responses, pages, errors, and local helpers that apply to every call. - [CLI](https://code.storage/docs/cli.md): Install the pierre command, sign in with a key, and call any Code Storage operation from a terminal, a CI job, or Git. - [Diffs](https://code.storage/docs/ui/diffs.md) - [Trees](https://code.storage/docs/ui/trees.md) - [Overview](https://code.storage/docs/api/overview.md): Configure HTTP requests, paginate results, and handle API errors. - [meta.get](https://code.storage/docs/api/meta.md): Return the cloud provider, region, and public inbound IP addresses of the Code Storage cluster that serves the current organisation. Addresses are listed separately for Git over HTTPS and for the HTTP API; allow them in firewall rules that restrict outbound traffic to Code Storage. The lists change… - [repos.create](https://code.storage/docs/api/repos/repo-create.md): Create a repository. - [repos.delete](https://code.storage/docs/api/repos/repo-delete.md): Permanently retire a repository. The API performs a soft delete first and then triggers asynchronous hot and cold storage cleanup. - [repos.get](https://code.storage/docs/api/repos/repo-get.md): Fetch the metadata of a repository. - [repos.grep](https://code.storage/docs/api/repos/grep.md): Search a repository without cloning it. Results are paginated and can include surrounding context lines so downstream tools only fetch the relevant slices. - [repos.list](https://code.storage/docs/api/repos/repos-list.md): List repositories for the current organisation with cursor-based pagination. Supply `q` to filter results by a case-insensitive substring match against `repo_name` (for example `pierre/sdk-documentation`), and `prefix` to filter by the start of `repo_name`. When both are set they combine with AND: a… - [repos.merge](https://code.storage/docs/api/repos/merge.md): Merge changes between branches without cloning the repository or shelling out to Git. This endpoint also supports promoting work from ephemeral branches into long-lived branches such as `main`. Set `expected_source_sha` to merge the exact source commit that a preview returned, even if the source bra… - [repos.previewMerge](https://code.storage/docs/api/repos/merge-preview.md): Preview merge conflicts without creating commits, updating refs, or touching a working tree. When requested, conflict content is rendered from Git objects produced in request-local scratch storage. - [repos.update](https://code.storage/docs/api/repos/repo-update.md): Change the default branch of a repository. - [repos.archive.get](https://code.storage/docs/api/repos/archive.md): Download a repository snapshot without cloning the repo. This is useful for packaging docs, examples, or release artefacts directly from a branch, tag, or commit. - [repos.blame.get](https://code.storage/docs/api/repos/blame.md): Return per-line blame metadata for a file at a branch, tag, or commit. Supports `git blame -L`-style range filters and rename/copy detection for callers building IDE blame views or audit tooling. - [repos.branches.create](https://code.storage/docs/api/repos/branch-create.md): Create a new branch from an existing branch or ref. This is useful for agent workflows, ephemeral previews, or server-side automation where you do not want to clone the repo first. The base ref must exist. A new empty repository has no branch until its first commit, so the request returns `404`. - [repos.branches.delete](https://code.storage/docs/api/repos/branch-delete.md): Delete a branch from the repository. Name the branch with the `target_branch` and `ephemeral` query parameters. The server resolves the current branch tip before deleting, so the caller does not need the branch SHA. The default branch is protected and cannot be deleted through this endpoint. - [repos.branches.get](https://code.storage/docs/api/repos/branch-get.md): Get one branch by its exact short name. The response omits list pagination fields. A new empty repository has no branch until its first commit, so the request returns `404`. - [repos.branches.list](https://code.storage/docs/api/repos/branches-list.md): List branches in the repository with cursor pagination. Use this to build branch selectors, review tools, or sync jobs without shelling out to Git. A new empty repository has no branch until its first commit, so its list is empty. - [repos.commits.create](https://code.storage/docs/api/repos/commit-pack.md): Create a commit by streaming file operations directly to the service. This is designed for automation, AI agents, and other workflows that need atomic Git writes without running a local Git process. - [repos.commits.createFromDiff](https://code.storage/docs/api/repos/commit-create-from-diff.md): Create a commit by streaming a Git patch instead of individual file blobs. Use this when your workflow already produces unified diffs or generated patches. - [repos.commits.get](https://code.storage/docs/api/repos/commit-get.md): Resolve a branch name, short SHA, or full SHA to a commit and return the same metadata shape used in commit listings. Use this when you need commit details without computing a diff. - [repos.commits.list](https://code.storage/docs/api/repos/commits-list.md): List commit history for the repository default branch or for an explicit branch. Results are cursor-paginated and ordered by commit date, newest first. Set `path` to restrict the history to commits that modified a specific file or subtree. - [repos.commits.restore](https://code.storage/docs/api/repos/commit-restore.md): Create a new commit that resets a branch back to a specific commit SHA while preserving normal Git history. - [repos.diff.get](https://code.storage/docs/api/repos/diff-get.md): Get the diff for a commit, optionally relative to a specific base commit. Repeated `path` parameters narrow the diff to selected files or directories. - [repos.files.get](https://code.storage/docs/api/repos/file-get.md): Stream a file directly from the repository with byte ranges, ETag validators, and Last-Modified conditionals. Use `ref` to read from a branch, tag, or commit without cloning the repo locally. - [repos.files.list](https://code.storage/docs/api/repos/files-list.md): List files or direct child entries at a branch, tag, or commit without cloning the repository. Each entry includes its path, Git mode, and derived type (`blob`, `tree`, `symlink`, or `submodule`). Trees no longer carry a trailing `/`; branch on `type` instead. - [repos.files.metadata.get](https://code.storage/docs/api/repos/file-head.md) - [repos.files.metadata.list](https://code.storage/docs/api/repos/files-metadata-list.md): Return a recursive file tree together with per-file commit metadata in one request. Each file also includes a derived `type` field for symmetry with `/files`. - [repos.gitCredentials.create](https://code.storage/docs/api/repos/git-credential-create.md): Create a stored HTTPS credential for a repository configured with a generic Git upstream. - [repos.gitCredentials.delete](https://code.storage/docs/api/repos/git-credential-delete.md): Delete a stored HTTPS credential for a generic Git upstream. - [repos.gitCredentials.update](https://code.storage/docs/api/repos/git-credential-update.md): Update a stored HTTPS credential for a generic Git upstream. - [repos.notes.append](https://code.storage/docs/api/repos/note-append.md): Add text to the note on a Git object, or create the note if the object has none. A retry after a success adds the text again. To make a retry safe, set `expected_notes_ref_sha` to the notes ref SHA that you read before the first request: a retry then fails with 409 and adds nothing. - [repos.notes.create](https://code.storage/docs/api/repos/note-create-or-append.md): Attach text to a Git object without changing the repository contents. Use notes for review markers, internal decisions, or other lightweight context. To add text to a note, use `POST /notes/append`. - [repos.notes.delete](https://code.storage/docs/api/repos/note-delete.md): Remove the Git note attached to a commit or other Git object. Name the note with the query parameters of `GET /notes`. The notes commit of the delete has the default author. - [repos.notes.get](https://code.storage/docs/api/repos/note-get.md): Read the Git note attached to a commit or other Git object SHA. Notes let you store review status, handoff details, or other context without changing repository contents. - [repos.notes.refs.list](https://code.storage/docs/api/repos/notes-refs-list.md): List Git notes refs under a notes ref prefix with cursor pagination. Use this to discover custom notes namespaces before reading individual notes. - [repos.tags.create](https://code.storage/docs/api/repos/tag-create.md): Create a lightweight tag pointing to a specific commit. Annotated tags are not created through this endpoint. - [repos.tags.delete](https://code.storage/docs/api/repos/tag-delete.md): Delete a tag from the repository. The server resolves the stored ref correctly for both lightweight and annotated tags. - [repos.tags.get](https://code.storage/docs/api/repos/tag-get.md): Get one tag by its exact short name. The response returns the dereferenced commit SHA and omits internal fields. - [repos.tags.list](https://code.storage/docs/api/repos/tags-list.md): List tags in lexical order with cursor pagination. The returned `sha` is the dereferenced commit SHA, even for annotated tags. - [repos.upstream.delete](https://code.storage/docs/api/repos/repo-base-delete.md): Detach the repository from its configured upstream provider. The operation is idempotent: already-detached repositories return success. - [repos.upstream.pull](https://code.storage/docs/api/repos/upstream-pull.md): Trigger a sync from the configured upstream of the repository. This only works for repositories that have an `upstream`. ## OpenAPI Specs - [openapi](/docs/openapi.json) - [openapi](/docs/openapi.yaml) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.