# CODE STORAGE > DOCS > documentation for Code.Storage, Git infrastructure for your ai applications by the Pierre Computer Company, Inc. ## Docs - [Authentication & Security](https://code.storage/docs/getting-started/authentication.md): Every request uses JWT tokens you sign and control. Generate short-lived tokens for CI/CD, long-lived tokens for development, and manage permissions with fine-grained scopes—no third-party authentication required. - [Core Concepts](https://code.storage/docs/getting-started/core-concepts.md): Learn how Code Storage works under the hood. Understand repository IDs, JWT-based authentication, permission scopes, and how customer-signed tokens give you complete control over access. - [Introduction](https://code.storage/docs/getting-started/introduction.md) - [LLM and Agent Setup](https://code.storage/docs/getting-started/llm-agent-setup.md): Give your LLM or coding agent the Code Storage docs as context so it can use the SDK, HTTP API, and Git workflows correctly. - [Access the Docs in Context](https://code.storage/docs/getting-started/mcp.md): Connect the Code Storage docs directly to your CLI, IDE, or LLM context to reference our APIs wherever you work. - [Quickstart](https://code.storage/docs/getting-started/quickstart.md): Install the SDK, create your first repository, and start storing code in minutes. This guide walks you through the essential setup—from authentication to your first git clone. - [Branch Protection](https://code.storage/docs/guides/branch-protection.md): Embed write policies in the JWT used for Git authentication to control what kinds of writes are allowed and which refs they may touch. - [Ephemeral Branches](https://code.storage/docs/guides/ephemeral-branches.md): Spin up disposable branches for previews, CI artifacts, and experiments—then promote them when ready. - [Forking Repositories](https://code.storage/docs/guides/forking.md): Create lightweight copies of existing repositories for experimentation, templates, and isolated development. - [Git LFS](https://code.storage/docs/guides/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 Operations](https://code.storage/docs/guides/git-operations.md): Use standard Git commands with Code Storage over HTTPS. Clone, push, pull, and fetch with JWT-authenticated remotes. - [Imports](https://code.storage/docs/guides/imports.md): Push large repositories into Code Storage with immediate cold archival—keep disk usage low during bulk ingestion. - [Integrations](https://code.storage/docs/guides/integrations.md): Connect Code Storage repositories to GitHub or other external Git providers through a single API surface. - [Sandboxes](https://code.storage/docs/guides/sandboxes.md): Clone repositories into ephemeral sandbox environments for AI agents, code execution, and isolated development. - [Webhooks](https://code.storage/docs/guides/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. - [Create Branch](https://code.storage/docs/reference/api/branches/create-branch.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. - [Create Branch](https://code.storage/docs/reference/api/branches/create-branch-1.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. - [Delete Branch](https://code.storage/docs/reference/api/branches/delete-branch.md): Delete a branch from the repository. The default branch is protected and cannot be deleted through this endpoint. - [Delete Branch](https://code.storage/docs/reference/api/branches/delete-branch-1.md): Delete a branch from the repository. The default branch is protected and cannot be deleted through this endpoint. - [List Branches](https://code.storage/docs/reference/api/branches/list-branches.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. - [List Branches](https://code.storage/docs/reference/api/branches/list-branches-1.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. - [Merge Branch](https://code.storage/docs/reference/api/branches/merge-branch.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`. - [Merge Branch](https://code.storage/docs/reference/api/branches/merge-branch-1.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`. - [Commit Pack](https://code.storage/docs/reference/api/commits/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. - [Create Commit from Diff](https://code.storage/docs/reference/api/commits/create-commit-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. - [Create Commit from Files](https://code.storage/docs/reference/api/commits/create-commit-from-files.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. - [Diff Commit](https://code.storage/docs/reference/api/commits/diff-commit.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. - [Get Branch Diff](https://code.storage/docs/reference/api/commits/get-branch-diff.md): Compare a feature branch to its base branch and return every change that would be reviewed before a merge. Repeated `path` filters limit the diff to selected files and bypass the usual large-file filtering for those requested paths. - [Get Branch Diff](https://code.storage/docs/reference/api/commits/get-branch-diff-1.md): Compare a feature branch to its base branch and return every change that would be reviewed before a merge. Repeated `path` filters limit the diff to selected files and bypass the usual large-file filtering for those requested paths. - [Get Commit](https://code.storage/docs/reference/api/commits/get-commit.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. - [Get Commit](https://code.storage/docs/reference/api/commits/get-commit-1.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. - [Get Commit Diff](https://code.storage/docs/reference/api/commits/get-commit-diff.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. - [Get Commit Diff](https://code.storage/docs/reference/api/commits/get-commit-diff-1.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. - [List Commits](https://code.storage/docs/reference/api/commits/list-commits.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. - [List Commits](https://code.storage/docs/reference/api/commits/list-commits-1.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. - [Reset Commits](https://code.storage/docs/reference/api/commits/reset-commits.md) - [Reset Commits](https://code.storage/docs/reference/api/commits/reset-commits-1.md): Deprecated: Use `/api/repos/{repo_name}/reset-commits` instead. - [Restore Commit](https://code.storage/docs/reference/api/commits/restore-commit.md): Create a new commit that resets a branch back to a specific commit SHA while preserving normal Git history. - [Restore Commit](https://code.storage/docs/reference/api/commits/restore-commit-1.md): Create a new commit that resets a branch back to a specific commit SHA while preserving normal Git history. - [Create Generic Git Credential](https://code.storage/docs/reference/api/credentials/create-generic-git-credential.md): Create a stored HTTPS credential for a repository configured with a generic Git upstream. - [Create Git Credential](https://code.storage/docs/reference/api/credentials/create-git-credential.md): Create a stored HTTPS credential for a repository configured with a generic Git upstream. - [Delete Generic Git Credential](https://code.storage/docs/reference/api/credentials/delete-generic-git-credential.md): Delete a stored HTTPS credential for a generic Git upstream. - [Delete Git Credential](https://code.storage/docs/reference/api/credentials/delete-git-credential.md): Delete a stored HTTPS credential for a generic Git upstream. - [Update Generic Git Credential](https://code.storage/docs/reference/api/credentials/update-generic-git-credential.md): Update a stored HTTPS credential for a generic Git upstream. - [Update Git Credential](https://code.storage/docs/reference/api/credentials/update-git-credential.md): Update a stored HTTPS credential for a generic Git upstream. - [Archive](https://code.storage/docs/reference/api/files/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. - [Archive](https://code.storage/docs/reference/api/files/archive-1.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. - [Blame](https://code.storage/docs/reference/api/files/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. - [Blame](https://code.storage/docs/reference/api/files/blame-1.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. - [Get File](https://code.storage/docs/reference/api/files/get-file.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. - [Get File](https://code.storage/docs/reference/api/files/get-file-1.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. - [Get File Headers](https://code.storage/docs/reference/api/files/get-file-headers.md): Return file metadata headers for a repository file without streaming the file body. Supports byte ranges, ETag validators, and Last-Modified conditionals. Use `ref` to inspect a branch, tag, or commit without cloning the repo locally. - [Grep](https://code.storage/docs/reference/api/files/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. - [Grep](https://code.storage/docs/reference/api/files/grep-1.md): Search a repository without cloning it. Results are paginated and can include surrounding context lines so downstream tools only fetch the relevant slices. - [Head File](https://code.storage/docs/reference/api/files/head-file.md): Return file metadata headers for a repository file without streaming the file body. Supports byte ranges, ETag validators, and Last-Modified conditionals. Use `ref` to inspect a branch, tag, or commit without cloning the repo locally. - [List Files](https://code.storage/docs/reference/api/files/list-files.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. - [List Files](https://code.storage/docs/reference/api/files/list-files-1.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. - [List Files Metadata](https://code.storage/docs/reference/api/files/list-files-metadata.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`. - [List Files with Metadata](https://code.storage/docs/reference/api/files/list-files-with-metadata.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`. - [Create or Append Note](https://code.storage/docs/reference/api/notes/create-or-append-note.md): Attach text to a Git object without changing the repository contents. Use notes for review markers, internal decisions, or other lightweight context. - [Delete Note](https://code.storage/docs/reference/api/notes/delete-note.md): Remove the Git note attached to a commit or other Git object SHA. - [Get Note](https://code.storage/docs/reference/api/notes/get-note.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. - [Notes Delete](https://code.storage/docs/reference/api/notes/notes-delete.md): Remove the Git note attached to a commit or other Git object SHA. - [Notes Read](https://code.storage/docs/reference/api/notes/notes-read.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. - [Notes Write](https://code.storage/docs/reference/api/notes/notes-write.md): Attach text to a Git object without changing the repository contents. Use notes for review markers, internal decisions, or other lightweight context. - [Overview](https://code.storage/docs/reference/api/overview.md) - [Create Repo](https://code.storage/docs/reference/api/repositories/create-repo.md): Create a repository using the repo name embedded in the JWT. You can start empty, mirror an upstream repository, or fork another Code Storage repository into a new independent repo. - [Create Repo](https://code.storage/docs/reference/api/repositories/create-repo-1.md): Create a repository using the repo name embedded in the JWT. You can start empty, mirror an upstream repository, or fork another Code Storage repository into a new independent repo. - [Delete Repo](https://code.storage/docs/reference/api/repositories/delete-repo.md): Permanently retire a repository. The API performs a soft delete first and then triggers asynchronous hot and cold storage cleanup. - [Delete Repo](https://code.storage/docs/reference/api/repositories/delete-repo-1.md): Permanently retire a repository. The API performs a soft delete first and then triggers asynchronous hot and cold storage cleanup. - [Get Repo](https://code.storage/docs/reference/api/repositories/get-repo.md): Fetch repository metadata for the repository identified by the JWT `repo` claim. - [Get Repo](https://code.storage/docs/reference/api/repositories/get-repo-1.md): Fetch repository metadata for the repository identified by the JWT `repo` claim. - [List Repos](https://code.storage/docs/reference/api/repositories/list-repos.md): List repositories for the current organisation with cursor-based pagination. Supply `q` to filter results by a case-insensitive substring match against the repository `url` (for example `pierre/sdk-documentation`). - [List Repos](https://code.storage/docs/reference/api/repositories/list-repos-1.md): List repositories for the current organisation with cursor-based pagination. Supply `q` to filter results by a case-insensitive substring match against the repository `url` (for example `pierre/sdk-documentation`). - [Unset Base Repo](https://code.storage/docs/reference/api/repositories/unset-base-repo.md): Detach the repository from its configured upstream provider. The operation is idempotent: already-detached repositories return success. - [Unset Base Repo](https://code.storage/docs/reference/api/repositories/unset-base-repo-1.md): Detach the repository from its configured upstream provider. The operation is idempotent: already-detached repositories return success. - [Update Repo](https://code.storage/docs/reference/api/repositories/update-repo.md) - [Update Repo](https://code.storage/docs/reference/api/repositories/update-repo-1.md): Deprecated: Use `/api/repos/{repo_name}` instead. - [Pull Upstream](https://code.storage/docs/reference/api/sync/pull-upstream.md): Trigger a sync from the configured upstream for the repository in the JWT `repo` claim. This only works for repositories that were created with an upstream `base_repo`. - [Pull Upstream](https://code.storage/docs/reference/api/sync/pull-upstream-1.md): Trigger a sync from the configured upstream for the repository in the JWT `repo` claim. This only works for repositories that were created with an upstream `base_repo`. - [Create Tag](https://code.storage/docs/reference/api/tags/create-tag.md): Create a lightweight tag pointing to a specific commit. Annotated tags are not created through this endpoint. - [Create Tag](https://code.storage/docs/reference/api/tags/create-tag-1.md): Create a lightweight tag pointing to a specific commit. Annotated tags are not created through this endpoint. - [Delete Tag](https://code.storage/docs/reference/api/tags/delete-tag.md): Delete a tag from the repository. The server resolves the stored ref correctly for both lightweight and annotated tags. - [Delete Tag](https://code.storage/docs/reference/api/tags/delete-tag-1.md): Delete a tag from the repository. The server resolves the stored ref correctly for both lightweight and annotated tags. - [List Tags](https://code.storage/docs/reference/api/tags/list-tags.md): List tags in lexical order with cursor pagination. The returned `sha` is the dereferenced commit SHA, even for annotated tags. - [List Tags](https://code.storage/docs/reference/api/tags/list-tags-1.md): List tags in lexical order with cursor pagination. The returned `sha` is the dereferenced commit SHA, even for annotated tags. - [appendNote()](https://code.storage/docs/reference/sdk/append-note.md): Append content to an existing note (creates if it doesn't exist). - [createBranch()](https://code.storage/docs/reference/sdk/create-branch.md): Create a new branch from an existing branch, optionally using the ephemeral namespace. - [createCommit()](https://code.storage/docs/reference/sdk/create-commit.md): Build and push a commit to a branch using the fluent commit builder. - [createCommitFromDiff()](https://code.storage/docs/reference/sdk/create-commit-from-diff.md): Apply a pre-generated Git patch without constructing a builder. - [createGitCredential()](https://code.storage/docs/reference/sdk/create-git-credential.md): Store a Git credential for a repository configured with a generic HTTPS Git provider. - [createNote()](https://code.storage/docs/reference/sdk/create-note.md): Create a new note on a commit. - [createRepo()](https://code.storage/docs/reference/sdk/create-repo.md): Create a new repository with optional custom ID, default branch, Git Sync configuration, or a fork from an existing repository. - [createTag()](https://code.storage/docs/reference/sdk/create-tag.md): Create a lightweight tag pointing to a specific commit. - [deleteBranch()](https://code.storage/docs/reference/sdk/delete-branch.md): Delete a branch from the repository. - [deleteGitCredential()](https://code.storage/docs/reference/sdk/delete-git-credential.md): Remove a stored Git credential from a repository. - [deleteNote()](https://code.storage/docs/reference/sdk/delete-note.md): Remove a note from a commit. - [deleteRepo()](https://code.storage/docs/reference/sdk/delete-repo.md): Permanently delete a repository and all its contents. - [deleteTag()](https://code.storage/docs/reference/sdk/delete-tag.md): Delete a tag from the repository. - [findOne()](https://code.storage/docs/reference/sdk/find-one.md): Find an existing repository by its ID. - [getArchiveStream()](https://code.storage/docs/reference/sdk/get-archive-stream.md): Download a repository archive as a streaming tar.gz response. - [getBlame()](https://code.storage/docs/reference/sdk/get-blame.md): Show what revision and author last modified each line of a file. - [getBranchDiff()](https://code.storage/docs/reference/sdk/get-branch-diff.md): Get the diff between a branch and its base. - [getCommit()](https://code.storage/docs/reference/sdk/get-commit.md): Get metadata for a single commit without computing its diff. - [getCommitDiff()](https://code.storage/docs/reference/sdk/get-commit-diff.md): Get the diff for a specific commit. - [getFileStream()](https://code.storage/docs/reference/sdk/get-file-stream.md): Retrieve file content as a streaming response. - [getImportRemoteURL()](https://code.storage/docs/reference/sdk/get-import-remote-url.md): Generate authenticated Git URLs pointing to the +import namespace for bulk repository ingestion. - [getNote()](https://code.storage/docs/reference/sdk/get-note.md): Read a note attached to a specific commit. - [getRemoteURL()](https://code.storage/docs/reference/sdk/get-remote-url.md): Generate secure Git URLs with embedded JWT authentication. - [grep()](https://code.storage/docs/reference/sdk/grep.md): Search for patterns within repository content using regular expressions. - [headFile()](https://code.storage/docs/reference/sdk/head-file.md): Inspect file metadata without downloading the file body. - [Overview](https://code.storage/docs/reference/sdk/index.md): The simplest way to work with Code Storage. Generate authenticated URLs, create commits without git, stream file contents, and manage repositories—all from your application code. - [listBranches()](https://code.storage/docs/reference/sdk/list-branches.md): List all branches in the repository with pagination support. - [listCommits()](https://code.storage/docs/reference/sdk/list-commits.md): List commit history with optional branch filtering. - [listFiles()](https://code.storage/docs/reference/sdk/list-files.md): List all files in the repository at a specific ref. - [listFilesWithMetadata()](https://code.storage/docs/reference/sdk/list-files-with-metadata.md): List all files in the repository at a specific ref, with per-file git metadata. - [listRepos()](https://code.storage/docs/reference/sdk/list-repos.md): List all repositories in your organization with pagination support. - [listTags()](https://code.storage/docs/reference/sdk/list-tags.md): List all tags in the repository with pagination support. - [merge()](https://code.storage/docs/reference/sdk/merge.md): Merge one branch into another with merge, fast-forward-only, or fast-forward-preferred behavior. - [promoteEphemeralBranch()](https://code.storage/docs/reference/sdk/promote-ephemeral-branch.md): Promote an ephemeral branch to a persistent branch, optionally renaming it in the process. - [pullUpstream()](https://code.storage/docs/reference/sdk/pull-upstream.md): Force a pull from the configured upstream provider for a synced repository. - [restoreCommit()](https://code.storage/docs/reference/sdk/restore-commit.md): Create a commit rolling a branch back to a certain commit. - [updateGitCredential()](https://code.storage/docs/reference/sdk/update-git-credential.md): Update an existing Git credential for a repository. ## OpenAPI Specs - [openapi](https://code.storage/docs/api-reference/openapi.json)