git, using tokens you mint per repo.
- Git over HTTPS: standard
git clone,fetch, andpush, with scoped, expiring tokens.gitnever sees your API key. - Git LFS: works with no setup. LFS objects are stored on the repo’s disk.
- Commit without git: make a commit from a list of file changes with one API call, without a clone. See Commit without git.
- Instant forks: a fork is a copy-on-write copy of the repo’s disk, ready in about a second whatever the repo’s size. See Forks.
- Push webhooks: one signed webhook per account for every push and commit. See Push webhooks.
- Read without cloning: list refs, browse trees, read files, page through history, and compare branches over HTTPS.
- In your account: repos, the git service, and its state are disks and sandboxes in your account. The service keeps itself up to date and pauses when idle.
Git hosting is in preview, and the API may change before 1.0. Enable it from Git hosting in the
Archil console. Questions and feedback go to
support@archil.com.
Quickstart
1. Enable Git hosting
- In the Archil console, open Git hosting in the workspace that should hold your repos, and enable it. The console sets up the git service in your account.
- Copy the endpoint that page shows. This is your git endpoint: the SDK sends every Git hosting call there, and your repos’ remote URLs are on it.
- Use an API key from the same workspace.
2. Configure the SDK
Install the SDK and pass the endpoint to theArchil client. If you don’t pass it, the SDK reads ARCHIL_GIT_URL.
archil.git call fails with an ArchilGitError whose code is not_configured, before
any request is sent.
3. Create a repo
main. Pass defaultBranch (default_branch in Python) to change it.
4. Mint a token and push
git and Git LFS accept only tokens that you mint for specific repos, never your API key. A read token can clone
and fetch. A write token can push too.
tokens.credentials() mints a token for one repo and returns env: environment variables that make git send the
token to your git endpoint. Passing the token this way keeps it out of .git/config and off the command line.
git a token, such as a credential helper, see Tokens.
5. Read a file without cloning
How it works
Enabling Git hosting creates a few resources in your account, all in the workspace and region you enabled it in:- The git service, which runs as Archil sandboxes. One of them serves your git endpoint. Repos are spread over shards, 4 by default, and each shard is a sandbox that starts when the first repo is placed on it. To change the number of shards, see Shards.
- A disk per repo. The repo’s git objects, refs, and LFS objects live on it.
repo.diskIdnames it. - A small state disk that holds the service’s own records, such as your repos and webhook settings.
Limits
Performance
From an agent sandbox in AWS us-west-2, a warm push of a small commit took 119 ms at p50, a fetch 110 ms, and anls-remote 65 ms. code.storage is faster per small operation today. At 50 concurrent clients, Archil came within 6% of
code.storage’s push rate, and it was the fastest of the services we measured on full and blobless clones of git.git and
on 100 MB LFS downloads. The first operation on a repo that has been idle for hours takes about half a second longer.
See Git hosting performance for every number, the method, and where Archil is
slower.
Next steps
SDK reference
Repos, tokens, the read API, shards, and errors, in TypeScript and Python.
Give an agent sandbox a repo
Clone into a sandbox with a short-lived token and push the agent’s work back.
Commit without git
Write files to a branch with one API call.
Forks
Copy a repo of any size in about a second.