An over-simplified version control system written in Rust, similar to Git, for local files (Incomplete)

Overview

Vault

Vault will be a command line tool (if successful) similar to git which would have multiple features like brances etc etc.

__     __          _ _   
\ \   / /_ _ _   _| | |_ 
 \ \ / / _` | | | | | __|
  \ V / (_| | |_| | | |_ 
   \_/ \__,_|\__,_|_|\__| , simplified version control for local files

Info

This is my try at learning Rust. I literally even had to ask ChatGPT on how to start a new Cargo project while starting this : ) . I don't even know if I would even be able to pull this off. Lets hope for the best.

Idea

So basically, something like vault init should initialize a vault repository in the current working directory. Then comes the actual git part -

  1. vault init would initially start a main branch in the .vault folder. This would create something like a main directory inside ./vault.
  2. Every file in the present working directory would be present in a directory inside main (branch) maybe by a encoded name to prevent collissions.
  3. Whenever user runs vault add in the present working directory, would be looped, and added to the current branch.
  4. These files would be compressed by maybe some library or algorithm to keep the project memory efficient.
  5. If a user creates a new branch by say vault create {branch_name} , a new folder with the branch name would be created alongside the main folder depicting the new branch.
  6. By default, whenever a new branch is created, the contents of the current branch should be copied over to the new branch.
  7. Each branch should be independent of each other, and whenever the user switches branches by say vault switch {branch_name} all the files would be overwritten according to the new branch.
  8. MAYBE LATER IF WE REACH TILL HERE , we can add the functionality of deleting a branch, merging two branches etc.

Hmm :/, Enough talking, lets start!

Set Up Locally

  1. Clone this repository by running the command git clone https://github.com/shubhexists/vault.

  2. cd into the directory and run cargo build --release. This will create binaries for the project.

  3. Open a new terminal and open .bashrc in your favourite editor, say nano ~/.bashrc.

  4. Export the path of the executable (It is in the /target/release/ directory .) For eg, it was

    export PATH="$PATH:/home/jerry/Desktop/vault/target/release" for me.

  5. Save the file and source the terminal or simple open a new terminal instance.

  6. You are not all set to "VAULTIFY" your local files :)

You might also like...
A git sub-command to view your git repository in the web browser
A git sub-command to view your git repository in the web browser

git-view A git sub-command to view your git repository in the web browser! About Are you also frustrated from moving your hands away from the keyboard

Git Explorer: cross-platform git workflow improvement tool inspired by Magit
Git Explorer: cross-platform git workflow improvement tool inspired by Magit

Gex Git workflow improvement CLI tool inspired by Magit. This project is still under initial development, but I am actively dogfooding it and features

A simplified recreation of the command-line utility grep written in Rust.

smolgrep A simplified recreation of the command-line utility grep written in Rust. Download and run Download Rust On Mac/Linux Open a terminal and ent

Bolik Timeline is local-first software for keeping notes and files.

Bolik monorepo Bolik Timeline is local-first software for keeping notes and files. This repo contains alpha-quality software. This means that we are e

Convert local CAN log files to "routes" suitable for Cabana

Make Cabana Route Utility that takes CSV formatted CAN log files and (optionally) accompanying videos, convert them to "routes" that can be opened in

A simplified example in Rust of training a neural network and then using it based on the Candle Framework by Hugging Face.

candle-simplified-example A simplified example in Rust of training a neural network and then using it based on the Candle Framework by Hugging Face. H

🐹 LGrow, Fast and simplified ⚡
🐹 LGrow, Fast and simplified ⚡

🐹 LGrow, the most simplified high-performance language! Before, we needed to make this presentation, since this character is VERY important to our st

Rmatrix is similar to the cmatrix, but it wrote it in Rust.
Rmatrix is similar to the cmatrix, but it wrote it in Rust.

Rmatrix is similar to the cmatrix, but it wrote it in Rust. Get up to 75% performance improvement compared to cmatrix.

Wrapper over MMTk to simplify integration with runtimes: thread management system, object header, root scanning

vmkit A library which provides bunch of building blocks to make a VM in Rust. Feautures MMTK integration out of the box Thread management provided by

Comments
  • Added `Clap` for better arguments parsing

    Added `Clap` for better arguments parsing

    Added clap for better argument parsing

    Updated main.rs file.

    • removed all the manual match for arguments using if statement
    • added help text for arguments

    Updated doc in idea section, point 7 to have switch instead of checkout.

    Added project info in cargo.toml file

    opened by itsDrac 1
  • Many of the functions have not been error handled : /

    Many of the functions have not been error handled : /

    Apparently, I have to look at references to see how to handle errors in Rust. It's kinda different to how we do it in Golang : ) . However, will do it after implementing other functionalities.

    enhancement help wanted 
    opened by shubhexists 0
Owner
Shubham
aka Jerry
Shubham
Over-simplified, featherweight, open-source and easy-to-use authentication and authorization server.

concess ⚠️ Early Development: This is not production ready, yet. Do not use it for anything important. Introduction concess is a over-simplified, feat

Dustin Frisch 3 Nov 25, 2022
A version control system implemented from scratch in Rust.

Version Control An experiment to write a version control system from scratch in Rust. CLI Usage Usage: revtool <COMMAND> Commands: init initia

Samuel Schlesinger 3 May 3, 2023
git-cliff can generate changelog files from the Git history by utilizing conventional commits as well as regex-powered custom parsers.⛰️

git-cliff can generate changelog files from the Git history by utilizing conventional commits as well as regex-powered custom parsers. The changelog template can be customized with a configuration file to match the desired format.

Orhun Parmaksız 5k Jan 9, 2023
A command-line tool aiming to upload the local image used in your markdown file to the GitHub repo and replace the local file path with the returned URL.

Pup A command line tool aiming to upload the local image used in your markdown file to the GitHub repo and replace the local file path with the return

SteveLau 11 Aug 17, 2022
A tool that allow you to run SQL-like query on local files instead of database files using the GitQL SDK.

FileQL - File Query Language FileQL is a tool that allow you to run SQL-like query on local files instead of database files using the GitQL SDK. Sampl

Amr Hesham 39 Mar 12, 2024
A simplified general-purpose queueing system for Rust apps.

A simplified general-purpose queueing system for Rust apps. Example // Create a new Redeez object, and define your queues let mut queues = Redeez::new

Miguel Piedrafita 11 Jan 16, 2023
A git command to quickly save your local changes in case of earthquake !

git-eq (aka git earthquake) Earthquakes are part of the daily life in many countries like in Taiwan. git-eq is a simple git command to quickly save yo

Jérôme MEVEL 6 Dec 16, 2022
Local-first task manager/bug tracker that stores everything right in the git repository and can sync issues from/to GitHub.

git-task Local-first task manager/bug tracker within your git repository which can import issues from GitHub. Installation Build a binary, then add it

null 15 Sep 28, 2024
Fast KubeJS script manager. Includes version control and compatibility with KJSPKG packages.

CarbonJS A KubeJS script manager Features ?? Super fast ⚙️ Version control ?? Constantly new scripts being added ✅ Easy to use ?? Compatibility with K

Krzysztof Poręba 3 May 9, 2023
A Rust CLI tool that helps you enforce Git policies through Git hooks both server and client side

GitPolicyEnforcer This is a command line utility written in Rust, that helps you utilize Git hooks, to enforce various policies. It currently supports

Vagelis Prokopiou 4 Aug 14, 2022