|
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: https://app.falkordb.cloud/signup |
| 12 | + |
| 13 | +Or by running locally with docker: |
9 | 14 | ```bash
|
10 |
| -flask --app code_graph run --debug |
| 15 | +docker run -p 6379:6379 -p 3000:3000 -it --rm falkordb/falkordb:latest |
11 | 16 | ```
|
12 | 17 |
|
13 |
| -Process local git repository, ignoring specific folder(s) |
| 18 | +### Config |
| 19 | +Create your own `.env` file from the `.env.template` file |
14 | 20 |
|
| 21 | +Start the server: |
15 | 22 | ```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"]}' |
| 23 | +flask --app api/index.py run --debug |
17 | 24 | ```
|
18 | 25 |
|
19 |
| -Process code coverage |
20 |
| - |
| 26 | +### Creating a graph |
| 27 | +Process a local source folder: |
21 | 28 | ```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"}' |
| 29 | +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 | 30 | ```
|
24 | 31 |
|
25 |
| -Process git information |
26 |
| - |
| 32 | +For example: |
27 | 33 | ```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"}' |
| 34 | +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 | 35 | ```
|
| 36 | +## Working with your graph |
| 37 | +Once the source code analysis completes your FalkorDB DB will be populated with |
| 38 | +a graph representation of your source code, the graph name should be the same as |
| 39 | +the name of the folder you've requested to analyze, for the example above a graph named: |
| 40 | +"GraphRAG-SDK". |
| 41 | + |
| 42 | +At the moment only the Python and C languages are supported, we do intend to support additional languages. |
| 43 | + |
| 44 | +At this point you can explore and query your source code using various tools |
| 45 | +Here are several options: |
| 46 | +1. FalkorDB built-in UI |
| 47 | +2. One of FalkorDB's [clients](https://docs.falkordb.com/clients.html) |
| 48 | +3. Use FalkorDB [GraphRAG-SDK](https://github.com/FalkorDB/GraphRAG-SDK) to connect an LLM for natural language exploration. |
0 commit comments