NexusAnalyzer
A tool that scans Python projects and produces a dependency and architecture map as a Markdown report.
NexusAnalyzer is a command-line tool that scans a Python project from end to end and produces a map of its dependencies and architecture. It looks not only at Python files but also at web and configuration files. It writes what it finds into six separate Markdown files. I developed it in early 2026 and published it on PyPI as nexus-analyzer.
Purpose
Whenever I tried to understand a project I had inherited or had not touched for a long time, I kept asking the same questions. Which API endpoints does it define, which outside services does the code call, which databases does it connect to, what is there on the Docker or Nginx side, and how are the files laid out? Answering these by hand took hours. I wrote NexusAnalyzer to automate that first round of exploration. My aim was to turn the overall picture of a project into a readable report within seconds.
How it works
The tool walks every folder starting from the given directory. It skips folders that make no sense to scan, such as node_modules, venv, .git, __pycache__, build and dist. Each file is passed to the right analyzer based on its extension.
Python files are examined in two ways. In the first, lines are scanned with regular expressions for traces of features such as OAuth2 authentication, rate limiting, Celery tasks, an MQTT client, SSE streams and the gateway pattern. In the second, the file is turned into a syntax tree with the ast module. From the AST it extracts the FastAPI application's title and version, the number of async and regular functions, the endpoints defined with get, post, put, delete, patch and websocket decorators, and the parameters of those endpoints. Outgoing requests made with requests, httpx or similar clients are recorded with their method, target, whether credentials are used and the parameters sent. Arguments typed as WebSocket or BackgroundTasks, and decorator dependencies that mention a role or admin, are flagged as well.
In configuration files it looks for Docker images, container names, YAML service keys, the ports Nginx listens on and connection addresses. In JavaScript and TypeScript files it finds fetch and axios calls and lists the addresses the front end talks to. If front-end calls are found, the project is classified as a full-stack web app; otherwise it is classified as a backend API.
Key features
- If a password appears in a database, Redis or message queue connection address, it is masked with asterisks in the report.
- Configuration lines that contain the word "secret" are left out of the report entirely.
- Every finding includes the file and line it came from, so it is easy to jump straight to the code and check it.
- For each advanced feature it detects, it also shows why it was detected.
- The file tree is capped at 2000 lines, so the report stays readable even for very large projects.
Outputs
The report is written to a folder stamped with the date and time inside the project directory. The folder holds six files. The first is the project identity and summary, with the architecture type, application name, version, number of endpoints, file type breakdown and folder statistics. The second is a table of API endpoints. The third covers outgoing service requests. The fourth lists the advanced features detected. The fifth covers infrastructure services and connections. The sixth is the project's file tree.
Technical stack
NexusAnalyzer uses only the Python standard library; the ast, re, pathlib and collections modules do most of the work. It has no external dependencies. The package is built with setuptools through pyproject.toml and supports Python 3.9 and later. Installing it adds a command called nexus-cli; typing nexus-cli . in a project directory starts the scan.
Use cases
- I use it on day one to understand the architecture of a project I have just taken over.
- Seeing in a single table which APIs a service calls makes security and dependency reviews easier.
- When writing project documentation, I start from these reports instead of collecting the endpoint list and infrastructure connections by hand.
- Because the output is Markdown, I can add the reports straight to the project's repository and share them with the team.
- Category
- Developer tools
- Year
- 2026
Technologies
- Python
- PyPI
- Open Source