luffy-vcs-cli
v1.0.0
Published
A simple version control CLI
Readme
🌳 Luffy VCS CLI
A powerful, Git-like version control system with tree-based file management, built for developers who want professional VCS capabilities with an intuitive command-line interface.
🚀 Features
Professional Version Control
- Tree-based Architecture: Efficiently manages complex directory structures
- Content Deduplication: Stores only unique file content, saving space
- Professional Diffs: Color-coded, categorized change visualization
- Time Travel: Checkout any previous commit to restore project state
- Status Tracking: Real-time working directory status monitoring
Git-like Commands
- Familiar Interface: Commands similar to Git for easy adoption
- Rich Output: Beautiful, color-coded terminal output
- Scalable: Handles projects with thousands of files efficiently
- Cross-platform: Works on Windows, macOS, and Linux
Advanced Features
- Tree Structure: Hierarchical file organization like Git
- Smart Staging: Intelligent file staging with
luffy add . - History Navigation: Browse complete project history
- Server Integration: Push/pull to remote repositories
- Backward Compatible: Works with existing repositories
📦 Installation
Global Installation (Recommended)
npm install -g luffy-vcs-cliLocal Installation
npm install luffy-vcs-cli
npx luffy <command>🎯 Quick Start
# Initialize a new repository
luffy init
# Add all files to staging
luffy add .
# Commit your changes
luffy commit "Initial commit"
# Check repository status
luffy status
# View commit history
luffy log
# See changes in a commit
luffy show <commit-hash>
# Checkout a previous commit
luffy checkout <commit-hash>📋 Commands Reference
Basic Operations
| Command | Description |
|---------|-------------|
| luffy init | Initialize a new repository |
| luffy add <file> | Add specific file to staging |
| luffy add . | Add all files in directory (tree-based) |
| luffy commit <message> | Commit staged changes |
| luffy status | Show working directory status |
History & Navigation
| Command | Description |
|---------|-------------|
| luffy log | Show commit history with file info |
| luffy show <hash> | Show detailed diff for commit |
| luffy checkout <hash> | Restore project to specific commit |
| luffy ls | List files in current commit |
Remote Operations
| Command | Description |
|---------|-------------|
| luffy login | Login to remote server |
| luffy push <repo> | Push commits to remote repository |
| luffy pull <repo> | Pull latest commits from remote |
| luffy listall | List all your repositories |
| luffy logout | Logout from remote server |
🌟 Advanced Usage
Project Management
# Check what's changed since last commit
luffy status
# Stage all changes including new files and directories
luffy add .
# Commit with descriptive message
luffy commit "Add user authentication module"
# See what changed in the last commit
luffy show HEAD
# Go back to a previous version
luffy checkout abc123def456Working with Complex Projects
# Initialize in existing project
cd my-large-project/
luffy init
# Add everything (handles nested directories efficiently)
luffy add .
# First commit with all files
luffy commit "Initial project structure"
# Check status after making changes
luffy status
# Output shows:
# Modified files (3):
# ~ src/components/Header.js
# ~ src/utils/api.js
# ~ package.json
#
# New files (1):
# + src/components/NewFeature.jsRemote Collaboration
# Setup remote repository
luffy login
luffy push my-project
# Later, pull updates
luffy pull my-project
# Share your repositories
luffy listall🎨 Output Examples
Status Command
$ luffy status
Repository Status
──────────────────────────────
✓ Working directory is clean
No changes since last commit
📋 Staging area: EmptyLog Command
$ luffy log
Commit: a1b2c3d4e5f6789...
Date: Mon Aug 01 2025 10:30:45 GMT+0530
Message: Add user authentication
Files: 15 (tree structure)
- src/auth/login.js
- src/auth/register.js
- src/components/AuthForm.js
- ... and 12 more files
──────────────────────────────────────────────────Show Command
$ luffy show a1b2c3d4e5f6789
Changes in commit a1b2c3d4e5f6789:
────────────────────────────────────────────────────────────
📁 Added files (2):
+ src/auth/login.js
+ src/auth/register.js
📝 Modified files (1):
~ src/app.js
┌─ Diff:
│ + 15: import { AuthService } from './auth/AuthService';
│ + 16:
│ 25: function App() {
│ + 26: const auth = new AuthService();🏗️ Architecture
Tree-Based Storage
.luffy/
├── objects/ # Content-addressable storage
│ ├── a1b2c3d4... # Blob objects (file content)
│ ├── e5f6g7h8... # Tree objects (directory structure)
│ └── i9j0k1l2... # Commit objects (snapshots)
├── HEAD # Current commit pointer
└── index # Staging areaObject Types
- Blob: Raw file content
- Tree: Directory structure with file/subdirectory references
- Commit: Snapshot with tree reference, message, and metadata
🔧 Configuration
Server Configuration
The CLI connects to the Luffy VCS server for remote operations. No manual configuration needed - just login with your credentials.
Ignored Files
By default, these patterns are ignored:
.luffy/(repository metadata).git/(Git repositories)node_modules/(Node.js dependencies)
🤝 Contributing
We welcome contributions! Here's how to help:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Add tests for new functionality
- Submit a pull request
Development Setup
git clone https://github.com/Kanthiluffy/v1_version_control
cd luffy-vcs-cli
npm install
npm test🐛 Troubleshooting
Common Issues
"Invalid token" error when pushing:
luffy logout
luffy login
luffy push my-repoFiles not being tracked:
# Check status first
luffy status
# Re-add files
luffy add .
luffy commit "Re-add missing files"Large repository performance:
# The tree structure handles large repositories efficiently
# No special configuration needed📄 License
MIT License
🙏 Acknowledgments
- Inspired by Git's tree-based architecture
- Built with Node.js and modern JavaScript
- Thanks to the open-source community for tools and inspiration
📞 Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: [email protected]
Made with ❤️ for developers who love clean, powerful tools
Luffy VCS CLI - Version control that grows with your project 🌳
