Skip to content

Commit 9a60dea

Browse files
authored
Merge branch 'main' into clone-unit-test
2 parents 6102c23 + d556b0a commit 9a60dea

File tree

1 file changed

+57
-29
lines changed

1 file changed

+57
-29
lines changed

README.md

Lines changed: 57 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# GitIngest
22

3+
[![Image](./docs/frontpage.png "GitIngest main page")](https://gitingest.com)
4+
35
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/cyclotruc/gitingest/blob/main/LICENSE)
46
[![PyPI version](https://badge.fury.io/py/gitingest.svg)](https://badge.fury.io/py/gitingest)
57
[![Downloads](https://pepy.tech/badge/gitingest)](https://pepy.tech/project/gitingest)
68
[![GitHub issues](https://img.shields.io/github/issues/cyclotruc/gitingest)](https://github.com/cyclotruc/gitingest/issues)
79
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
810
[![Discord](https://dcbadge.limes.pink/api/server/https://discord.com/invite/zerRaGK9EC)](https://discord.com/invite/zerRaGK9EC)
911

10-
[![Image](./docs/frontpage.png "GitIngest main page")](https://gitingest.com)
11-
1212
Turn any Git repository into a prompt-friendly text ingest for LLMs.
1313

1414
You can also replace `hub` with `ingest` in any github url to access the coresponding digest
@@ -62,13 +62,6 @@ summary, tree, content = ingest("https://github.com/cyclotruc/gitingest")
6262

6363
By default, this won't write a file but can be enabled with the `output` argument
6464

65-
## 🛠️ Using
66-
67-
- Tailwind CSS - Frontend
68-
- [FastAPI](https://github.com/fastapi/fastapi) - Backend framework
69-
- [tiktoken](https://github.com/openai/tiktoken) - Token estimation
70-
- [apianalytics.dev](https://www.apianalytics.dev/) - Simple Analytics
71-
7265
## 🌐 Self-host
7366

7467
1. Build the image:
@@ -84,35 +77,45 @@ By default, this won't write a file but can be enabled with the `output` argumen
8477
```
8578

8679
The application will be available at `http://localhost:8000`
87-
Ensure environment variables are set before running the application or deploying it via Docker.
8880

89-
## ✔️ Contributing
81+
If you are hosting it on a domain, you can specify the allowed hostnames via env variable `ALLOWED_HOSTS`.
9082

91-
Contributions are welcome!
83+
```bash
84+
#Default: "gitingest.com,*.gitingest.com,localhost, 127.0.0.1".
85+
ALLOWED_HOSTS="example.com, localhost, 127.0.0.1"
86+
```
9287

93-
Gitingest aims to be friendly for first time contributors, with a simple python and html codebase. If you need any help while working with the code, reach out to us on [discord](https://discord.com/invite/zerRaGK9EC)
88+
## 🛠️ Stack
9489

95-
### Ways to contribute
90+
- [Tailwind CSS](https://tailwindcss.com/) - Frontend
91+
- [FastAPI](https://github.com/fastapi/fastapi) - Backend framework
92+
- [Jinja2](https://jinja.palletsprojects.com/) - HTML templating
93+
- [tiktoken](https://github.com/openai/tiktoken) - Token estimation
94+
- [apianalytics.dev](https://www.apianalytics.dev/) - Simple Analytics
9695

97-
1. Provide your feedback and ideas on discord
98-
2. Open an Issue on github to report a bug
99-
3. Create a Pull request
100-
- Fork the repository
101-
- Make your changes and test them locally
102-
- Open a pull request for review and feedback
96+
## ✔️ Contributing to Gitingest
10397

104-
### 🔧 Local dev
98+
Gitingest aims to be friendly for first time contributors, with a simple python and html codebase.
99+
If you need any help while working with the code, reach out to us on [discord](https://discord.com/invite/zerRaGK9EC)
105100

106-
#### Environment Configuration
101+
### Ways to help (non-technical)
107102

108-
- **`ALLOWED_HOSTS`**: Specify allowed hostnames for the application. Default: `"gitingest.com,*.gitingest.com,gitdigest.dev,localhost"`.
109-
You can configure the application using the following environment variables:
103+
- Provide your feedback and ideas on discord
104+
- Open an Issue on github to report a bug / submit an feature request
105+
- Talk about Gitingest on social media
110106

111-
```bash
112-
ALLOWED_HOSTS="gitingest.local,localhost"
113-
```
107+
### How to submit a PR
114108

115-
#### Run locally
109+
1. Fork the repository & clone it locally
110+
2. Setup the dev environment (see Development section bellow)
111+
3. Run unit tests with `pytest`
112+
4. Commit your changes and run `pre-commit`
113+
5. Open a pull request on Github for review and feedback
114+
6. (Optionnal) Invite project maintainer to your branch for easier collaboration
115+
116+
## 🔧 Development
117+
118+
### Run web UI locally
116119

117120
1. Clone the repository
118121

@@ -124,7 +127,10 @@ ALLOWED_HOSTS="gitingest.local,localhost"
124127
2. Install dependencies
125128

126129
```bash
127-
pip install -r requirements.txt
130+
pip install -r requirements-dev.txt
131+
python -m venv .venv
132+
source .venv/bin/activate
133+
pre-commit install
128134
```
129135

130136
3. Run the application:
@@ -133,3 +139,25 @@ ALLOWED_HOSTS="gitingest.local,localhost"
133139
cd src
134140
uvicorn main:app --reload
135141
```
142+
143+
4. Run unit tests
144+
145+
```bash
146+
pytest
147+
```
148+
149+
The application should be available at `http://localhost:8000`
150+
151+
### Working on the CLI
152+
153+
1. Install the package in dev mode
154+
155+
```bash
156+
pip install -e .
157+
```
158+
159+
2. Run the CLI
160+
161+
```bash
162+
gitingest --help
163+
```

0 commit comments

Comments
 (0)