Vilo is a simple version control and backup system written in Go, designed to handle file versioning, encryption, and compression using AES and Gzip.
- Initialize: Create the required
.vilodirectory structure. - Add: Stage files to the staging area.
- Commit: Encrypt, compress, and save staged files into the
.vilo/objectsdirectory. - Secure Storage: Files are stored securely with AES encryption.
- Custom Commit Messages: Tag your commits with meaningful messages.
- Rollback: Rollback to previous commits.
- Go (Golang) version 1.16 or higher
$ git clone https://github.com/ammargit93/vilo.git
$ cd ViloRun the following command to build the executable:
$ go build -o vilo.exe .This will create the vilo.exe executable in the current directory.
Initialize a new repository in the current directory:
$ ./vilo initThis creates a .vilo directory containing:
.vilo/HEAD: Stores commit hashes.vilo/stage.json: Tracks staged files.vilo/objects/: Stores committed files
Add files to the staging area using the add command:
$ ./vilo add --files file1.txt,file2.txtOutput:
/path/to/file1.txt Staged for commit
/path/to/file2.txt Staged for commit
Commit files with a custom message:
$ ./vilo commit --Message "Initial commit"Output:
Commit successful!
Committed files are encrypted, compressed, and saved into .vilo/objects/<hash>/.
$ vilo showRollbacks to specified commit with the hash values mentioned with the '--hash' flag, descrypts and decompresses inside the directory specified by the '--foldername' flag.
$ vilo rollback --hash <commit-hash> --foldername <directory>Files are:
- Compressed using Gzip to save space.
- Encrypted using AES (CFB mode) for secure storage.
After a commit, the structure looks like this:
.vilo/
├── HEAD
├── history
├── stage.json
└── objects/
└── <commit-hash>/
├── file1.txt.enc
└── file2.txt.enc
- Remote sync with Google drive, dropbox, AWS S3.
- Watch-mode to auto sync and commit on regular time intervals.
- Authentication to secrets and custom AES keys.
- Storing diffs instead of whole files.
Feel free to fork this repository and submit pull requests!
Ammar Ansari