SnapIt is a lightweight, human-friendly version control system designed for simplicity and speed. It brings the power of snapshots to your projects without the complexity of traditional tools.
- 🚀 Instant Snapshots: Quickly save the state of your project.
- 🔍 Simple History: View your project's evolution with a clear, readable log.
- ⏪ Easy Reverts: Accidentally broke something? Revert to any previous state in seconds.
- 🛡️ Smart Ignoring: Keep your repository clean with
.snapitignoresupport. - 🎨 Beautiful UI: Rich terminal interface with progress indicators and formatted tables.
SnapIt is a Node.js-based CLI tool. To use it globally, you can link it locally or install dependencies and run it directly.
# Clone the repository
git clone https://github.com/yourusername/snapit.git
# Navigate to the directory
cd snapit
# Install dependencies
npm install
# (Optional) Link the command globally
npm linkGet up and running with SnapIt in three simple steps:
-
Initialize your repository:
snapit init
-
Stage your changes:
snapit add . -
Commit your snapshot:
snapit commit "Initial snapshot of my project"
| Command | Description | Example |
|---|---|---|
init |
Initialize a new SnapIt repository in the current directory. | snapit init |
add . |
Scan for changes and stage them for the next commit. | snapit add . |
commit |
Save the staged changes with a descriptive message. | snapit commit "feat: add login ui" |
log |
Display a detailed table of all snapshots in history. | snapit log |
revert |
Restore all project files to a specific snapshot hash. | snapit revert a1b2c3d4 |
help |
Show the built-in help documentation. | snapit help |
Create a .snapitignore file in your root directory to exclude specific files or folders from being tracked.
Note: SnapIt automatically ignores
.snapit/,.snapitignore,node_modules/, and.git/by default.
Example .snapitignore:
*.log
temp/
docs/drafts/
secret.txt
- 🌟 Use
snapit logto find the unique hash of any previous version. - 🌟 You don't need the full hash! You can use partial hashes (e.g., the first 8 characters) with the
revertcommand. - 🌟 SnapIt's internals are inspired by Git. Your file contents are safely stored as objects in the
.snapit/objectsdirectory.
SnapIt uses a content-addressable storage system located in the .snapit directory:
objects/: Stores compressed/hashed versions of your file contents.commits/: Stores metadata for each snapshot (message, date, file references).index.json: Tracks the current staged state of your repository.HEAD: Points to the most recent snapshot.
This project is licensed under the ISC License. See the package.json for details.
Made with ❤️ for developers who love simplicity.