Skip to content

HDemir23/SuigitVol2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

╔════════════════════════════════════════════════════════╗
β•‘                                                        β•‘
β•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—            β•‘
β•‘   β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β• β–ˆβ–ˆβ•‘β•šβ•β•β–ˆβ–ˆβ•”β•β•β•            β•‘
β•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘               β•‘
β•‘   β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘               β•‘
β•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘               β•‘
β•‘   β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•β•β• β•šβ•β• β•šβ•β•β•β•β•β• β•šβ•β•   β•šβ•β•               β•‘
β•‘                                                        β•‘
β•‘        Decentralized GitHub on Sui Blockchain          β•‘
β•‘                                                        β•‘
β•‘   🌿 Repositories β€’ πŸ” Privacy β€’ πŸš€ Decentralized       β•‘
β•‘                                                        β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

🌿 SuiGit - Decentralized GitHub on Sui Blockchain

Version Control Without Intermediaries. Pure Decentralization.

A fully decentralized GitHub alternative built on Sui blockchain with Walrus storage. No central servers. No account lockdowns. No platform dependencies. Just you, your code, and blockchain.

🎯 The Problem We Solve

Traditional GitHub SuiGit
❌ Centralized (GitHub owns it) βœ… Decentralized (You control it)
❌ Account can be locked/deleted βœ… Self-custody of projects
❌ Terms of Service dictate rules βœ… You own the rules
❌ Dependent on one company βœ… No single point of failure
❌ Files on centralized servers βœ… Files on decentralized Walrus
❌ Privacy concerns βœ… Complete privacy control

✨ Features

Core Functionality

  • Decentralized Repositories - Create and manage repos on Sui blockchain
  • Walrus Storage - Files stored in decentralized Walrus blob storage
  • Version Control - Commit history and file versioning
  • Branches - Create and delete branches for parallel development
  • Pull Requests - Create, merge, and close PRs for collaborative development
  • Incremental Commits - Smart file change detection and upload only changed files

Privacy & Security

  • Private by Default - All repositories are private by default
  • Fine-grained Access Control - Owner, collaborators, and custom access lists
  • Grant/Revoke Access - Control who can access private repositories
  • Public Option - Make repositories public when needed

Developer Experience

  • Interactive CLI Menu - User-friendly menu when running without arguments
  • Command Aliases - Short aliases for common commands (ls, push, get, branches, prs)
  • Input Validation - Proper Sui object ID and parameter validation
  • Colored Output - Clear status messages and progress indicators
  • Bulk Upload - Upload entire folders with parallel processing
  • .gitignore Support - Standard .gitignore format for excluding files
  • Browse Interactively - Browse repos and files with guided navigation
  • Event-Driven - Real-time updates via Sui events (no indexer needed)

πŸ“¦ Installation

Prerequisites

  • Node.js 18+
  • Sui CLI installed and configured (with an active address in ~/.sui/sui_config/)
  • Walrus CLI installed

Option 1: Global NPM Installation (Recommended)

Install SuiGit globally from npm:

npm install -g suigit

image Then use from anywhere:

suigit create-repo
suigit list
suigit upload

Option 2: Local Development Installation

For development or local testing:

# Clone and install dependencies
npm install

# Build the project
npm run build

# Test locally with npm link
npm link

# Now you can use 'suigit' command from anywhere
suigit create-repo

Configuration

The tool automatically uses your Sui CLI active address from ~/.sui/sui_config/client.yaml. No additional configuration needed!

Optional: Override with environment variables in frontend/.env:

SUI_NETWORK=testnet
PACKAGE_ID=0x81bebbbd57841a44faae752ca6998c0c2b00b6a55501ee60e60896fa1d76e6bb
WALRUS_PUBLISHER=https://publisher.walrus-testnet.sui.io
MAX_FILE_SIZE_MB=10
UPLOAD_RATE_LIMIT_PER_HOUR=50

# Optional: Override Sui CLI wallet (use only if needed)
PRIVATE_KEY=suiprivkey1...

πŸš€ Quick Start

Interactive Mode (Recommended - Easiest)

suigit
# Presents an interactive menu with all available operations

Command Mode (for Scripting)

image

# Create a repository
suigit create-repo

image

# Upload files
suigit upload

image

# Create a branch
suigit create-branch

image

# Create and merge a pull request
suigit create-pr
suigit merge-pr
### Using Aliases (Shortcuts)

```bash
suigit ls              # List repositories
suigit push            # Upload files
suigit get             # Download files
suigit branches        # Branch management
suigit prs             # Pull request operations

For Local Development

If using npm link instead of global installation:

npm run cli                    # Interactive menu
npm run cli create-repo        # Create repo
npm run cli ls                 # List repos

πŸ“‹ Complete Command Guide

🎬 Live Demo / Presentation Commands

Show what it can do:

suigit                      # Shows interactive menu with all options
suigit list                 # Lists all your decentralized repos
suigit show <repo-id>       # Shows repo details, files, commits
suigit browse               # Browse repos and files interactively

πŸ“ Repository Management

Command Alias What It Does GitHub Comparison
create-repo - Create blockchain repo Creates on-chain (immutable), private by default, no GitHub needed
list ls List your repos Shows blockchain repos, not GitHub servers
browse - Interactive browser Browse on-chain repos with full details
show <id> - View repo details Shows blockchain data: files, commits, branches on-chain

πŸ“€ File Operations (Walrus Storage)

Command Alias What It Does Difference from GitHub
upload push Upload files to repo Files β†’ Walrus (decentralized), blob ID β†’ blockchain
download get Download files Retrieves from Walrus using blockchain blob IDs

πŸ“ Commits & Tracking

Command What It Does Why Different
commit Create manual commit Recorded on blockchain (immutable)
commit-incremental Smart commit with auto-detect Only uploads changed files (cost efficient)

🌿 Branch Management

Command Alias What It Does Like Git But...
create-branch branches Create development branches On blockchain (decentralized)
delete-branch - Delete a branch Immutable record of all branches

πŸ”€ Pull Requests

Command Alias What It Does Key Difference
create-pr prs Propose code changes Recorded on blockchain forever
merge-pr - Merge approved PR On-chain transaction, provable proof
close-pr - Close without merge Immutable record of decision

πŸ” Privacy & Access Control (Unique Feature!)

Command What It Does Why Special
set-public Make repo public Anyone can view/download (no GitHub account needed)
set-private Make repo private Only you and allowed wallets
grant-access Give wallet permission Grant Sui wallet addresses (no email invites)
revoke-access Remove wallet permission Instant revocation (no GitHub management)

πŸ” Repository Privacy Model

Default Behavior

  • All repositories are created as PRIVATE
  • Only the owner can initially access them
  • Use set-public to make accessible to everyone

Private Repository Access Control

  1. Owner - Full access to all operations
  2. Collaborators - Can create branches and pull requests (if added)
  3. Granted Access - Custom users added via grant-access
  4. Public - Anyone can read/download (when set-public)

Permission Matrix

Operation Owner Collaborators Public
View/Download βœ… βœ… βœ…
Upload Files βœ… βœ… (if private) βœ…
Create Branch βœ… βœ… (if private) ❌
Create PR βœ… βœ… (if private) ❌
Merge PR βœ… ❌ ❌
Delete Branch βœ… ❌ ❌
Set Privacy βœ… ❌ ❌
Grant Access βœ… ❌ ❌

πŸ“ Using .gitignore

Create a .gitignore file in your project root to exclude files from uploads:

# Dependencies
node_modules/
.venv/

# Build outputs
dist/
build/

# Environment
.env
.env.local

# Logs
*.log
logs/

# IDE
.vscode/
.idea/

# OS
.DS_Store
Thumbs.db

# Negation example - upload despite being a log
!important.log

See .gitignore.example for more patterns.

πŸ’‘ Example Workflows

Creating Your First Repository

suigit
β†’ Select "Create a new repository"
β†’ Enter name: "my-project"
β†’ Enter description: "My awesome project"
β†’ Note: Repository ID shown (save this!)

Collaborative Development

# 1. Create repository (private by default)
suigit create-repo

# 2. Create branches
suigit create-branch
β†’ Branch: main, Commit: initial
suigit create-branch
β†’ Branch: develop, Commit: initial

# 3. Create PR
suigit create-pr
β†’ Title: "Add feature X"
β†’ Source: develop, Target: main

# 4. Merge PR (as owner)
suigit merge-pr
β†’ PR ID: 0

# 5. Make public (optional)
suigit set-public

Uploading With .gitignore

# Create .gitignore in project
echo "*.log" > .gitignore
echo "node_modules/" >> .gitignore

# Upload - will skip ignored files
suigit upload
β†’ 25 files found, 3 skipped by .gitignore
β†’ Uploading 22 files...

πŸ”„ GitHub vs SuiGit - Side by Side

How Workflows Compare

Traditional GitHub:

1. Create account on github.com
2. GitHub controls your account & repos
3. Files stored on GitHub servers
4. GitHub could delete your account anytime
5. You depend on GitHub's infrastructure

SuiGit:

1. Use your existing Sui CLI wallet
2. You control everything (self-custody)
3. Files stored on Walrus (decentralized)
4. Immutable blockchain record
5. No dependency on any company

Key Differences Table

Aspect GitHub SuiGit
Control GitHub owns your repos You own your repos
Account Email-based GitHub account Sui wallet (crypto-native)
Storage GitHub servers (centralized) Walrus + Sui (decentralized)
Privacy Terms of Service controlled You control everything
Account Lock Can be suspended/deleted Immutable blockchain record
Cost Model Free tier + paid plans Gas costs on blockchain
Immutability Can delete repos/history Permanent blockchain record
Permissions Email invites Direct wallet addresses
Collaboration Through GitHub UI Through wallet addresses

πŸ’Ό Use Cases

🎯 For Individual Developers

  • True Ownership - Your code is yours forever
  • No Platform Lock-in - Leave anytime without losing history
  • Privacy First - Private repos are completely private
  • Self-Sovereignty - No company can delete your account

πŸ‘₯ For Teams

  • Decentralized Teams - Work without company infrastructure
  • Transparent History - Immutable record of all changes
  • Wallet-Based Access - Grant/revoke with wallet addresses
  • Open Source Friendly - Easy to make public without intermediary

🏒 For Organizations

  • Self-Hosted Governance - No third-party policy changes
  • Immutable Audit Trail - Full history on blockchain
  • Regulatory Compliance - Permanent, auditable records
  • Data Sovereignty - Control where your data is stored

🌍 For Web3 Projects

  • Native Blockchain - Integrated with Sui ecosystem
  • Smart Contracts - Store code alongside contracts
  • Decentralized DAO - Version control for DAO code
  • Transparent Governance - Public repo for community projects

⚑ Why Choose SuiGit?

βœ… No Intermediary - You control your code βœ… Permanent History - Blockchain immutability βœ… True Decentralization - No company can delete your repos βœ… Wallet Native - Works with your crypto wallet βœ… Cost Efficient - Walrus storage is optimized βœ… Future Proof - Decentralized = future-ready βœ… True Privacy - You decide who sees what βœ… Web3 Ready - Built for blockchain world

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  CLI User   β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Interactive     │◄───────►│  Repository Serviceβ”‚
β”‚  Menu & Commands β”‚         β”‚ (Blockchain Calls) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                      β”‚
                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                β–Ό                     β–Ό                  β–Ό
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚ Sui Blockchain   β”‚      β”‚ Walrus Storage   β”‚  β”‚ Local Files β”‚
         β”‚ (Metadata)       β”‚      β”‚ (File Content)   β”‚  β”‚ (.gitignore) β”‚
         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“– For Developers

Project Structure

SuigitVol2/
β”œβ”€β”€ contracts/sui_git/        # Move smart contracts
β”‚   └── sources/sui_git.move  # Main contract logic
β”œβ”€β”€ frontend/                 # TypeScript CLI
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ cli.ts           # CLI commands and menu
β”‚   β”‚   β”œβ”€β”€ repository.ts    # Blockchain interactions
β”‚   β”‚   β”œβ”€β”€ walrus.ts        # Walrus storage integration
β”‚   β”‚   β”œβ”€β”€ config.ts        # Configuration manager
β”‚   β”‚   └── gitsuiignore.ts  # .gitignore pattern matching
β”‚   └── dist/                # Compiled JavaScript
└── README.md                # This file

Build and Development

# Install dependencies
npm install

# Build TypeScript
npm run build

# Run CLI with TypeScript (dev mode)
npm run cli:dev create-repo

# Run compiled CLI (production)
npm run cli create-repo

βš™οΈ Configuration

Create or edit .env file in frontend/ directory:

# Sui Network
SUI_NETWORK=testnet

# Smart Contract Package ID (from deployment)
PACKAGE_ID=0x...

# Walrus Publisher URL
WALRUS_PUBLISHER=https://publisher.walrus-testnet.sui.io

# Private Key (optional - will use temporary keypair if not provided)
PRIVATE_KEY=suiprivkey1...

# Upload limits
MAX_FILE_SIZE_MB=10
UPLOAD_RATE_LIMIT_PER_HOUR=50

πŸ”— Smart Contract

The Move smart contract supports:

  • Repository creation with owner tracking
  • File upload with Walrus blob ID storage
  • Commit history tracking
  • Branch management (create/delete)
  • Pull request system (create/merge/close)
  • Privacy control (private/public/access lists)
  • Event emission for real-time updates

Deployed Package ID: Update in config.ts after deployment

πŸ§ͺ Testing

Test the interactive menu:

npm run cli
# Choose options from the menu to test all features

Test specific commands:

npm run cli create-repo
npm run cli list
npm run cli show <repo-id>

πŸ“ License

This project is part of the SuiGit decentralized version control system.

🀝 Contributing

Contributions welcome! Areas for enhancement:

  • Web UI/frontend
  • Additional storage providers beyond Walrus
  • Advance diff/merge capabilities
  • Repository templates
  • CI/CD integration hooks

╔════════════════════════════════════════════════════════╗
β•‘                                                        β•‘
β•‘              Thank you for exploring SuiGit!           β•‘
β•‘                                                        β•‘
β•‘    Decentralized GitHub on Sui Blockchain             β•‘
β•‘    🌿 Repositories β€’ πŸ” Privacy β€’ πŸš€ Decentralized    β•‘
β•‘                                                        β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

Made with ❀️ for decentralized collaboration on Sui

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors