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 🙏

© 2026 – Pkg Stats / Ryan Hefner

craftvault

v1.4.0

Published

A local-first, high-performance Version Control System with content-addressable storage, web UI, and Git-like workflow

Readme

🛠️ CraftVault

A local-first, high-performance Version Control System with Git-like workflow and beautiful web UI

Built from scratch with content-addressable storage, real-time updates, and zero configuration needed.

Tests TypeScript React License


✨ Features

  • 🚀 Git-like Commands - Familiar workflow: init, add, commit, log, diff, branch
  • 🎨 Beautiful Web UI - Modern React interface with real-time updates
  • 📦 Content-Addressable Storage - Efficient deduplication using SHA-1 hashing
  • ⚡ Real-Time Updates - WebSocket-powered live status and commit tracking
  • 🔍 Smart Diff Engine - Myers algorithm for accurate file comparisons
  • 📁 .cvignore Support - Gitignore-style pattern matching
  • 🌳 Branch Management - Create and switch between branches
  • 🔌 REST API - Complete HTTP API for integrations
  • 🎯 Zero Configuration - Works out of the box

🚀 Quick Start

Installation (Choose One)

Option 1: Global Install (Recommended)

npm install -g craftvault

Option 2: Use with npx (No Installation)

npx craftvault init

Option 3: Local Project

npm install craftvault
npx cv init

60-Second Demo

# 1. Create a project and initialize
mkdir my-project && cd my-project
cv init

# 2. Create some files
echo "console.log('Hello');" > app.js
echo "body { margin: 0; }" > style.css

# 3. Track and commit
cv add .
cv commit -m "Initial commit"

# 4. Launch the UI
cv ui

That's it! Your browser will open automatically at http://localhost:3000 showing your commits and changes.


📖 Basic Commands

cv init                          # Initialize repository
cv status                        # Show file status
cv add <files...>               # Stage files
cv commit -m "message"          # Create commit
cv log [--oneline]              # View history
cv diff <file>                  # Show changes
cv branch [name]                # Manage branches
cv ui                           # Launch web interface 🌐

🌐 Web UI

Run cv ui to launch the interface:

  • 📊 Visual commit history with timestamps
  • 📝 Color-coded file diffs (added/removed/modified)
  • ✅ Staged vs unstaged files with one-click actions
  • 🔄 Real-time auto-updates as you make changes
  • 🎨 GitHub-like interface that's familiar and intuitive

How it works:

  • Backend server runs on port 3000 (configurable)
  • Browser opens automatically
  • WebSocket keeps everything in sync
  • Press Ctrl+C to stop

📂 .cvignore

Automatically created on cv init with sensible defaults:

# .cvignore (uses gitignore syntax)
node_modules/
dist/
*.log
.env

Works exactly like .gitignore - add patterns to exclude files from tracking.


🔄 Complete Workflow Example

# Initialize in your project
cd ~/my-awesome-app
cv init

# Make some changes
echo "const app = 'Hello';" > app.js
mkdir src
echo "export const utils = {};" > src/utils.js

# Check status
cv status

# Stage specific files
cv add app.js src/utils.js

# Or stage everything
cv add .

# Create commit
cv commit -m "Add initial structure"

# View history
cv log
cv log --oneline

# Make more changes
echo "// Updated" >> app.js

# See what changed
cv diff app.js

# Launch UI to visualize everything
cv ui

🆚 CraftVault vs Git

| Feature | CraftVault | Git | |---------|-----------|-----| | Initialization | cv init | git init | | Stage Files | cv add . | git add . | | Commit | cv commit -m "msg" | git commit -m "msg" | | View History | cv log | git log | | See Changes | cv diff file | git diff file | | Web UI | cv ui ✨ Built-in | Requires external tools | | Real-time Updates | ✅ WebSocket | ❌ Not available | | Learning Curve | 🟢 Minimal | 🟡 Moderate | | Remote Push/Pull | 🟡 Coming soon | ✅ Yes |


🏗️ Architecture

CraftVault uses a content-addressable storage model similar to Git:

  • Blobs - Store file contents
  • Trees - Store directory structure
  • Commits - Store snapshots with metadata
  • Refs - Store branch pointers

Storage:

.cv/
├── objects/          # All Git objects (blobs, trees, commits)
│   └── ab/          # First 2 chars of SHA-1
│       └── cdef...  # Remaining 38 chars
├── refs/
│   └── heads/       # Branch references
│       └── main
├── HEAD             # Current branch pointer
└── index            # Staging area

📚 Documentation

Quick Guides

Comprehensive Docs


🧪 Testing

# Run integration tests
node test-integration.js

# Results: 146+ tests, 100% pass rate

Test coverage:

  • Repository initialization
  • File tracking and staging
  • Commit creation and history
  • Branch management
  • Diff computation
  • CLI commands
  • API endpoints

🛠️ Development

Build from Source

# Clone the repository
git clone <repository-url>
cd craftvault

# Install dependencies
npm install

# Build TypeScript
npm run build

# Build UI
cd ui && npm install && npm run build && cd ..

# Link globally for development
npm link

# Now use cv from anywhere
cv --version

Project Structure

craftvault/
├── src/
│   ├── core/              # Core VCS functionality
│   │   ├── blob.ts        # File content storage
│   │   ├── tree.ts        # Directory structure
│   │   ├── commit.ts      # Commit objects
│   │   ├── repository.ts  # Repo management
│   │   ├── storage.ts     # Object storage
│   │   ├── diff-engine.ts # Myers diff algorithm
│   │   └── ...
│   ├── cli/               # Command-line interface
│   │   └── commands/      # Individual commands
│   ├── api/               # REST API + WebSocket
│   │   └── server.ts      # Hono server
│   └── utils/             # Hash, compression, diff, ignore
├── ui/                    # React web interface
│   └── src/
│       ├── components/    # UI components
│       └── App.jsx        # Main application
├── dist/                  # Compiled TypeScript
└── docs/                  # Documentation

🤝 Contributing

Contributions are welcome! Please read CONTRIBUTING.md for guidelines.

Ways to contribute:

  • 🐛 Report bugs
  • 💡 Suggest features
  • 📝 Improve documentation
  • 🔧 Submit pull requests

📄 License

MIT License - see LICENSE for details.


🎓 Learning Resources

For Users

  • Start with SIMPLE_INSTALL.md
  • Try the 60-second demo above
  • Run cv --help for command list
  • Launch cv ui to explore visually

For Developers


🌟 Highlights

What makes CraftVault special:

  1. Complete Implementation - Not a toy project. Fully functional VCS with 15,000+ lines of TypeScript
  2. Modern Stack - TypeScript, React 18, Hono v4, WebSocket
  3. Production-Ready - Comprehensive testing, error handling, documentation
  4. Educational - Clear code, detailed architecture docs, great for learning
  5. User-Friendly - Beautiful UI, sensible defaults, zero configuration

🚀 What's Next?

Planned Features:

  • Remote repository support (push/pull)
  • Merge conflict resolution UI
  • Performance optimizations for large repos
  • Plugin system
  • VS Code extension

💬 Support


Built with ❤️ by the CraftVault team

Making version control simple, visual, and delightful