|
5 | 5 | ## Getting Started
|
6 | 6 | [Live Demo](https://code-graph.falkordb.com/)
|
7 | 7 |
|
| 8 | +## Running locally |
8 | 9 |
|
| 10 | +### Run FalkorDB |
| 11 | +Free cloud instance: http://cloud.falkordb.com/ |
| 12 | +Or by running locally with docker: |
9 | 13 | ```bash
|
10 |
| -flask --app code_graph run --debug |
| 14 | +docker run -p 6379:6379 -p 3000:3000 -it --rm falkordb/falkordb:latest |
11 | 15 | ```
|
12 | 16 |
|
13 |
| -Process local git repository, ignoring specific folder(s) |
| 17 | +### Config |
| 18 | +Create your own `.env` file from the `.env.template` file |
14 | 19 |
|
| 20 | +Start the server: |
15 | 21 | ```bash
|
16 |
| -curl -X POST http://127.0.0.1:5000/process_local_repo -H "Content-Type: application/json" -d '{"repo": "/Users/roilipman/Dev/FalkorDB", "ignore": ["./.github", "./sbin", "./.git","./deps", "./bin", "./build"]}' |
| 22 | +flask --app api/index.py run --debug |
17 | 23 | ```
|
18 | 24 |
|
19 |
| -Process code coverage |
20 |
| - |
| 25 | +### Creating a graph |
| 26 | +Process a local source folder: |
21 | 27 | ```bash
|
22 |
| -curl -X POST http://127.0.0.1:5000/process_code_coverage -H "Content-Type: application/json" -d '{"lcov": "/Users/roilipman/Dev/code_graph/code_graph/code_coverage/lcov/falkordb.lcov", "repo": "FalkorDB"}' |
| 28 | +curl -X POST http://127.0.0.1:5000/analyze_folder -H "Content-Type: application/json" -d '{"path": "<FULL_PATH_TO_FOLDER>", "ignore": [<OPTIONAL_IGNORE_LIST>]}' -H "Authorization: <.ENV_SECRET_TOKEN>" |
23 | 29 | ```
|
24 | 30 |
|
25 |
| -Process git information |
26 |
| - |
| 31 | +For example: |
27 | 32 | ```bash
|
28 |
| -curl -X POST http://127.0.0.1:5000/process_git_history -H "Content-Type: application/json" -d '{"repo": "/Users/roilipman/Dev/falkorDB"}' |
| 33 | +curl -X POST http://127.0.0.1:5000/analyze_folder -H "Content-Type: application/json" -d '{"path": "/Users/roilipman/Dev/GraphRAG-SDK", "ignore": ["./.github", "./build"]}' -H "Authorization: OpenSesame" |
29 | 34 | ```
|
| 35 | +## Working with your graph |
| 36 | +Once the source code analysis completes your FalkorDB DB will be populated with |
| 37 | +a graph representation of your source code, the graph name should be the same as |
| 38 | +the name of the folder you've requested to analyze, for the example above a graph named: |
| 39 | +"GraphRAG-SDK". |
| 40 | + |
| 41 | +At the moment only the Python and C languages are supported, we do intend to support additional languages. |
| 42 | + |
| 43 | +At this point you can explore and query your source code using various tools |
| 44 | +Here are several options: |
| 45 | +1. FalkorDB built-in UI |
| 46 | +2. One of FalkorDB's clients[https://docs.falkordb.com/clients.html] |
| 47 | +3. Use FalkorDB GraphRAG-SDK[https://github.com/FalkorDB/GraphRAG-SDK] to connect an LLM for natural language exploration. |
0 commit comments