npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

bvc-eth

v1.2.8

Published

Blockchain Version Control - Decentralized version control system powered by blockchain and IPFS

Readme

🔗 Blockchain Version Control (BVC)

A decentralized version control system inspired by Git, but powered by blockchain and IPFS. Features cost-optimized local commits with efficient blockchain checkpoints.

npm version License: MIT

📦 NPM Package Users: After installing via npm, BVC works out-of-the-box with Sepolia testnet! Just run bvc config --setup to get started. No local blockchain deployment needed.

✨ Features

  • 🚀 Decentralized: No central server required
  • ⛓️ Blockchain-powered: Immutable commit history on Ethereum
  • 🌐 IPFS storage: Decentralized file storage
  • 💰 Cost Optimized: Local commits (free) + blockchain checkpoints (efficient)
  • 🔐 Cryptographically secure: SHA256 file hashing
  • 💻 Git-like CLI: Familiar commands and workflows
  • 🌍 Multi-network: Supports Sepolia testnet, local dev, and mainnet
  • ↩️ Version Revert: Revert to any previous commit state

📦 Installation

Global Installation (Recommended)

npm install -g bvc-eth
bvc config --setup  # Quick setup wizard

Local Installation

npm install bvc-eth
npx bvc config --setup  # Quick setup wizard

For Development

git clone https://github.com/Lviffy/BVC.git
cd BVC
npm install
npm link  # or use: node bin/bvc.js

🚀 Quick Start

1. Configure BVC

# Global installation
bvc config --setup

# Local installation  
npx bvc config --setup

What you'll need:

  • Ethereum wallet private key (create a new one for testing!)
  • Network choice (Sepolia testnet recommended for beginners)
  • Test ETH from Sepolia Faucet (free!)

2. Create a Repository

bvc init my-project
cd my-project

3. Add Files and Commit

bvc add README.md
bvc commit -m "Initial commit"

4. Push to Blockchain

bvc push

5. Version Control (Optional)

bvc log                          # View commit history
bvc revert <commit-hash>         # Revert to any previous version

💰 Cost Optimization

BVC is designed for cost efficiency:

Local Commits (Free)

bvc add file.js
bvc commit -m "Add feature"  # No gas fees!

Blockchain Checkpoints (Efficient)

bvc checkpoint --message "Batch multiple commits"  # Single transaction

Benefits:

  • ✅ Unlimited local commits (0 gas fees)
  • ✅ Batch commits into single blockchain transaction
  • ✅ 50-90% gas savings vs individual commits
  • ✅ Full Git-like workflow

📋 Complete Command Reference

Repository Management

bvc init [name] - Create repository (blockchain required)

bvc init my-project              # Create blockchain repository
bvc init --local-only my-repo    # Create local repository only
bvc init --interactive           # Interactive setup
bvc init --upgrade-blockchain    # Upgrade local repo to blockchain

bvc config - Configuration management

bvc config --setup               # Interactive setup
bvc config --private-key <key>   # Set wallet private key
bvc config --rpc-url <url>       # Set blockchain RPC
bvc config --ipfs-endpoint <url> # Set IPFS endpoint
bvc config --show                # Show current config

bvc clone <repo-id> - Clone repository

bvc clone 12345abc...            # Clone by repository ID

bvc status - Show repository status

bvc status                       # Show staged/untracked files

File Operations

bvc add <files> - Stage files

bvc add file.js                  # Add single file
bvc add .                        # Add all files
bvc add *.js                     # Add with glob patterns

bvc commit -m "message" - Create commit

bvc commit -m "Add feature"       # Local commit (free)
bvc commit --blockchain -m "msg"  # Direct blockchain commit

bvc revert <commit-hash> - Revert to specific commit

bvc revert 436b0deb               # Revert to specific commit
bvc revert abc123 --force         # Force revert (overwrite changes)
bvc revert def456 --no-backup     # Skip backup creation

Synchronization

bvc push - Push commits to blockchain

bvc push                         # Push individual commits

bvc checkpoint - Batch commits efficiently

bvc checkpoint --message "Batch" # Batch multiple commits
bvc checkpoint --dry-run         # Preview cost savings

bvc pull - Pull latest changes

bvc pull                         # Fetch from blockchain/IPFS

bvc log - View commit history

bvc log                          # Show commit history
bvc log --checkpoints            # Show checkpoint history

Advanced Features

bvc list - List repositories

bvc list                         # Show all repositories

🔧 Configuration

BVC requires blockchain and IPFS configuration:

Required Settings

  • Private Key: Your Ethereum wallet private key
  • RPC URL: Blockchain network endpoint (Sepolia/Mainnet)
  • IPFS Endpoint: IPFS node for file storage

Setup Process

bvc config --setup

This will prompt for:

  1. Wallet private key (keep secure!)
  2. Blockchain RPC URL
  3. IPFS endpoint URL

💡 Usage Examples

Basic Workflow

# Setup
bvc config --setup

# Create repository
bvc init my-app
cd my-app

# Development (free local commits)
echo "console.log('Hello');" > app.js
bvc add app.js
bvc commit -m "Add basic app"

echo "console.log('Hello World');" > app.js
bvc add app.js
bvc commit -m "Improve greeting"

# Efficient blockchain sync
bvc checkpoint --message "Initial app development"

Cost Comparison

# Traditional approach (expensive)
bvc commit --blockchain -m "commit 1"  # Gas fee #1
bvc commit --blockchain -m "commit 2"  # Gas fee #2
bvc commit --blockchain -m "commit 3"  # Gas fee #3

# BVC approach (efficient)
bvc commit -m "commit 1"               # Free
bvc commit -m "commit 2"               # Free
bvc commit -m "commit 3"               # Free
bvc checkpoint --message "All commits" # Gas fee #1 only

Version Control with Revert

# View commit history
bvc log

# Revert to previous version
bvc revert 436b0deb               # Revert to specific commit
bvc status                        # Check restored files

# Continue development
bvc add . && bvc commit -m "Fix after revert"

🏗️ Architecture

Repository Structure

my-project/
├── .bvc/
│   ├── config.json      # Repository configuration
│   ├── commits.json     # Local commit history
│   ├── staging.json     # Staged files
│   └── user-config.json # User blockchain config
├── .bvcignore          # Ignore patterns
└── README.md           # Project files

Data Flow

  1. Local Commits: Files hashed and stored locally
  2. IPFS Upload: File contents uploaded to IPFS on checkpoint
  3. Blockchain Anchor: Commit metadata anchored on Ethereum
  4. Merkle Proofs: Cryptographic integrity verification

🔧 Troubleshooting

Common Issues

"Blockchain configuration required"

# Solution: Configure blockchain first
bvc config --setup

"IPFS node not available"

# Install IPFS
# Option 1: Use public gateway
bvc config --ipfs-endpoint https://ipfs.infura.io:5001

# Option 2: Run local IPFS node
ipfs daemon

"Repository does not exist"

  • Ensure repository was created with bvc init
  • Check repository ID with bvc status

Network Requirements

  • Sepolia Testnet: For testing (recommended)
  • Ethereum Mainnet: For production use
  • IPFS: For decentralized file storage

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

📄 License

MIT License - see LICENSE file for details.

� Documentation

🚀 Getting Started

💰 Cost Optimization

  • Cost Optimization Guide - Save 50-90% on gas fees
  • Key Features:
    • ✅ Local commits (free)
    • ✅ Blockchain checkpoints (efficient batching)
    • ✅ IPFS integration

📋 Commands & Reference

🔧 Setup & Configuration

🔗 Links

echo "console.log('Hello BVC!');" > index.js
bvc-eth add index.js
bvc-eth commit -m "Initial commit"

4. Push to Blockchain

bvc-eth push

5. View History

bvc-eth log

6. Collaborate

# Share your repository ID with others
bvc-eth list --mine

# Others can clone your repository
bvc-eth clone <your-repo-id>

# Pull latest changes
bvc-eth pull

📋 Commands

| Command | Description | Status | |---------|-------------|---------| | bvc-eth init [name] | Create new repository | ✅ Working | | bvc-eth config | Configure wallet/blockchain | ✅ Working | | bvc-eth add <files> | Stage files for commit | ✅ Working | | bvc-eth commit -m "msg" | Create commit with IPFS upload | ✅ Working | | bvc-eth status | Show repository status | ✅ Working | | bvc-eth log | View commit history | ✅ Working | | bvc-eth push | Push commits to blockchain | ✅ Working | | bvc-eth pull | Pull commits from blockchain | ✅ Working | | bvc-eth clone <id> | Clone repository from blockchain | ✅ Working | | bvc-eth checkpoint | Create commit batches | ✅ Working | | bvc-eth list | List all repositories | ✅ Working |

⚙️ Configuration

BVC requires configuration for blockchain and IPFS integration:

bvc config --setup

Required settings:

  • Private Key: Your wallet private key
  • RPC URL: Blockchain RPC endpoint (Sepolia, Mainnet, etc.)
  • IPFS Endpoint: IPFS node URL

🏗️ Architecture

┌─────────────────┐    ┌──────────────────┐    ┌─────────────────┐
│   BVC CLI       │───▶│  Smart Contract  │───▶│   Blockchain    │
│   (Commander)   │    │   (Solidity)     │    │   (Ethereum)    │
└─────────────────┘    └──────────────────┘    └─────────────────┘
         │                       │                       │
         ▼                       ▼                       ▼
┌─────────────────┐    ┌──────────────────┐    ┌─────────────────┐
│  Local Storage  │    │  File Hashing    │    │      IPFS       │
│   (.bvc/)       │    │   (SHA256)       │    │  (Distributed)  │
└─────────────────┘    └──────────────────┘    └─────────────────┘

🧪 Testing

npm test

📜 License

MIT © Lviffy

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📞 Support


⚠️ Note: This is an early-stage project. Use at your own risk and test thoroughly before production use.