https://github.com/omerba31/git_filesystem
A hybrid Git-like file system project using C++ for backend logic and Python for the command-line interface โ supports operations like staging, commits, object handling, and more.
https://github.com/omerba31/git_filesystem
cli cpp docker git makefile python
Last synced: 3 months ago
JSON representation
A hybrid Git-like file system project using C++ for backend logic and Python for the command-line interface โ supports operations like staging, commits, object handling, and more.
- Host: GitHub
- URL: https://github.com/omerba31/git_filesystem
- Owner: Omerba31
- Created: 2025-03-27T16:37:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-27T16:48:54.000Z (over 1 year ago)
- Last Synced: 2025-03-27T17:41:05.323Z (over 1 year ago)
- Topics: cli, cpp, docker, git, makefile, python
- Language: Python
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Git FileSystem
A hybrid Git-like file system project that combines the performance of C++ with the flexibility of a Python command-line interface. It mimics essential Git operations such as creating objects, managing trees, and committing changes โ all within a custom file system environment.
---
## ๐ง Project Structure
- **C++ Core (`libcaf/src/`)**: Implements the core logic for managing blobs, trees, commits, object I/O, and hashing.
- **Python CLI (`caf/`)**: Provides a user-friendly interface for interacting with the file system via commands.
- **Binding Layer**: Exposes C++ functionality to Python (via bindings in `bind.cpp` and setup config).
---
## ๐ Features
- Create and manage Git-like objects (blobs, trees, commits)
- Navigate a custom file system hierarchy
- Interact through Python-based CLI
- Modular, extensible, and performance-focused
---
## ๐ ๏ธ Installation
### Prerequisites
- Python 3.8+
- A C++ compiler (`g++` or `clang`)
- `pip` and `virtualenv` (optional but recommended)
### Clone the repository
```bash
git clone https://github.com/Omerba31/git_fileSystem.git
cd git_fileSystem
```
### Build and install the C++ extension
```bash
cd libcaf
pip install .
```
> This will compile the C++ source in `libcaf/src/` and make it available to the Python interface.
### Run the CLI
```bash
cd ../caf
python -m caf
```
---
## ๐งช Running Tests
```bash
cd tests
pytest
```
---
## ๐ Directory Overview
```
git_fileSystem/
โโโ caf/ # Python CLI interface
โโโ libcaf/ # C++ backend and binding setup
โ โโโ src/ # Core C++ logic (Blob, Tree, Commit, etc.)
โ โโโ setup.py # Build configuration for Python bindings
โโโ tests/ # Unit tests
โโโ Makefile # Optional build automation
โโโ Dockerfile # Containerization setup
```
---
## ๐งฉ Example Commands
From the CLI:
```bash
> init
Initialized empty Git-like repository.
> add file.txt
Staged 'file.txt'
> commit -m "Initial commit"
[commit] Created with message: Initial commit
> ls
.blob
.tree
```
---
## ๐ License
This project is licensed under the **MIT License**. See `LICENSE` for details.
---
## ๐ค Contributions
Feel free to open issues, suggest features, or submit pull requests!