sgit — git for encrypted vaults. Clone, commit, branch and merge files encrypted client-side (AES-256-GCM) before they leave your machine.
pip install sgit-ai==0.20.0 Copy PIP instructions
Clone, commit, branch and merge files that are encrypted before they leave your machine.
sgit is a git-shaped command-line tool for version-controlling files the storage provider cannot read. Every object is encrypted client-side with AES-256-GCM and stored under an opaque, content-addressed id — the server never receives a key, and never sees a filename, a file's contents, or a commit message.
Not to be confused with SGit, the Android Git client, or SGIT, the engineering college. This is sgit-ai on PyPI — the encrypted-vault CLI, documented at https://sgit.ai.
You have files that need version control and collaboration, and the place they are stored must not be able to read them. git gives you the workflow and hands the host your content; encrypted sync tools give you privacy and no history worth the name. sgit is the two together — see sgit.ai/why/, including a straight comparison of where git is still better (performance at scale, ecosystem, bisect/blame/rebase) and where the vault model changes what is possible.
pip install sgit-ai This gives you two CLI commands: sgit-ai and the shorthand sgit.
# Create a new encrypted vault sgit init my-vault # Add files to the working directory cp important-doc.pdf my-vault/ # Commit and push sgit commit "initial upload" -d my-vault sgit push my-vault # Clone an existing vault on another machine sgit clone Features Encrypted Vault Sync Clone, commit, push, and pull encrypted vaults — just like git, but every object is AES-256-GCM encrypted before upload.
sgit clone # Download and decrypt a vault sgit status # Show uncommitted changes sgit commit "my changes" # Snapshot local changes sgit pull # Fetch and merge remote changes sgit push # Upload to remote sgit branches # List all branches Client-Side Encryption All crypto runs locally. The server stores only ciphertext.
Built-in public key infrastructure for signing and encrypting files between users.
sgit pki keygen # Generate RSA-4096 + ECDSA P-256 key pair sgit pki sign doc.pdf --fingerprint # Create detached signature sgit pki verify doc.pdf sig.json # Verify signature sgit pki encrypt doc.pdf --recipient # Hybrid RSA-OAEP + AES-256-GCM encryption sgit pki decrypt doc.pdf.enc --fingerprint Vault Inspection Debug and inspect the internals of any vault.
sgit inspect # Vault state overview sgit log --oneline --graph # Commit history sgit inspect-tree # Current tree entries sgit inspect-stats # Object store statistics sgit cat-object # Decrypt and display an object sgit fsck --repair # Verify integrity and repair Static Publishing — serve a vault with no server Publish a vault as a plain folder of files that any static host (GitHub Pages, S3, a USB stick) can serve, and that sgit clone can read back over ordinary GETs. No server, no auth, no API.
sgit publish # write the plaintext surface to .sg_vault/publish/ sgit publish --visibility public # ...including the read key (irreversible; confirms) sgit publish --bundles --api-docs # + head/delta zips + a Swagger UI docs page sgit vault serve # read-only loopback server for the published folder publish emits only a small plaintext surface — loader, cover.json, manifest.json and, at public, the read key. It never copies ciphertext: the encrypted store is the store, composed into the served root at deployment. Publishing twice from the same head produces byte-identical output, and it needs only the read key, so read-only clones and zero-secret CI can republish.
sgit clone ./dest --transport auto # folder, static host, or live API Custody, Attaching, and Ignore Rules sgit vault mirror ./copy # keyless verifiable copy — custody without access sgit vault attach --read-key # bind a key to an existing bare checkout (CI, git clone) sgit vault ignore # show always-ignored folders sgit vault ignore --apply .github # untrack a now-ignored folder in one visible commit mirror re-hashes every content-addressed object rather than trusting the manifest, so a hostile host cannot substitute content into a copy you are holding for someone else.
sgit help --format json -o cli-reference.json # diffable contract, for docs tooling sgit help --format markdown # drop-in command reference page sgit help --format llms # llms.txt-style index for agents Generated by walking the CLI's own parser, so it cannot describe a command that does not exist or miss one that does — which is what keeps sgit.ai and llms.txt honest across releases.
# Store vault keys under friendly aliases sgit vault add my-project --vault-key sgit vault list # Configure multiple remotes sgit remote add origin sgit remote list Architecture sgit_ai/ ├── cli/ # CLI commands (sgit-ai / sgit) ├── crypto/ # AES-256-GCM, PBKDF2, HKDF, RSA-OAEP, ECDSA ├── sync/ # Clone, commit, push, pull, merge, branching ├── api/ # SGit-AI Transfer API client ├── pki/ # Key store and contact keyring ├── objects/ # Content-addressable encrypted object store ├── schemas/ # Type_Safe data models ├── safe_types/ # Domain-specific validated types (zero raw primitives) └── secrets/ # Local encrypted secrets store Built on osbot-utils Type_Safe framework — all data fields use validated domain types, never raw primitives.
# Install in dev mode pip install -e ".[dev]" # Run tests pytest tests/unit/ # Run with coverage pytest --cov=sgit_ai --cov-report=term-missing License Apache-2.0
Full documentation lives at sgit.ai — which is itself served from an encrypted vault, deployed by pushing that vault.
sgit sgit-ai vault encryption cli sync zero-knowledge end-to-end-encryption version-control ai-agents agent-memory aes-256-gcm
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.




