sgit-ai — git for encrypted vaults
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.
📖 Documentation: sgit.ai — quickstart, the git-to-sgit command mapping, the security model, and the honest page about when not to use this. 🤖 Reading this as an AI agent? sgit.ai/llms.txt is an annotated map of the whole site; sgit.ai/llms-full.txt is every page in one document. Every page is also available as markdown at the same path.
Not to be confused with SGit, the Android Git client, or SGIT, the engineering college. This is
sgit-aion PyPI — the encrypted-vault CLI, documented at https://sgit.ai.
Why this exists
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.
Install
pip install sgit-ai
This gives you two CLI commands: sgit-ai and the shorthand sgit.
Quick Start
# 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 <vault-key>
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 <vault-key> # 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.
- AES-256-GCM for file encryption with per-file HKDF-derived keys
- PBKDF2-SHA256 (600k iterations) for vault key derivation
- Content-addressable storage — encrypted objects stored by hash
- Web Crypto API compatible — byte-for-byte interop with browser implementations
PKI and Digital Signatures
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 <fp> # Create detached signature
sgit pki verify doc.pdf sig.json # Verify signature
sgit pki encrypt doc.pdf --recipient <fp> # Hybrid RSA-OAEP + AES-256-GCM encryption
sgit pki decrypt doc.pdf.enc --fingerprint <fp>
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 <id> # Decrypt and display an object
sgit fsck --repair # Verify integrity and repair
Credential and Remote Management
# Store vault keys under friendly aliases
sgit vault add my-project --vault-key <key>
sgit vault list
# Configure multiple remotes
sgit remote add origin <url> <vault-id>
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.
Development
# 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
Documentation
Full documentation lives at sgit.ai — which is itself served from an encrypted vault, deployed by pushing that vault.
| Quickstart | create, commit, push, clone in five minutes |
| sgit for git users | every git command mapped to its sgit equivalent |
| The two-branch model | private clone branches, shared named branches |
| Working with AI agents | sgit write, --json everywhere, the session pattern |
| Security model | the crypto stack, and what the server can still see |
| When NOT to use sgit | the honest page |
| Use cases | recipes with an evidence status and an agent brief each |
| llms.txt · llms-full.txt | machine-readable index for agents |
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sgit_ai-0.16.0.tar.gz.
File metadata
- Download URL: sgit_ai-0.16.0.tar.gz
- Upload date:
- Size: 273.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.12.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
132c57a441b8121229a751b77d40d05c8566de76cc79ae838ef7e6a375a484dd
|
|
| MD5 |
00d2351d0ccb16558ee15392e8e35a6f
|
|
| BLAKE2b-256 |
89c1d10a3fa531e2a7d5fbb1c2e1315ab48244d7ae299de6a0834e7563e21ef2
|
File details
Details for the file sgit_ai-0.16.0-py3-none-any.whl.
File metadata
- Download URL: sgit_ai-0.16.0-py3-none-any.whl
- Upload date:
- Size: 423.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.12.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18f2100fb18e0b4fd693a15dd01ac4cea89425105f63b9822566cbcd7acac961
|
|
| MD5 |
5a76ead25772b39e278560713f30783a
|
|
| BLAKE2b-256 |
6e568eeb44cd7aba823b5e44ae70f39ef9cfe0293bc3f275d623cf6c1c647c30
|