Skip to main content

GitCloak

GitCloak is a simple web frontend that lets you browse GitHub repositories and view their contents. It provides an easy-to-use interface to navigate directories, view files, and also renders README.md files. It is still a work in progress, but the basic functionality is there.

Instead of using the GitHub API or screen scraping, GitCloak interfaces directly with the GitHub repository using the git protocol. This should make it more resilient to changes on the GitHub side, and also allows future modifications or forks to support other git hosting services like Forgejo or GitLab instances.

Features

  • Browse directories and files in GitHub repositories.
  • View the content of files directly in the browser.
  • Responsive design with Bootstrap for a clean and professional look.
  • Cloning repositories using the git client over HTTP(S).

Getting Started

Prerequisites

  • Python 3 (tested with 3.12)
  • pip
  • venv (optional but recommended)

Production

  1. Set up a virtual environment and activate it:

    python -m venv venv
    source venv/bin/activate
    
  2. Install GitCloak from PyPI:

    pip install gitcloak
    
  3. Run the GitCloak server:

     gitcloak
    
  4. Open your browser and navigate to:

    http://localhost:8107/
    

Development

  1. Clone the repository:

    git clone https://git.private.coffee/PrivateCoffee/gitcloak
    cd gitcloak
    
  2. Create a virtual environment and activate it:

    python -m venv venv
    source venv/bin/activate
    
  3. Install the Python package:

    pip install -Ue .
    
  4. Run the development server:

    gitcloak
    
  5. Open your browser and navigate to:

    http://localhost:8107/
    

Configuration

GitCloak currently supports the following environment variables:

  • PORT: The port number to run the server on. Default is 8107.
  • HOST: The host to bind the server to. Default is 127.0.0.1.

Usage

  • Landing Page: The landing page provides information about the app and instructions on how to use it.

    http://localhost:8107/
    
  • Browse Repository: To browse a repository, use the following URL format:

    http://localhost:8107/<owner>/<repo>/
    
  • View Subdirectory: To view a specific directory, use the following URL format:

    http://localhost:8107/<owner>/<repo>/tree/main/<path>
    
  • View File Content: To view the raw content of a specific file, use the following URL format:

    http://localhost:8107/<owner>/<repo>/raw/main/<file_path>
    
  • Clone Repository: To clone a repository using your git client, just do as you would normally do:

    git clone http://localhost:8107/<owner>/<repo>
    

Contributing

We welcome contributions to improve GitCloak! To contribute:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. Make your changes and commit them.
  4. Push your changes to your fork.
  5. Create a pull request to merge your changes into the main repository.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Acknowledgments

  • Flask - A lightweight WSGI web application framework in Python.
  • Bootstrap - A powerful front-end framework for faster and easier web development.
  • markdown2 - A fast and complete implementation of Markdown in Python.
  • Phosphor Icons - Beautifully designed icons for use in web projects.

Metadata

Release files for gitcloak 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gitcloak 0.0.6
File Size Uploaded
gitcloak-0.0.6.tar.gz 43.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gitcloak 0.0.6
File Interpreter ABI Platform
gitcloak-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 90.3 kB

Release files / gitcloak-0.0.6.tar.gz

Download URL gitcloak-0.0.6.tar.gz
Size 43.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7390026370bafa3d6e95c66283a15beb0e4af80298908ece5218a6d9192b6a03
BLAKE2b-256 checksum
How to use checksums
0cc3a1d2714feffca8c1f35ec5103017c83c5c00b65435f9a411b4f53056bb18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.2

Release files / gitcloak-0.0.6-py3-none-any.whl

Download URL gitcloak-0.0.6-py3-none-any.whl
Size 47.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a7a019aaf259dd73c748cec01ec5ca55ff336c2f1cd17828d10f1dd5140e9bb
BLAKE2b-256 checksum
How to use checksums
3be855dacf67262526cf1b071ce1c94d311dbd6edf1dbaf38601f2892d3a6887
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.2

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page