gct
gct copied to clipboard
Graphical Code Tracer (GCT): Visualize code at lightning speed
Graphical Code Tracer
Graphical Code Tracer (gct) is the world's first visual static code analyzer.
Within seconds it can tell you how your functions and classes are connected to each other!
GCT web app • Getting started • Installation • Configuration
Getting started
Usecases:
- Onboard to new codebases faster.
- Debug code faster Twitter thread
- Create share-able versions of your code. Using gctpy.com, you can instantly share your UML diagrams across teams.
Some examples you can run GCT on:
Simple python file • karpathy/MinGPT • scikit-learn/cluster • geohot/tinygrad • PyTorch/autograd • Flask Web App
Generate graph for any python file
python -m gct -i path/to/file.py # run gct on a local file
python -m gct -i https://github.com/user_name/path/to/file.py # run gct on a file hosted on a web server
Installation
Step 1: Install GCT Python package
pip install gct-py
Step 2: Install Graphviz executable
GCT generates graphs using graphviz. To get accurate graphs, we highly recommend using latest graphviz version available for your OS.
Skip this step if you've already installed graphviz executable version. Check the dot version by running: dot -V
.
Windows
Install graphviz by downloading executable (version >=6.0.1) from graphviz website.
Configuration
Customize the experience by aliasing gct
:
alias gct='python -m gct -i'
gct path/to/file.py