VerText is a proof-of-concept Versioned Virtual File System implemented in C++ using FUSE (Filesystem in Userspace). It allows you to mount a virtual directory where every file modification is tracked, essentially providing git-like versioning capabilities directly at the filesystem level.
The project also includes a TUI (Text User Interface) tool to inspect the version history and manage the underlying data.
- FUSE-based Mounting: Mount the filesystem and inspect it with standard tools (
ls,cat,nano, etc.) - Automatic Versioning: Writes to files automatically create new versions.
- TUI Inspector: An ncurses-based terminal UI to view version history and backend storage layout.
- Backend Storage: Uses a structured directory layout in
runtime/datato store file blobs and metadata.
Before building, ensure you have the following installed:
sudo apt update
sudo apt install build-essential cmake libfuse3-dev libncurses-dev pkg-configYou need to install FUSE for macOS (now macFUSE) or fuse-t.
brew install cmake pkg-config
brew install --cask macfuse
# You may also need to install ncurses if not present (usually pre-installed)Note: FUSE is not natively supported on Windows. To run this project on Windows, you MUST use WSL2 (Windows Subsystem for Linux).
- Install WSL2 (
wsl --installin PowerShell). - Open your Ubuntu (or other distro) terminal.
- Follow the Linux instructions above inside the WSL terminal.
-
Clone or Navigate to the project directory:
cd VerText -
Create a build directory:
mkdir build cd build -
Configure and Build:
cmake .. make
This will generate two executables in the
build/directory:vfs_mount: The FUSE daemon.vfs_tui: The TUI version inspector.
The project provides convenient helper scripts in the scripts/ directory to manage mounting and running applications.
To start the VFS, use the mount.sh script. By default, it mounts to /tmp/vfs_mount.
# Run in foreground (helpful for debugging/logging)
./scripts/mount.sh <path to the directory where you wanna mount> -f
# OR Run in background
./scripts/mount.shNote: The script also sets up the necessary runtime/ directories for storage.
Once mounted, you can interact with it like a normal folder:
cd /tmp/vfs_mount
echo "Hello World" > hello.txt
cat hello.txtTo view the backend storage and version history, use the TUI script. Note: You can run this even while the VFS is mounted.
./scripts/run_tui.shUse the arrow keys to navigate and q to quit.
When you are done, unmount the filesystem properly to ensure data is flushed and the daemon stops.
./scripts/unmount.shsrc/fuse/: Core FUSE implementation (operations, main loop).src/tui/: Ncurses-based TUI implementation.src/common/: Shared utilities (path handling).scripts/: Helper scripts for mounting/unmounting.runtime/: Created at runtime.data/: Backend blob storage.meta/: Metadata storage.