WalGit is a decentralized, user-controlled version control system built on Sui blockchain and Walrus's distributed storage technology. It empowers developers to maintain full sovereignty over their code while enjoying the benefits of cloud-based collaboration.
WalGit provides a comprehensive set of commands for version control:
walgit init [--encryption]- Initialize a new repository (optionally with encryption)walgit add <files>- Stage files for commitwalgit commit -m <message>- Create a new commitwalgit push- Push commits to remotewalgit pull- Pull changes from remotewalgit clone <repo>- Clone a repositorywalgit status- Show repository statuswalgit log- Show commit history
walgit encryption enable- Enable encryption for repositorywalgit encryption disable- Disable encryptionwalgit encryption share <user>- Share access with a userwalgit encryption revoke <user>- Revoke user accesswalgit encryption list-access- List users with accesswalgit encryption rotate-keys- Rotate encryption keys
walgit tusky config- Configure Tusky storagewalgit tusky use- Use Tusky as primary storagewalgit tusky status- Check storage usage and quotawalgit tusky migrate- Migrate existing blobs to Tuskywalgit tusky fallback- Set fallback storage provider
- Content-addressable storage with SHA-256 hashing
- Immutable blob ID references
- Gas-optimized transactions with batching
- BlobIdRegistry for efficient blob management
- RedStuff erasure coding (3/7 configuration)
- Chunked uploads for large files (up to 14GB)
- Parallel operations for better performance
- Automatic retry with exponential backoff
- Threshold encryption (customizable, e.g., 2-of-3)
- End-to-end encryption for private repositories
- Key share management for team collaboration
- Automatic key rotation support
- Free tier: 5GB personal / 50GB WalGit shared
- Automatic fallback to Walrus when quota exceeded
- Seamless migration between storage providers
- Cost-effective storage for open source projects
To run the tests for the WalGit CLI:
cd walgit-backend
npm install
npm testThe test suite uses Jest and includes mocks for Sui and Walrus integration to ensure all CLI commands work properly without requiring actual blockchain interaction.
You can test the basic local commit and push functionality without connecting to the network by using a simulated Git repository structure.
-
Create a test directory and initialize a local WalGit repository:
mkdir -p test-repo/.walgit cd test-repo -
Create some files and directories within
test-repo:echo "This is the first file." > file1.txt mkdir src echo "console.log('Hello, WalGit!');" > src/main.js
-
Run the local WalGit commit command from within the
test-repodirectory usingnpx:npx walgit commit -m "Initial local commit"This will create a simplified Git object structure (commit, tree, and blob files) within the
.walgitdirectory. -
Run the local WalGit push command from within the
test-repodirectory usingnpx:npx walgit push
This will simulate a push operation and confirm the latest local commit.
"Developers should not have to choose between the convenience of cloud-hosted version control and the sovereignty of their own code."
The increasing centralization of code hosting platforms like GitHubโnow under Microsoft's controlโraises concerns about:
- Data privacy
- Code ownership
- Unauthorized use of open source contributions to train proprietary AI models
WalGit addresses these challenges by leveraging Walrus's decentralized storage capabilities to provide a self-hosted, git-like version control system. With WalGit, developers own their repositories and manage their storage through a decentralized cloud, ensuring both autonomy and security.
WalGit utilizes Walrus's distributed cloud storage with RedStuff erasure coding, allowing users to host their code on infrastructure they control, rather than relying on a single centralized provider. Large files up to 14GB are supported with chunked uploads.
Users retain full ownership of their repositories, including how and where their data is stored and who can access it. Integration with Sui blockchain ensures content-addressable storage with immutable references.
WalGit is fully open source, ensuring transparency and community-driven development. Anyone can audit, contribute to, or deploy the platform.
Code is protected using Seal's threshold encryption and native wallet-based encryption, providing robust security for sensitive projects and intellectual property. Supports customizable encryption thresholds (e.g., 2-of-3 shares) for team collaboration.
By leveraging Walrus's cost-effective storage and integrating with Tusky's free tier (5GB personal, 50GB WalGit shared), WalGit offers a scalable solution for individuals and teams without the high costs of traditional cloud services.
WalGit maintains a workflow and interface similar to GitHub, making it easy for developers to transition without sacrificing usability or productivity. Uses 'walgit' command prefix for all operations.
WalGit offers a fully customizable interface with theme switching (light/dark mode and accent colors), guided tours, and an intuitive onboarding process for new users.
Features parallel operations, batch processing, automatic retries, and storage provider fallback mechanisms for optimal performance and reliability.
- Frontend: React with TypeScript
- Styling: Tailwind CSS with shadcn/ui components
- Blockchain: Sui Network
- Storage:
- Walrus Decentralized Storage (primary)
- Tusky Storage (free tier option)
- Encryption: Seal Network (threshold encryption)
- Build Tool: Next.js
- Key Dependencies:
- @mysten/dapp-kit: Sui dApp development kit
- @mysten/sui.js: Sui blockchain interaction
- Next.js: Routing and rendering framework
- TanStack Query: Data fetching and caching
- next-themes: Theme management system
- Lucide React: Icon library for the UI
- axios: HTTP client for API integrations
- form-data: File upload support
- crypto-js: Cryptographic utilities
- walgit-frontend/: React-based frontend interface
src/: Source codeapp/: Next.js application routescomponents/: React componentsui/: UI components including theme-switcher, notification-system, and guided-touronboarding/: Onboarding flow componentsrepository/: Repository-specific components including wizard
hooks/: Custom React hooksservices/: Service layer for API interactions
public/: Static assets.next/: Production build output
- walrus-sites/: Integration with Walrus Sites for storage
- .github/workflows/: CI/CD automation
deploy.yml: GitHub Pages deployment
- move/: Sui Move contracts
- Node.js v18+
- Sui wallet (Sui Wallet, Ethos Wallet, or other compatible wallets)
- Access to Walrus storage
- Git
# Clone the repository and submodules
git clone https://github.com/Angleito/walgit.git --recursive
cd walgit
# Install root dependencies
npm install
# Install frontend dependencies
cd walgit-frontend
npm install
# Start the development server
npm run devCreate a .env.local file in the walgit-frontend directory:
NEXT_PUBLIC_NETWORK=devnet # or testnet/mainnet
NEXT_PUBLIC_WALRUS_API_KEY=your_api_key
NEXT_PUBLIC_SEAL_API_KEY=your_seal_api_key
NEXT_PUBLIC_TUSKY_API_KEY=your_tusky_api_keyConfigure the WalGit CLI:
# Configure Sui network
walgit config sui-network devnet
walgit config sui-rpc https://fullnode.devnet.sui.io:443
# Configure storage providers
walgit config walrus-api-key <your-walrus-key>
walgit config seal-api-key <your-seal-key>
walgit config tusky-api-key <your-tusky-key>
# Optional: Enable Tusky as primary storage
walgit tusky useThe project is automatically deployed to GitHub Pages using GitHub Actions whenever changes are pushed to the main branch. The deployment process includes:
- Building the frontend application
- Deploying to GitHub Pages
- Generating Walrus Sites provenance data
Visit: https://angleito.github.io/walgit/
npm run dev: Start development servernpm run build: Build for productionnpm run start: Start the production servernpm run lint: Run ESLint on the codebase
- Next.js configuration is in
next.config.jsusing JSDoc for TypeScript type checking - Do not use
next.config.tsas it is not supported by Next.js - Access the frontend at http://localhost:3000 when running the dev server
- TypeScript for type safety
- ESLint for code linting
- Prettier for code formatting
- Theme System: Light/dark mode with customizable accent colors
- Notification System: Centralized notification management with different types (info, success, error, warning)
- Guided Tours: Interactive step-by-step guides for onboarding new users
- Onboarding Flow: Multi-step onboarding process for new users
- Repository Wizard: Step-by-step process for creating new repositories
We welcome contributions to WalGit! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built on Sui blockchain
- Utilizes Walrus decentralized storage technology
- Integrates with Walrus Sites for provenance and verification
- Inspired by the need for developer sovereignty in the age of AI and centralized control