|
1 | | -# strazh |
2 | | -Your code - is your Knowledge Graph. |
| 1 | +# Strazh |
| 2 | +Your codebase - is your Knowledge Graph. |
3 | 3 |
|
4 | | -__WIP__ |
| 4 | +**Strazh** is a .NET Core console app to build a Codebase Knowledge Graph from a C# codebase powered by Roslyn analyzer. |
5 | 5 |
|
6 | | -Release plan: |
| 6 | +**Codebase Knowledge Graph** is a graph-structured dataset with free-form relationships between entities of codebase, semantic models of programming language, project structure and other interlinked knowledges. |
7 | 7 |
|
8 | | -- 1.0.0-alpha |
9 | | -- 1.0.0-alpha.1..N <-- HERE NOW |
10 | | -- 1.0.0-beta |
11 | | -- 1.0.0-beta.1..N |
12 | | -- 1.0.0 |
| 8 | + |
13 | 9 |
|
14 | | -### local |
| 10 | +More details in the article [Codebase Knowledge Graph](https://vladbatushkov.medium.com/204f32b58813?source=friends_link&sk=adc2d577a5fa3ae9886b2dd6eb29b428) |
15 | 11 |
|
16 | | -Build `strazh` from repository root: |
17 | | -``` |
18 | | -dotnet build ./Strazh/Strazh.csproj -c Release -o /app |
19 | | -``` |
20 | | -Run `strazh` to analyze `Strazh.csproj`: |
21 | | -``` |
22 | | -dotnet ./app/Strazh.dll -c neo4j:neo4j:strazh -p ./Strazh/Strazh.csproj |
23 | | -``` |
| 12 | +#### Documentation |
24 | 13 |
|
25 | | -### docker |
| 14 | +[Run with docker-compose](/Documentation/docker-compose-run.md) |
26 | 15 |
|
27 | | -In case you want to create a local `strazh:dev` image: |
| 16 | +[Manual run](/Documentation/manual-run.md) |
28 | 17 |
|
29 | | -``` |
30 | | -docker build . -t strazh:dev |
31 | | -``` |
32 | | - |
33 | | -Example how to run created `strazh:dev` container against the `Strazh.csproj` project (strazh can explore strazh codebase O_o ) |
34 | | - |
35 | | -``` |
36 | | -docker run -it --rm --network=host -v $(pwd)/Strazh:/dest -e c=neo4j:neo4j:strazh -e p=/dest/Strazh.csproj strazh:dev |
37 | | -``` |
38 | | - |
39 | | -Run with cli from `Strazh` folder: `dotnet Strazh.dll -c neo4j:neo4j:strazh -p ../../../Strazh.csproj` |
40 | | - |
41 | | -Run using `dotnet run` from `Strazh` folder: |
42 | | -``` |
43 | | -dotnet run -c "neo4j:neo4j:strazh" -p "./Strazh.csproj" |
44 | | -``` |
45 | | - |
46 | | -- docker volume used to map folder `/Strazh` to folder `/dest` inside docker. |
47 | | -- environment value `c` used to connect to Neo4j with `database:user:password` credentials. |
48 | | -- environment value `m` used to point to mode of analysis used for run. |
49 | | -- environment value `s` used to point to solution file inside docker container. |
50 | | -- environment value `p` used to point to project files inside docker container. |
51 | | - |
52 | | -**docker-compose.yml** |
53 | | - |
54 | | -Another one option to build and run `strazh` is to use next `docker-compose` config: |
55 | | -``` |
56 | | -version: '3' |
57 | | -services: |
58 | | -
|
59 | | - strazh: |
60 | | - build: . |
61 | | - image: vladbatushkov/strazh:1.0.0-alpha.3 |
62 | | - container_name: strazh |
63 | | - network_mode: host |
64 | | - volumes: |
65 | | - - ./Strazh:/dest |
66 | | - environment: |
67 | | - - c=neo4j:neo4j:strazh |
68 | | - - p=/dest/Strazh.csproj |
69 | | - depends_on: |
70 | | - - neo4j |
71 | | -
|
72 | | - neo4j: |
73 | | - image: neo4j:4.2 |
74 | | - container_name: strazh_neo4j |
75 | | - restart: unless-stopped |
76 | | - ports: |
77 | | - - 7474:7474 |
78 | | - - 7687:7687 |
79 | | - environment: |
80 | | - NEO4J_AUTH: neo4j/strazh |
81 | | - NEO4J_dbms_memory_pagecache_size: 1G |
82 | | - NEO4J_dbms.memory.heap.initial_size: 1G |
83 | | - NEO4J_dbms_memory_heap_max__size: 1G |
84 | | -``` |
| 18 | +[Command Line Interface](/Documentation/cli.md) |
0 commit comments