| Crates.io | fai-protocol |
| lib.rs | fai-protocol |
| version | 0.2.1 |
| created_at | 2025-10-23 17:43:41.391228+00 |
| updated_at | 2025-10-23 17:43:41.391228+00 |
| description | A decentralized version control system for AI models and large files |
| homepage | https://github.com/kunci115/fai-protocol |
| repository | https://github.com/kunci115/fai-protocol |
| max_upload_size | |
| id | 1897420 |
| size | 299,519 |
Distributed Version Control for Large Files
Git for large files, done right - True P2P version control for anything from 100MB to TB
Quick Start โข Installation โข Use Cases โข Architecture
Working with large files (>100MB) is painful:
FAI Protocol is Git for large files, done right:
โ
True P2P - No central server needed
โ
Any file size - GB to TB, no limits
โ
Smart chunking - 1MB chunks with deduplication
โ
Offline-first - Works on LAN without internet
โ
Git-like workflow - Familiar commands
โ
Free for research - AGPL-3.0 for academic and research use
โ ๏ธ Commercial license - Paid license required for commercial use
FAI is for anyone working with large files:
๐ฎ Game Developers - Version control for 50GB+ asset libraries
๐ฌ Video Editors - Track edits on TB of raw footage
๐ค AI Researchers - Share 10GB+ model checkpoints
๐งฌ Scientists - Collaborate on large datasets
๐ฆ Software Teams - Distribute large binaries
๐๏ธ Architects - Version CAD files and 3D models
๐ธ Photographers - Manage RAW photo libraries
๐ต Music Producers - Collaborate on multi-GB projects
๐พ Anyone - Who needs version control + large files
# Install FAI Protocol (requires Rust 1.70+)
cargo install fai-protocol
# Initialize your first repository
fai init
โ
Initialized FAI repository in .fai/
# Add large files (any size!)
fai add my-large-file.bin
โ
Added my-large-file.bin (abc12345)
# Commit your changes
fai commit -m "Initial commit"
โ
Created commit abc12345
# Start sharing with peers
fai serve
๐ Listening on /ip4/192.168.1.100/tcp/4001
That's it! You're now running a decentralized large file repository.
# Clone the repository
git clone https://github.com/kunci115/fai-protocol.git
cd fai-protocol
# Build and install
cargo install --path .
# Install published version from crates.io
cargo install fai-protocol
# Or install latest from source
git clone https://github.com/kunci115/fai-protocol.git
cd fai-protocol
cargo install --path .
# Generate completion scripts
fai completion bash > ~/.local/share/bash-completion/completions/fai
fai completion fish > ~/.config/fish/completions/fai.fish
fai completion zsh > ~/.zsh/completions/_fai
# Install directly (bash)
fai completion bash | sudo tee /etc/bash_completion.d/fai
# Initialize a new repository
fai init
# Add large files (handles any size automatically)
fai add game-assets/textures/
fai add video-project/footage/
fai add ml-models/resnet50.pt
# Check what's staged for commit
fai status
โ Changes to be committed:
โ game-assets/textures/ (abc12345 - 2.3GB)
โ video-project/footage/ (def67890 - 8.7GB)
โ ml-models/resnet50.pt (fedcba98 - 420MB)
# Create commits with meaningful messages
fai commit -m "Add game texture pack and 4K footage"
fai commit -m "Update ResNet model with improved accuracy"
# View commit history
fai log
โ commit xyz78901 (2024-01-15 14:30:22)
โ Update ResNet model with improved accuracy
โ
โ commit abc12345 (2024-01-15 12:15:10)
โ Add game texture pack and 4K footage
# Start serving your models to the network
fai serve
๐ FAI server started
๐ก Local peer ID: 12D3KooW... (copy this)
๐ Discovering peers on local network...
# Discover other peers
fai peers
๐ Found 3 peers on network:
โ 12D3KooWM9ek9... (192.168.1.101:4001)
โ 12D3KooWDqy7V... (192.168.1.102:4001)
# Clone a repository from a peer
fai clone 12D3KooWM9ek9txt9kzjoDwU48CKPvSZQBFPNM1UWNXmp9WCgRpp
๐ฅ Cloning repository...
โ
Downloaded 15 commits
โ
Downloaded 42 files (8.7GB)
โ
Clone complete!
# Pull latest changes from peers
fai pull 12D3KooWM9ek9txt9kzjoDwU48CKPvSZQBFPNM1UWNXmp9WCgRpp
๐ฅ Found 3 new commits
โ
Pull complete!
# Push your commits to peers
fai push 12D3KooWM9ek9txt9kzjoDwU48CKPvSZQBFPNM1UWNXmp9WCgRpp
๐ค Pushing 2 commits...
โ
Push complete!
# Compare different versions
fai diff abc12345 xyz78901
๐ Comparing commits:
โ Commit 1: abc12345 - "Add game texture pack"
โ Date: 2024-01-15 12:15:10
โ Files: 2
โ Commit 2: xyz78901 - "Update textures with 4K versions"
โ Date: 2024-01-15 14:30:22
โ Files: 2
๐ Changes:
โ Added files (1):
+ fedcba98 (1.2GB)
โ Removed files (1):
- abc12345 (800MB)
๐ Summary:
Added: 1 files, Removed: 1 files
Size: +400MB (higher quality assets)
# Check chunk information for large files
fai chunks abc12345
๐ฆ File: multi-chunk file (manifest: abc12345fedc)
๐ข Chunks:
0: chunk001 (100MB)
1: chunk002 (100MB)
2: chunk003 (120MB)
๐ Total: 3 chunks, 320MB (1.53GB original)
# Fetch specific files from peers
fai fetch 12D3KooWM9ek9txt9kzjoDwU48CKPvSZQBFPNM1UWNXmp9WCgRpp abc12345
๐ฅ Fetching file abc12345...
โ
Downloaded 320MB in 12 seconds
๐พ Saved to: fetched_abc12345.dat
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ FAI Protocol Architecture โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ CLI Interface โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ Init โ โ Add โ โ Commit โ โ
โ โ Status โ โ Clone โ โ Push โ โ
โ โ Log โ โ Pull โ โ Fetch โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Core Library Layer โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ FaiProtocol โ โ
โ โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ โ Storage โ โ Database โ โ Network โโ โ
โ โ โ Manager โ โ Manager โ โ Manager โโ โ
โ โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Infrastructure Layer โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ libp2p P2P โ โ SQLite โ โ BLAKE3 โ โ
โ โ Networking โ โ Database โ โ Hashing โ โ
โ โ โ โ โ โ โ โ
โ โ โข mDNS โ โ โข Commits โ โ โข Integrity โ โ
โ โ โข TCP โ โ โข Metadata โ โ โข Dedup โ โ
โ โ โข Noise โ โ โข Staging โ โ โข Fast โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Storage & Networking โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ .fai/ โ โ P2P Networkโ โ Chunks โ โ
โ โ objects/ โ โ โ โ โ โ
โ โ db.sqlite โ โ โข Auto โ โ โข 1MB chunksโ โ
โ โ HEAD โ โ discovery โ โ โข Parallel โ โ
โ โ โ โ โข Direct โ โ transfer โ โ
โ โ โ โ connect โ โ โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Feature | Git | Git LFS | Dropbox | Perforce | FAI |
|---|---|---|---|---|---|
| Large files | โ | โ ๏ธ Limited | โ | โ | โ |
| Version control | โ | โ | โ | โ | โ |
| P2P distributed | โ | โ | โ | โ | โ |
| Offline-first | โ | โ | โ | โ ๏ธ | โ |
| No server costs | โ | โ | โ | โ | โ |
| Deduplication | โ | โ | โ ๏ธ | โ ๏ธ | โ |
| Cost | Research Free | $60+/yr | $120+/yr | $500+/yr | AGPL-3.0 |
Problem: 50GB asset library, 100 developers, Git LFS costs $2000/month
With FAI:
fai init
fai add assets/
fai commit -m "New texture pack"
fai serve # Other devs clone from you
Cost: $0/month
Speed: 10Gbps on LAN vs slow internet
Problem: 1TB raw footage, 5 editors, need version control
With FAI:
fai init
fai add footage/
fai commit -m "Day 1 raw footage"
fai serve # Editors pull from you
Benefits:
โ
Version control for every edit
โ
P2P sharing on local network
โ
No cloud upload/download
โ
Instant rollback to any version
Problem: Share 100GB dataset, bandwidth costs $$$ with popularity
With FAI:
fai init
fai add dataset/
fai commit -m "Dataset v1.0"
fai serve # Users seed to each other
Benefits:
โ
Users share with each other (BitTorrent effect)
โ
More users = faster for everyone
โ
Zero bandwidth costs
# Clone the repository
git clone https://github.com/kunci115/fai-protocol.git
cd fai-protocol
# Install dependencies
cargo build
# Run tests
cargo test
# Run with debug output
RUST_LOG=debug cargo run --bin fai -- <command>
# Format code
cargo fmt
# Lint code
cargo clippy -- -D warnings
# Generate documentation
cargo doc --open
fai-protocol/
โโโ src/
โ โโโ main.rs # CLI entry point and command handling
โ โโโ lib.rs # Core library interface
โ โโโ storage/ # Content-addressed storage and chunking
โ โโโ database/ # SQLite metadata management
โ โโโ network/ # libp2p peer-to-peer networking
โโโ tests/ # Integration and unit tests
โโโ docs/ # Documentation and examples
โโโ README.md # This file
We're building the future of distributed version control!
Areas needing help:
For Developers:
cargo testcargo fmt and cargo clippyCode Standards:
anyhowSee CONTRIBUTING.md for details.
This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.
Built with love for everyone tired of:
FAI Protocol builds upon amazing open-source projects:
๐ฎ Ready to decentralize your large file workflow?
Get Started โข Use Cases โข Documentation โข Contributing
FAI Protocol: Version control for the files Git forgot. ๐
Made with โค๏ธ by the FAI Protocol community - Rino(Kunci115)