Connect a Git repository
Connecting a Git repository makes CAVS the backend for its large files. Your source, history and pull requests stay exactly where they are.
What “connected” means
Section titled “What “connected” means”Four things get wired up:
| # | What | Why |
|---|---|---|
| 1 | lfs.url points at …/repositories/{id}/lfs |
Git LFS talks to CAVS instead of your Git host’s LFS |
| 2 | cavs-lfs-agent registered as a standalone transfer agent |
chunk-level dedup on push and pull |
| 3 | A pre-push hook |
uploads the Git index so the dashboard can show files, commits and branches |
| 4 | cavs.repo-id / cavs.api-base in git config |
so cav knows which repository this working tree belongs to |
The one-command path
Section titled “The one-command path”-
Have the tools.
cav,cavs-lfs-agentandgit-lfs:Terminal window curl -fsSL https://raw.githubusercontent.com/orelvis15/cavs-hub-cli/main/install.sh | shgit lfs version # install git-lfs separately if this failsThe installer places both
cavandcavs-lfs-agentin/usr/local/bin(or~/.local/binwhen that isn’t writable). -
Sign in, pointing the CLI at production:
Terminal window cav config set api https://cavsnode.comcav login -
Connect, from inside the Git working tree:
Terminal window cav repo connect acme-ai/vision-modelsOutput tells you what it configured, and the initial index backfill runs at the end.
-
Verify:
Terminal window cav doctorgit config --get lfs.urlgit config --get lfs.standalonetransferagent # → cavs
Useful flags:
cav repo connect acme-ai/vision-models --skip-lfs # only set lfs.url, don't wire the agentcav repo connect acme-ai/vision-models --skip-index # no pre-push hook, no initial backfillcav repo connect acme-ai/vision-models --agent-path /opt/cavs/cavs-lfs-agentTrack your large files
Section titled “Track your large files”Connecting doesn’t decide which files go to CAVS — Git LFS does, through
.gitattributes:
git lfs track "*.safetensors"git lfs track "*.ckpt"git lfs track "*.parquet"git lfs track "assets/**/*.pck"git add .gitattributesgit commit -m "Track large files with LFS"The manual path
Section titled “The manual path”If you’d rather not run the CLI, or you’re scripting a fleet, the four config lines are all there is. Get them from the API:
curl -sS "https://cavsnode.com/api/v1/repositories/$REPO/connect" \ -H "Authorization: Bearer $CAVS_TOKEN" | jq{ "repository_ref": "acme-ai/vision-models", "endpoint": "https://cavsnode.com/api/v1/repositories/0f8c…", "lfs_url": "https://cavsnode.com/api/v1/repositories/0f8c…/lfs", "git_config": [ "git config lfs.standalonetransferagent cavs", "git config lfs.customtransfer.cavs.path cavs-lfs-agent", "git config lfs.customtransfer.cavs.concurrent false", "git config lfs.url https://cavsnode.com/api/v1/repositories/0f8c…/lfs" ]}git lfs install --localgit config lfs.url "$LFS_URL"git config lfs.standalonetransferagent cavsgit config lfs.customtransfer.cavs.path cavs-lfs-agentgit config lfs.customtransfer.cavs.concurrent falseChunk-level dedup, range-resumed pulls, per-object physical stats, benchmarks.
git lfs install --localgit config lfs.url "$LFS_URL"That’s it — no extra binary. Whole-file transfers via the basic adapter and
presigned URLs. Identical files are still stored once. See
Git LFS.
Authenticating git-lfs
Section titled “Authenticating git-lfs”Git LFS needs a credential for lfs.url. Easiest is the Git credential helper:
git config credential.helper store# On the first transfer, enter any username and your CAVS token as the password.Or set it non-interactively — useful in CI:
git config http.extraHeader "Authorization: Bearer $CAVS_TOKEN"Cloning on a second machine
Section titled “Cloning on a second machine”Clones, then runs the connect flow inside the new working tree.
cd visioncav repo connect acme-ai/vision-modelsgit lfs pullGIT_LFS_SKIP_SMUDGE=1 stops LFS from trying to fetch objects from the wrong
endpoint before CAVS is configured. Once connected, git lfs pull fetches them
through CAVS — only the chunks the local cache lacks.
Starting from scratch
Section titled “Starting from scratch”cav init my-projectcd my-project# create the repository in the dashboard, then:cav repo connect acme-ai/my-projectgit lfs track "*.bin"git add . && git commit -m "Initial commit"git push -u origin mainIndexing
Section titled “Indexing”The pre-push hook keeps the index current, but you can drive it directly:
cav repo index --full # backfill all branches and tagscav repo index # incremental, since the Hub's known headscav repo index --ref main --ref dev # specific refs onlycav repo index --dry-run # show what would be uploadedRun --full after a history rewrite, after enabling indexing on an old
repository, or when the dashboard’s Files tab looks stale. The hook is
best-effort by design — it never blocks or fails a push.
Disconnecting
Section titled “Disconnecting”git config --unset lfs.urlgit config --unset lfs.standalonetransferagentgit config --unset lfs.customtransfer.cavs.pathgit config --unset lfs.customtransfer.cavs.concurrentgit config --unset cavs.repo-idgit config --unset cavs.api-baserm -f .git/hooks/pre-push # or edit out the `cav hook pre-push` lineObjects already stored stay in CAVS; nothing is deleted. Delete the repository if you want the bytes gone.
- Pushing & pulling large files — the daily loop.
- CAVS LFS agent — configuration and tuning.
- Troubleshooting — when a transfer misbehaves.

