# Code Storage > Off the shelf Git infrastructure for your AI application. Code Storage is a managed Git infrastructure layer for automated systems. AI applications, agents, CI jobs, and backend services create and use Git repositories through SDK and HTTP interfaces. Standard Git clients can also clone, fetch, and push. ## When to use Code Storage Reach for Code Storage when: - Your product needs to create Git repositories on demand — one per user, project, or agent session — instead of going through a Git host's UI, seat model, or API rate limits. - A coding agent needs somewhere to write code and keep history: create a commit without a local working copy, list and diff commits, branch, preview a merge, and merge, each as a single API call. - You need an isolated ref namespace for previews, CI artifacts, or agent experiments. - You need to clone a repository into an isolated sandbox for code execution. - You store code-like artifacts that change over time and want real Git semantics — history, blame, diff, grep, archives, tags, notes — rather than a blob store. - You need to ingest large existing repositories in bulk (imports), or keep repositories synced with GitHub (integrations). - You want native Git clone, push and fetch endpoints exposed under your own product's domain. Code Storage is the storage layer, not a collaboration product. The API covers repositories, branches, commits, files, tags and notes; there is no pull request, issue, or code review API. Storage is billed per GB and untouched repositories move to cheaper cold storage after 7 days, so many small, short-lived repositories are an expected shape rather than an abuse of one. ## How an agent calls Code Storage - Base URL: https://api.{org}.code.storage/api — {org} is your organization identifier. Preferred routes use the short /api/... form; /api/v1/... aliases still exist and are marked deprecated where a preferred route has replaced them. - Authentication: send Authorization: Bearer on every request. You sign the token yourself with your own ES256 or RS256 private key — there is no third-party auth provider and no OAuth flow. A token names one repository in its repo claim (org-wide org:read tokens excepted), carries explicit scopes (git:read, git:write, repo:write, org:read), and expires at its exp. - Machine-readable spec: https://code.storage/openapi.json — OpenAPI 3.1, served without authentication, as a pass-through of the gateway's description. The same description is linked from https://code.storage/.well-known/api-catalog, which points at the gateway origin (https://api.pierre.code.storage/api/openapi.json). - Repository names containing / must be URL encoded into a single path segment: pierre/example becomes /api/repos/pierre%2Fexample. - List endpoints are cursor paginated: send cursor and limit (default 20); responses carry next_cursor and has_more. - Errors are RFC 9457 problem details served as application/problem+json, with a legacy error field mirroring detail. - SDKs: @pierre/storage (TypeScript), pierre-storage (Python), github.com/pierrecomputer/sdk/packages/code-storage-go (Go). - Git protocol: clone, push and fetch over HTTPS against https://t:@{org}.code.storage/.git. - Docs pages are also served as Markdown, which is cheaper to read than the HTML: append .md to any /docs URL, or send Accept: text/markdown. ## Code Storage developer resources - [Code Storage developer resources](https://code.storage/developers): Search-indexable hub for the API reference, OpenAPI schemas, authentication, SDKs, webhooks, Git protocol, MCP server, and agent indexes. - [Code Storage HTTP API reference](https://code.storage/docs/reference/api/overview): Base URL, authentication, cursor pagination and error format, with a generated page per endpoint under /docs/reference/api/. - [Code Storage OpenAPI spec](https://code.storage/openapi.json): OpenAPI 3.1 description of the HTTP API, served unauthenticated for SDK generators and agents. - [Code Storage API catalog](https://code.storage/.well-known/api-catalog): RFC 9727 catalog linking the HTTP API to its OpenAPI description and its reference documentation. - [Code Storage SDK reference](https://code.storage/docs/reference/sdk/index): TypeScript, Python and Go methods for repositories, branches, commits, files, tags and notes. - [Code Storage Authentication & Security](https://code.storage/docs/getting-started/authentication): API key creation and storage, JWT structure, ES256/RS256 signing, permission scopes, token TTLs, and ref policies. - [Code Storage webhooks](https://code.storage/docs/guides/webhooks): push and repo.sync.* events delivered as HTTP POSTs, signed with HMAC-SHA256 and verified through the SDK. - [Code Storage MCP server](https://code.storage/docs/mcp): Streamable HTTP MCP endpoint whose tools search these docs. Client setup at https://code.storage/docs/getting-started/agent-setup; discovery card at https://code.storage/.well-known/mcp.json. - [Code Storage Git protocol guide](https://code.storage/docs/guides/git-operations): clone, push, pull and fetch against JWT-authenticated HTTPS remotes. - [Code Storage Agent Setup](https://code.storage/docs/getting-started/agent-setup): Set up an agent with the current Code Storage docs. - [Code Storage ref policies](https://code.storage/docs/guides/ref-policies): Use JWT ref policies for branch protection. Limit the refs that a token can update and the update types it permits. - [Code Storage commit signing](https://code.storage/docs/guides/commit-signing): Register OpenPGP or SSH keys and require valid commit signatures on selected refs. ## Section indexes - [Docs index (llms.txt)](https://code.storage/docs/llms.txt): LLM-friendly index of the documentation, regenerated when the docs change. - [API index (llms.txt)](https://code.storage/api/llms.txt): Scoped index for one product area — the HTTP API, the OpenAPI spec, authentication, webhooks and the MCP server. - [Full text (llms-full.txt)](https://code.storage/llms-full.txt): This whole surface expanded into prose, so an agent can answer questions without fetching every page. ## Docs - [Documentation](https://code.storage/docs): Guides and reference for Code Storage. - [Introduction](https://code.storage/docs/getting-started/introduction): Learn what Code Storage is — Git infrastructure for agents — the repository and ref model, and a map of the features and workflows. - [Quick Start](https://code.storage/docs/getting-started/quickstart): Install the SDK, initialize the client, create a repository, and make your first commit. ## Agent discovery - [Agent skills index](https://code.storage/.well-known/agent-skills/index.json): Agent Skills Discovery index for the code-storage skill. ## Pages - [Home](https://code.storage/): Product overview — off-the-shelf, white-label Git infrastructure built for scale. - [Pricing](https://code.storage/pricing): Plans and pricing for Code Storage. - [Changelog](https://code.storage/changelog): Product updates and release notes. - [Contact](https://code.storage/contact): How to reach us — support, sales, documentation corrections, and our mailing address. ## Legal - [Terms of Service](https://code.storage/legal/terms): Terms governing use of Code Storage. - [Privacy Policy](https://code.storage/legal/privacy): How we handle personal data. - [Service Level Agreement](https://code.storage/legal/sla): Uptime and support commitments. - [Data Processing Addendum](https://code.storage/legal/dpa): Data processing terms for customers. - [Sub-processors](https://code.storage/legal/sub-processors): Third-party sub-processors we use. ## Company - [Pierre Computer Company](https://pierre.computer): The company behind Code Storage. ## See also - [@pierre/trees](https://trees.software/llms.txt): Open source file tree rendering library for the web. - [@pierre/diffs](https://diffs.com/llms.txt): Open source diff and code rendering library for the web. - [diffshub](https://diffshub.com): View code changes from any public GitHub diff—PRs, comparisons, commits, diffs, and patches—with a super-freaking-fast, beautiful, and virtualized interface by replacing github.com with diffshub.com.