# 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 name. 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, ES384, ES512, 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. - For cursor-paginated endpoints, send cursor and limit; responses carry next_cursor and has_more. Check each endpoint for page-size defaults and limits. - 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/api/overview): Base URL, authentication, cursor pagination and error format, with generated documentation for each endpoint. - [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 API index](https://code.storage/api): JSON index of the /api namespace on this origin — machine-readable entry points, the problem+json error format, and the per-response rate-limit headers. - [Code Storage protected resource metadata](https://api.pierre.code.storage/.well-known/oauth-protected-resource): RFC 9728 document listing the four token scopes machine-readably; it names no authorization server, because none exists. - [Code Storage SDK reference](https://code.storage/docs/sdk/overview): TypeScript, Python and Go methods for repositories, branches, commits, files, tags and notes. - [Code Storage Authentication](https://code.storage/docs/platform/authentication): Key pair creation, private key storage, JWT structure, ES256/ES384/ES512/RS256 signing, permission scopes, token TTLs, and ref policies. - [Code Storage webhooks](https://code.storage/docs/repos/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/repos/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/repos/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/repos/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): Build with the Pierre platform using APIs, libraries, and workflows for applications and coding agents. - [Quick Start](https://code.storage/docs/getting-started/quick-start): Set up your credentials, then use the SDK to create a repository, commit files, and read repository data. - [Organizations](https://code.storage/docs/platform/organizations): Create or join an organization, manage team access, and configure applications for your organization. ## 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 - [Legal center](https://code.storage/legal): Code Storage policies and agreements. - [Terms of Service](https://code.storage/legal/terms): Terms governing use of Code Storage. - [Acceptable Use Policy](https://code.storage/legal/acceptable-use): Rules for content and activity on 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.