A local-first desktop application for exploring, analyzing, documenting, editing, and archiving Python codebases.
Author: BylickiLabs / Thorsten Bylicki
Version: 1.0.0
Release: June 2026
License: MIT
- Overview
- Core Features
- Analysis Scope
- Findings and Thresholds
- Quality Index
- Integrated Source-Code Editor
- SQLite Scan Archive
- Encrypted Database Packages
- Privacy and Security
- System Requirements
- Installation
- Running the Application
- Usage
- User Interface
- Export Formats
- Excluded Directories and File Limits
- Project Architecture
- Data Model
- Limitations
- Troubleshooting
- Development
- Contributing
- License
- Author and Copyright
- Überblick
- Hauptfunktionen
- Analyseumfang
- Befunde und Grenzwerte
- Qualitätsindex
- Integrierter Quelltexteditor
- SQLite-Analysearchiv
- Verschlüsselte Datenbankpakete
- Datenschutz und Sicherheit
- Systemanforderungen
- Installation auf Deutsch
- Anwendung starten
- Bedienung
- Benutzeroberfläche
- Exportformate auf Deutsch
- Ausgeschlossene Verzeichnisse und Dateigrenzen
- Projektarchitektur
- Datenmodell
- Einschränkungen
- Fehlerbehebung
- Entwicklung
- Mitwirken
- Lizenz auf Deutsch
- Autor und Urheberrecht
Codebase Cartographer is a bilingual desktop analysis tool designed for Python projects. It performs static analysis through Python's Abstract Syntax Tree (ast) and therefore does not need to execute the analyzed project.
The application is intended for developers, maintainers, reviewers, educators, and teams that need a fast local overview of an unfamiliar or growing Python codebase. It combines codebase exploration, quality indicators, issue-oriented findings, source editing, reporting, and historical scan storage in one desktop interface.
- Provide an immediate structural overview of a Python project.
- Identify potential maintainability and documentation risks.
- Display dependencies and classify imports.
- Detect syntax errors before deeper metrics are trusted.
- Keep source code and scan results under local control.
- Preserve completed scans in a searchable local archive.
- Allow selected project files to be edited directly from the application.
- Export analysis results for documentation, review, or further processing.
Important
Codebase Cartographer provides heuristic indicators and static-analysis findings. It is not a replacement for tests, security audits, type checking, linting, runtime profiling, or professional code review.
- Recursively discovers Python files.
- Parses source code with Python's
astmodule. - Does not import or execute analyzed project modules.
- Counts total, code, comment, and blank lines.
- Detects syntax errors with line and column details.
- Extracts modules, classes, functions, asynchronous functions, and methods.
- Records symbol location, parent context, documentation state, complexity, and nesting.
- Extracts imports and imported names.
- Classifies imports as standard-library, external, local/project, relative, or unknown.
- Detects wildcard imports.
- Detects
TODO,FIXME,HACK, andXXXmarkers.
- File-level complexity.
- Symbol-level complexity.
- Maximum nesting depth.
- Large-file detection.
- Missing module docstrings.
- Missing public-symbol docstrings.
- Repeated public symbol names across multiple files.
- Prioritized findings from informational to critical.
- Calculated documentation coverage and quality index.
- Modern CustomTkinter interface.
- Dark, light, and system appearance modes.
- German and English language switching at runtime.
- Dashboard with project metrics.
- Filterable file, symbol, and finding views.
- Dependency overview.
- Detailed report view.
- Cross-platform project-folder opening.
- Background analysis thread to keep the interface responsive.
- Integrated UTF-8 source-code editor.
- Open files by double-clicking or pressing
Enterin the file list. - Save, Save As, reload, search, replace, go to line, undo, and redo.
- Detection of externally modified files before overwriting.
- JSON and Markdown report export.
- Automatic SQLite storage after each completed scan.
- Custom project or scan message with a maximum of 1,000 characters.
- Load, delete, refresh, and export archived scans.
- Password-protected full database export and import.
Codebase Cartographer currently analyzes files with the following extension:
.py
For each eligible Python file, the analyzer can collect:
| Area | Collected information |
|---|---|
| File | Absolute path, relative path, module name, size, line counts, status |
| Structure | Classes, functions, async functions, and methods |
| Symbols | Name, type, start line, end line, parent, docstring, complexity, nesting |
| Imports | Module, imported names, line, category, wildcard state |
| Documentation | Module docstring and public-symbol docstrings |
| Maintenance | TODO, FIXME, HACK, and XXX markers |
| Complexity | File complexity, symbol complexity, maximum nesting |
| Errors | Python syntax errors and skipped-file reasons |
| Category | Meaning |
|---|---|
standard_library |
The root module is part of Python's standard library. |
external |
The module is not recognized as standard-library or local. |
local |
The root module matches a discovered project module. |
relative |
The import uses one or more leading dots. |
unknown |
The module cannot be classified reliably. |
Note
Import classification is intentionally lightweight. It does not resolve virtual environments, installed distributions, namespace packages, dynamic imports, or every possible package layout.
The default limits are defined directly in the application and can be adjusted by developers.
| Setting | Default | Effect |
|---|---|---|
| Maximum file size | 3,000,000 bytes | Larger Python files are skipped. |
| Large-file threshold | 500 lines | Generates a maintainability finding. |
| High file complexity | 25 | Generates a file-complexity finding. |
| High symbol complexity | 10 | Generates a symbol-complexity finding. |
| Deep nesting | 5 levels | Generates a nesting finding. |
| Custom message length | 1,000 characters | Longer messages cannot be saved. |
| Severity | Typical meaning |
|---|---|
critical |
A fundamental problem, such as a syntax error. |
high |
A strong maintainability concern requiring attention. |
medium |
A relevant issue that should be reviewed. |
low |
A minor quality, documentation, or maintenance issue. |
info |
An architectural observation without a direct penalty. |
- File skipped because it exceeds the configured size limit.
- Python syntax error.
- Very large source file.
- High file complexity.
- Complex class, function, async function, or method.
- Deep nesting.
- Missing module docstring.
- Public symbols without docstrings.
- Open TODO or FIXME-style markers.
- Wildcard import.
- Public symbol name appearing in at least three different files.
The built-in visitor starts with a base complexity of 1 and increases the value for control-flow constructs such as:
ifforandasync forwhiletrywithandasync with- conditional expressions
- assertions
- comprehensions
match- exception handlers
- additional Boolean operands
This is a practical heuristic inspired by cyclomatic complexity, but it is not guaranteed to produce the same values as tools such as Radon, Ruff, or SonarQube.
The dashboard calculates a quality index between 0 and 100.
| Severity | Penalty per finding |
|---|---|
| Critical | 18 |
| High | 9 |
| Medium | 4 |
| Low | 1 |
| Info | 0 |
Documentation coverage combines:
- 70% public-symbol documentation coverage.
- 30% module documentation coverage.
The resulting documentation percentage contributes a bonus of up to 15 points before the final result is restricted to the range from 0 to 100.
Conceptually:
quality score = clamp(100 - finding penalties + documentation bonus, 0, 100)
Caution
The quality index is a project-orientation metric, not an objective certification of source-code quality or security.
The integrated editor allows files from the current analysis to be opened directly from the Files page.
- Double-click a file row.
- Select a row and press
Enter.
- Save the current file.
- Save the content under a different path.
- Reload the file from disk.
- Find text.
- Replace text.
- Jump to a specific line.
- Select all content.
- Undo and redo changes.
- Display line, column, encoding, and character count.
- Warn about unsaved changes before closing.
- Detect whether the source file changed outside the editor.
- Ask for confirmation before overwriting the original project file.
The editor reads and writes text as UTF-8. After saving a source file, run the project analysis again to update metrics and findings.
Warning
The editor can overwrite project files. Use version control and commit or back up important work before editing.
Every successfully completed analysis is stored automatically in a local SQLite database.
~/.codebase_cartographer/codebase_cartographer.sqlite3
On Windows, ~ normally resolves to the current user's profile directory.
- Scan ID.
- Project path.
- Analysis timestamp.
- Custom message.
- File count.
- Finding count.
- Quality score.
- Complete serialized analysis payload.
- Application version.
- Database creation timestamp.
- List saved scans.
- Refresh the archive view.
- Load a selected scan into the interface.
- Open a scan by double-clicking it.
- Delete a selected scan permanently.
- Export one scan as JSON.
- Export one scan as Markdown.
- Export the complete database as a password-protected
.ccdbpackage. - Import a password-protected
.ccdbpackage.
SQLite is configured with foreign-key enforcement, Write-Ahead Logging, and normal synchronous mode.
Full database exports use the custom .ccdb package format.
- Encryption: AES-256-GCM.
- Key derivation: PBKDF2-HMAC-SHA-256.
- Derived key length: 32 bytes.
- PBKDF2 iterations: 390,000.
- Random salt: 16 bytes.
- Random nonce: 12 bytes.
- Authentication: built into AES-GCM.
- Package header is authenticated as additional data.
Before an imported database replaces the current local database:
- The current SQLite WAL is checkpointed.
- A temporary backup of the existing database is created.
- The
.ccdbpackage header is validated. - The package is decrypted with the entered password.
- SQLite performs an integrity check on the decrypted temporary database.
- The validated database replaces the active database.
- The backup is restored if an error occurs during the process.
Important
Passwords are not recoverable. A lost password means the encrypted .ccdb package cannot be decrypted by the application.
The analyzer works on local files. The application does not contain a feature that uploads source code, project files, reports, or database records to a remote analysis service.
- Selected project path.
- Source-code analysis.
- Generated findings.
- Reports until the user exports or moves them.
- SQLite archive.
- Custom messages.
- The regular SQLite database at
~/.codebase_cartographer/codebase_cartographer.sqlite3is stored as a normal local SQLite file. - Password-based AES-256-GCM protection applies to exported
.ccdbpackages. - The source-code editor can modify original files.
- The GitHub button opens the configured BylickiLabs profile in the system browser.
Users are responsible for operating-system permissions, disk encryption, backups, password management, and access control to the local user account.
- Python 3.10 or newer.
- Tk support for the installed Python version.
- A graphical desktop environment.
- Read access to the project being analyzed.
- Write access for editor saves, exports, and the local database directory.
customtkinter
cryptography
The remaining imported modules are part of the Python standard library.
| Platform | Notes |
|---|---|
| Windows | Python from python.org normally includes Tk. Project folders are opened through the Windows shell. |
| Linux | Tk may require a separate distribution package. Folders are opened with xdg-open. |
| macOS | Tk must be available to Python. Folders are opened with the open command. |
git clone https://github.com/bylickilabs/codebase_cartographer.git
cd codebase_cartographerReplace codebase_cartographer with the actual repository name.
py -m venv .venv
.\.venv\Scripts\Activate.ps1py -m venv .venv
.venv\Scripts\activate.batpython3 -m venv .venv
source .venv/bin/activatepython -m pip install --upgrade pippip install customtkinter cryptographyRecommended requirements.txt:
customtkinter
cryptography
Install from the file with:
pip install -r requirements.txtDebian or Ubuntu example:
sudo apt update
sudo apt install python3-tkThe exact package name depends on the Linux distribution.
Assuming the application file is named codebase_cartographer.py:
python codebase_cartographer.pyOn Windows, this may also be used:
py codebase_cartographer.pyThe program starts the CompleteCodebaseCartographerApplication and opens the graphical interface.
- Start Codebase Cartographer.
- Select Select project.
- Choose an existing Python project directory.
- Select Start analysis.
- Review the dashboard, files, symbols, dependencies, findings, and report pages.
- Add an optional custom message of up to 1,000 characters.
- Save the message after a scan has been created.
- Open the Files page.
- Select a file.
- Double-click the file or press
Enter. - Make the required changes.
- Save or use Save As.
- Run the analysis again to refresh all metrics.
- Open the Database page.
- Select a scan.
- Choose Load scan or double-click the archive row.
- Review the restored analysis and custom message.
- Open the Database page.
- Choose Export database.
- Select a destination ending in
.ccdb. - Enter and confirm a strong password.
- Store the password separately and securely.
- Open the Database page.
- Choose Import database.
- Confirm that the current local database may be replaced.
- Select a
.ccdbpackage. - Enter its password.
- Wait for decryption and the SQLite integrity check to complete.
| Page | Purpose |
|---|---|
| Dashboard | Shows core metrics, project information, top dependencies, complex files, and the custom message. |
| Files | Lists analyzed files with size, lines, symbols, imports, complexity, and status. |
| Structure | Lists classes, functions, async functions, and methods with location and documentation state. |
| Dependencies | Aggregates imported modules, categories, usage counts, and referencing files. |
| Findings | Displays prioritized findings, descriptions, file locations, and recommendations. |
| Report | Shows the generated report and provides JSON and Markdown export actions. |
| Database | Lists archived scans and provides archive, scan-export, database-export, and database-import actions. |
- Project selection.
- Start analysis.
- Open selected project folder.
- Switch between German and English.
- Switch appearance mode.
- Open the BylickiLabs GitHub page.
- Open application information.
The JSON representation includes application metadata, project information, totals, files, symbols, imports, findings, archive information, and the custom message where applicable.
JSON is suitable for:
- Automated processing.
- Additional reporting.
- Data migration.
- Integration with internal tooling.
- Long-term structured storage.
The Markdown report provides a human-readable project summary that can be used in:
- GitHub issues.
- Pull requests.
- Project documentation.
- Review notes.
- Internal technical reports.
The extended report also contains the custom message and scan ID.
A .ccdb file contains an encrypted copy of the complete local SQLite database. It is intended for backup or transfer between installations of Codebase Cartographer.
The recursive scanner excludes hidden directories and the following directory names by default:
.git
.github
.hg
.svn
.idea
.vscode
.venv
venv
env
__pycache__
.pytest_cache
.mypy_cache
.ruff_cache
.tox
.nox
node_modules
site-packages
dist
build
Other non-Python files are counted as ignored files but are not analyzed.
Python files larger than 3,000,000 bytes are recorded as skipped and produce a low-severity finding.
The current implementation is designed as a single-file desktop application. Its internal responsibilities are separated through data classes, visitors, utility functions, UI components, persistence services, and specialized windows.
| Component | Responsibility |
|---|---|
SymbolInformation |
Stores details about a discovered code symbol. |
ImportInformation |
Stores details about an import statement. |
Finding |
Represents a prioritized analysis finding. |
FileAnalysis |
Stores all collected metrics for one file. |
ProjectAnalysis |
Aggregates project results and calculates totals. |
ComplexityVisitor |
Calculates heuristic complexity and nesting values. |
PythonStructureVisitor |
Extracts classes, functions, methods, and imports from the AST. |
| Analysis functions | Discover files, parse source, count lines, detect markers, and create findings. |
ModernTreeview |
Provides reusable tabular views with scrollbars. |
MetricCard |
Displays dashboard metrics. |
CodebaseCartographerApplication |
Implements the base analyzer interface and report workflow. |
| Serialization functions | Convert project analyses to and from JSON-compatible dictionaries. |
CodebaseDatabaseManager |
Creates and manages the SQLite archive. |
| Cryptographic functions | Derive keys and import or export protected database packages. |
DatabasePasswordDialog |
Collects database package passwords. |
SourceCodeEditorWindow |
Implements integrated file editing. |
CompleteCodebaseCartographerApplication |
Combines analysis, editor, custom messages, and database archive. |
Select project
↓
Discover eligible Python files
↓
Collect project module names
↓
Read and parse each file
↓
Extract symbols and imports
↓
Calculate lines, complexity, nesting, and documentation
↓
Create prioritized findings
↓
Calculate project totals and quality index
↓
Render views and reports
↓
Automatically archive the completed scan in SQLite
A project analysis contains:
- Project path.
- Generation timestamp.
- List of file analyses.
- List of findings.
- Ignored-file count.
- Excluded-directory configuration.
A file analysis contains:
- Absolute and relative paths.
- Module name.
- File size.
- Total, code, comment, and blank lines.
- Module-docstring state.
- Symbols.
- Imports.
- TODO-style markers.
- Complexity.
- Maximum nesting.
- Syntax error or skipped reason.
The project_scans table stores:
id
project_path
generated_at
custom_message
file_count
finding_count
quality_score
payload_json
application_version
created_atIndexes are created for project path and generation time.
- Only
.pyfiles are analyzed. - Analysis is static and does not inspect runtime behavior.
- Dynamic imports may not be detected.
- Import classification is heuristic.
- The line counter does not fully replicate Python tokenization semantics.
- Multiline strings are counted as code, including docstrings.
- Complexity values are application-specific heuristics.
- Duplicate-symbol detection is based on matching public names across at least three files.
- The tool does not create a complete call graph or dependency graph.
- It does not resolve inheritance, decorators, type aliases, generated code, or monkey patching in depth.
- It does not replace Ruff, Flake8, Pylint, MyPy, Pyright, Bandit, pytest, coverage tools, or dedicated security scanners.
- The editor is a practical text editor, not a full IDE or Language Server Protocol client.
- Archived scan paths may point to files that were moved, renamed, or deleted after the scan.
- The local SQLite database is not encrypted at rest by the application.
Install the dependency in the same Python environment used to start the application:
python -m pip install customtkinterpython -m pip install cryptographyInstall the Tk package for the operating system. Debian or Ubuntu example:
sudo apt install python3-tkCheck the executable and package installation:
python --version
python -m pip show customtkinter cryptographyVerify that:
- The file ends in
.py. - The file is not located in an excluded or hidden directory.
- The file does not exceed the configured maximum size.
- The selected project directory is correct.
Open the file in the integrated editor or an IDE and correct the reported line and column. Other structural metrics for that file should not be treated as complete until the syntax error is fixed.
Another process modified the file after it was opened. Compare the versions before choosing whether to overwrite it.
Possible causes:
- Incorrect password.
- Damaged or incomplete package.
- The selected file is not a valid Codebase Cartographer database package.
- Insufficient write permissions for the application data directory.
Saving a file does not automatically rerun the complete project analysis. Start the analysis again.
python -m venv .venvActivate the environment and install dependencies:
python -m pip install --upgrade pip
pip install customtkinter cryptographyRun a syntax compilation check:
python -m py_compile codebase_cartographer.pyRun the application:
python codebase_cartographer.pycodebase-cartographer/
├── codebase_cartographer.py
├── README.md
├── LICENSE
├── requirements.txt
├── .gitignore
└── screenshots/
Suggested .gitignore entries:
__pycache__/
*.py[cod]
.venv/
venv/
env/
.pytest_cache/
.mypy_cache/
.ruff_cache/
build/
dist/
*.sqlite3
*.sqlite3-wal
*.sqlite3-shm
*.ccdb- Move the single-file implementation into focused modules.
- Add automated unit and integration tests.
- Add configurable thresholds through the UI.
- Add CSV and HTML report exports.
- Add syntax highlighting to the editor.
- Add a project dependency graph.
- Add change comparison between archived scans.
- Add ignore-pattern configuration.
- Add packaging for Windows, Linux, and macOS.
- Add CI workflows for linting, tests, and releases.
Contributions should be focused, traceable, and tested.
- Fork the repository.
- Create a feature branch.
- Implement the change with clear naming and documentation.
- Verify that the application starts and the affected workflows operate correctly.
- Add or update tests where available.
- Update this README when behavior, dependencies, security properties, or user workflows change.
- Submit a pull request with a precise description of the change.
Example branch name:
feature/configurable-analysis-thresholds
Example commit message:
feat: add configurable complexity thresholds
For security-sensitive issues, avoid publishing exploit details in a public issue before the maintainer has had an opportunity to review them.
The application declares the MIT License.
A repository should include a complete LICENSE file containing the official MIT License text and the applicable copyright notice.
Codebase Cartographer
Copyright © 2026 Thorsten Bylicki / BylickiLabs
Codebase Cartographer ist eine zweisprachige Desktop-Anwendung zur statischen Analyse von Python-Projekten. Die Anwendung verwendet den abstrakten Syntaxbaum von Python (ast) und muss den analysierten Projektcode daher weder importieren noch ausführen.
Die Software richtet sich an Entwickler, Maintainer, Reviewer, Lehrende und Teams, die sich schnell einen strukturierten Überblick über eine unbekannte oder wachsende Python-Codebasis verschaffen möchten. Analyse, Qualitätsindikatoren, Befunde, Quelltextbearbeitung, Berichtserstellung und historische Archivierung werden in einer lokalen Benutzeroberfläche zusammengeführt.
- Schneller struktureller Überblick über Python-Projekte.
- Erkennung möglicher Wartungs- und Dokumentationsrisiken.
- Darstellung und Klassifizierung von Abhängigkeiten.
- Frühe Erkennung von Syntaxfehlern.
- Lokale Kontrolle über Quellcode und Analyseergebnisse.
- Dauerhafte Speicherung abgeschlossener Analysen.
- Direkte Bearbeitung ausgewählter Projektdateien.
- Exportierbare Berichte für Dokumentation und Reviews.
Important
Codebase Cartographer liefert heuristische Kennzahlen und statische Befunde. Die Anwendung ersetzt keine Tests, Sicherheitsaudits, Typprüfung, Laufzeitanalyse, professionellen Code-Review oder spezialisierte Qualitätssicherungswerkzeuge.
- Rekursive Erkennung von Python-Dateien.
- Analyse des Quellcodes mit dem Python-Modul
ast. - Kein Import und keine Ausführung analysierter Projektmodule.
- Ermittlung von Gesamt-, Code-, Kommentar- und Leerzeilen.
- Erkennung von Syntaxfehlern einschließlich Zeile und Spalte.
- Extraktion von Modulen, Klassen, Funktionen, asynchronen Funktionen und Methoden.
- Erfassung von Position, übergeordnetem Symbol, Docstring, Komplexität und Verschachtelung.
- Extraktion von Importen und importierten Namen.
- Klassifizierung von Importen als Standardbibliothek, extern, lokal, relativ oder unbekannt.
- Erkennung von Wildcard-Importen.
- Erkennung von
TODO,FIXME,HACKundXXX.
- Komplexität auf Dateiebene.
- Komplexität einzelner Symbole.
- Maximale Verschachtelungstiefe.
- Erkennung sehr großer Dateien.
- Fehlende Modul-Docstrings.
- Fehlende Docstrings öffentlicher Symbole.
- Wiederholte öffentliche Symbolnamen in mehreren Dateien.
- Priorisierte Befunde von informativ bis kritisch.
- Berechnete Dokumentationsquote und Qualitätsindex.
- Moderne Benutzeroberfläche mit CustomTkinter.
- Dunkle, helle und systemabhängige Darstellung.
- Umschaltung zwischen Deutsch und Englisch während der Laufzeit.
- Dashboard mit Projektkennzahlen.
- Filterbare Datei-, Struktur- und Befundansichten.
- Übersicht der Abhängigkeiten.
- Ausführliche Berichtsdarstellung.
- Plattformübergreifendes Öffnen des Projektordners.
- Analyse in einem Hintergrund-Thread für eine reaktionsfähige Oberfläche.
- Integrierter UTF-8-Quelltexteditor.
- Öffnen von Dateien per Doppelklick oder
Enter. - Speichern, Speichern unter, Neuladen, Suchen, Ersetzen, Zeilensprung, Rückgängig und Wiederholen.
- Erkennung extern veränderter Dateien vor dem Überschreiben.
- Export von JSON- und Markdown-Berichten.
- Automatische Speicherung jeder abgeschlossenen Analyse in SQLite.
- Benutzerdefinierte Projekt- oder Analysemitteilung mit maximal 1.000 Zeichen.
- Laden, Löschen, Aktualisieren und Exportieren archivierter Scans.
- Passwortgeschützter Export und Import der vollständigen Datenbank.
Codebase Cartographer analysiert derzeit Dateien mit folgender Erweiterung:
.py
Für jede geeignete Python-Datei können folgende Informationen ermittelt werden:
| Bereich | Erfasste Informationen |
|---|---|
| Datei | Absoluter Pfad, relativer Pfad, Modulname, Größe, Zeilenzahlen, Status |
| Struktur | Klassen, Funktionen, Async-Funktionen und Methoden |
| Symbole | Name, Typ, Startzeile, Endzeile, übergeordnetes Symbol, Docstring, Komplexität, Verschachtelung |
| Importe | Modul, importierte Namen, Zeile, Kategorie, Wildcard-Status |
| Dokumentation | Modul-Docstring und Docstrings öffentlicher Symbole |
| Wartung | TODO-, FIXME-, HACK- und XXX-Markierungen |
| Komplexität | Dateikomplexität, Symbolkomplexität, maximale Verschachtelung |
| Fehler | Python-Syntaxfehler und Gründe für übersprungene Dateien |
| Kategorie | Bedeutung |
|---|---|
standard_library |
Das Stammmodul gehört zur Python-Standardbibliothek. |
external |
Das Modul wurde weder als Standardbibliothek noch als lokales Modul erkannt. |
local |
Das Stammmodul entspricht einem erkannten Projektmodul. |
relative |
Der Import verwendet mindestens einen führenden Punkt. |
unknown |
Das Modul kann nicht zuverlässig klassifiziert werden. |
Note
Die Importklassifizierung ist bewusst leichtgewichtig. Virtuelle Umgebungen, installierte Distributionen, Namespace-Packages, dynamische Importe und sämtliche denkbaren Paketstrukturen werden nicht vollständig aufgelöst.
Die Standardgrenzwerte sind direkt in der Anwendung definiert und können durch Entwickler angepasst werden.
| Einstellung | Standardwert | Auswirkung |
|---|---|---|
| Maximale Dateigröße | 3.000.000 Byte | Größere Python-Dateien werden übersprungen. |
| Grenzwert für große Dateien | 500 Zeilen | Erzeugt einen Wartbarkeitsbefund. |
| Hohe Dateikomplexität | 25 | Erzeugt einen Dateikomplexitätsbefund. |
| Hohe Symbolkomplexität | 10 | Erzeugt einen Symbolkomplexitätsbefund. |
| Tiefe Verschachtelung | 5 Ebenen | Erzeugt einen Verschachtelungsbefund. |
| Benutzerdefinierte Meldung | 1.000 Zeichen | Längere Meldungen können nicht gespeichert werden. |
| Priorität | Typische Bedeutung |
|---|---|
critical |
Grundlegendes Problem, beispielsweise ein Syntaxfehler. |
high |
Deutliches Wartbarkeitsrisiko mit Handlungsbedarf. |
medium |
Relevanter Sachverhalt, der geprüft werden sollte. |
low |
Kleineres Qualitäts-, Dokumentations- oder Wartungsthema. |
info |
Architektonischer Hinweis ohne direkten Punktabzug. |
- Datei aufgrund des Größenlimits übersprungen.
- Python-Syntaxfehler.
- Sehr große Quelldatei.
- Hohe Dateikomplexität.
- Komplexe Klasse, Funktion, Async-Funktion oder Methode.
- Tiefe Verschachtelung.
- Fehlender Modul-Docstring.
- Öffentliche Symbole ohne Docstring.
- Offene TODO-, FIXME-, HACK- oder XXX-Markierungen.
- Wildcard-Import.
- Öffentlicher Symbolname in mindestens drei verschiedenen Dateien.
Der integrierte Visitor beginnt mit einer Basiskomplexität von 1 und erhöht den Wert unter anderem für:
ifforundasync forwhiletrywithundasync with- bedingte Ausdrücke
- Assertions
- Comprehensions
match- Exception-Handler
- zusätzliche boolesche Operanden
Die Berechnung ist eine praxisorientierte Heuristik in Anlehnung an zyklomatische Komplexität. Die Ergebnisse müssen nicht mit Radon, Ruff, SonarQube oder anderen Analysewerkzeugen übereinstimmen.
Das Dashboard berechnet einen Qualitätsindex zwischen 0 und 100.
| Priorität | Abzug pro Befund |
|---|---|
| Kritisch | 18 |
| Hoch | 9 |
| Mittel | 4 |
| Niedrig | 1 |
| Info | 0 |
Die Dokumentationsquote setzt sich zusammen aus:
- 70 % Dokumentationsquote öffentlicher Symbole.
- 30 % Dokumentationsquote der Module.
Die resultierende Dokumentationsquote kann einen Bonus von maximal 15 Punkten beitragen. Das Endergebnis wird anschließend auf den Wertebereich von 0 bis 100 begrenzt.
Vereinfacht:
Qualitätsindex = Begrenzung(100 - Befundabzüge + Dokumentationsbonus, 0, 100)
Caution
Der Qualitätsindex dient der Projektorientierung. Er ist keine objektive Zertifizierung von Quellcodequalität oder Sicherheit.
Der integrierte Editor öffnet Dateien der aktuellen Analyse direkt aus der Seite Dateien.
- Dateizeile doppelt anklicken.
- Dateizeile auswählen und
Enterdrücken.
- Aktuelle Datei speichern.
- Inhalt unter einem anderen Pfad speichern.
- Datei vom Datenträger neu laden.
- Text suchen.
- Text ersetzen.
- Zu einer bestimmten Zeile springen.
- Gesamten Inhalt auswählen.
- Änderungen rückgängig machen und wiederholen.
- Anzeige von Zeile, Spalte, Kodierung und Zeichenzahl.
- Warnung vor ungespeicherten Änderungen beim Schließen.
- Erkennung externer Dateiänderungen.
- Bestätigung vor dem Überschreiben der Originaldatei im Projektverzeichnis.
Der Editor liest und schreibt UTF-8-Text. Nach dem Speichern muss die Projektanalyse erneut gestartet werden, damit Kennzahlen und Befunde aktualisiert werden.
Warning
Der Editor kann Originaldateien des Projekts überschreiben. Wichtige Änderungen sollten zuvor versioniert oder gesichert werden.
Jede erfolgreich abgeschlossene Analyse wird automatisch in einer lokalen SQLite-Datenbank gespeichert.
~/.codebase_cartographer/codebase_cartographer.sqlite3
Unter Windows verweist ~ normalerweise auf das Profilverzeichnis des aktuellen Benutzers.
- Scan-ID.
- Projektpfad.
- Analysezeitpunkt.
- Benutzerdefinierte Meldung.
- Anzahl der Dateien.
- Anzahl der Befunde.
- Qualitätsindex.
- Vollständige serialisierte Analyse.
- Anwendungsversion.
- Erstellungszeitpunkt des Datenbankeintrags.
- Gespeicherte Scans anzeigen.
- Archivansicht aktualisieren.
- Ausgewählten Scan in die Oberfläche laden.
- Scan per Doppelklick öffnen.
- Ausgewählten Scan dauerhaft löschen.
- Einzelnen Scan als JSON exportieren.
- Einzelnen Scan als Markdown exportieren.
- Gesamte Datenbank als passwortgeschütztes
.ccdb-Paket exportieren. - Passwortgeschütztes
.ccdb-Paket importieren.
SQLite wird mit Fremdschlüsselprüfung, Write-Ahead Logging und normalem Synchronisationsmodus betrieben.
Vollständige Datenbankexporte verwenden das anwendungsspezifische .ccdb-Format.
- Verschlüsselung: AES-256-GCM.
- Schlüsselableitung: PBKDF2-HMAC-SHA-256.
- Abgeleitete Schlüssellänge: 32 Byte.
- PBKDF2-Iterationen: 390.000.
- Zufälliger Salt: 16 Byte.
- Zufällige Nonce: 12 Byte.
- Authentifizierung: Bestandteil von AES-GCM.
- Der Paketkopf wird als zusätzliche authentifizierte Information einbezogen.
Bevor eine importierte Datenbank die lokale Datenbank ersetzt:
- Das aktuelle SQLite-WAL wird in die Datenbank übertragen.
- Eine temporäre Sicherung der bestehenden Datenbank wird erstellt.
- Der Paketkopf der
.ccdb-Datei wird geprüft. - Das Paket wird mit dem eingegebenen Passwort entschlüsselt.
- SQLite führt eine Integritätsprüfung der temporären Datenbank durch.
- Die geprüfte Datenbank ersetzt die aktive Datenbank.
- Bei einem Fehler wird die Sicherung wiederhergestellt.
Important
Passwörter können nicht wiederhergestellt werden. Ohne das korrekte Passwort kann ein verschlüsseltes .ccdb-Paket nicht durch die Anwendung entschlüsselt werden.
Die Analyse erfolgt auf lokalen Dateien. Die Anwendung enthält keine Funktion, die Quellcode, Projektdateien, Berichte oder Datenbankeinträge an einen externen Analysedienst überträgt.
- Ausgewählter Projektpfad.
- Quellcodeanalyse.
- Erzeugte Befunde.
- Berichte, solange der Benutzer sie nicht exportiert oder verschiebt.
- SQLite-Archiv.
- Benutzerdefinierte Meldungen.
- Die reguläre SQLite-Datenbank unter
~/.codebase_cartographer/codebase_cartographer.sqlite3wird als normale lokale SQLite-Datei gespeichert. - Die passwortbasierte AES-256-GCM-Verschlüsselung gilt für exportierte
.ccdb-Pakete. - Der Quelltexteditor kann Originaldateien verändern.
- Die GitHub-Schaltfläche öffnet das konfigurierte BylickiLabs-Profil im Standardbrowser.
Der Benutzer ist für Betriebssystemberechtigungen, Datenträgerverschlüsselung, Sicherungen, Passwortverwaltung und den Schutz des lokalen Benutzerkontos verantwortlich.
- Python 3.10 oder neuer.
- Tk-Unterstützung für die verwendete Python-Installation.
- Grafische Desktop-Umgebung.
- Leserechte für das zu analysierende Projekt.
- Schreibrechte für Editor-Speicherungen, Exporte und das lokale Datenbankverzeichnis.
customtkinter
cryptography
Alle weiteren importierten Module gehören zur Python-Standardbibliothek.
| Plattform | Hinweise |
|---|---|
| Windows | Python von python.org enthält Tk normalerweise bereits. Projektordner werden über die Windows-Shell geöffnet. |
| Linux | Tk muss gegebenenfalls als separates Distributionspaket installiert werden. Ordner werden mit xdg-open geöffnet. |
| macOS | Tk muss für Python verfügbar sein. Ordner werden mit dem Befehl open geöffnet. |
git clone https://github.com/bylickilabs/codebase_cartographer.git
cd codebase_cartographercodebase_cartographer muss durch den tatsächlichen Repository-Namen ersetzt werden.
py -m venv .venv
.\.venv\Scripts\Activate.ps1py -m venv .venv
.venv\Scripts\activate.batpython3 -m venv .venv
source .venv/bin/activatepython -m pip install --upgrade pippip install customtkinter cryptographyEmpfohlene requirements.txt:
customtkinter
cryptography
Installation über die Datei:
pip install -r requirements.txtBeispiel für Debian oder Ubuntu:
sudo apt update
sudo apt install python3-tkDer genaue Paketname ist von der jeweiligen Linux-Distribution abhängig.
Sofern die Anwendungsdatei codebase_cartographer.py heißt:
python codebase_cartographer.pyUnter Windows kann alternativ verwendet werden:
py codebase_cartographer.pyDas Programm startet die Klasse CompleteCodebaseCartographerApplication und öffnet die grafische Oberfläche.
- Codebase Cartographer starten.
- Projekt auswählen anklicken.
- Einen vorhandenen Python-Projektordner auswählen.
- Analyse starten anklicken.
- Übersicht, Dateien, Struktur, Abhängigkeiten, Befunde und Bericht prüfen.
- Optional eine benutzerdefinierte Meldung mit maximal 1.000 Zeichen erfassen.
- Die Meldung speichern, nachdem ein Scan erstellt wurde.
- Seite Dateien öffnen.
- Datei auswählen.
- Datei doppelt anklicken oder
Enterdrücken. - Änderungen vornehmen.
- Speichern oder Speichern unter verwenden.
- Analyse erneut starten, um sämtliche Kennzahlen zu aktualisieren.
- Seite Datenbank öffnen.
- Scan auswählen.
- Scan laden anklicken oder den Archiveintrag doppelt anklicken.
- Wiederhergestellte Analyse und Meldung prüfen.
- Seite Datenbank öffnen.
- Datenbank exportieren auswählen.
- Zielpfad mit der Endung
.ccdbfestlegen. - Ein starkes Passwort eingeben und bestätigen.
- Passwort getrennt und sicher aufbewahren.
- Seite Datenbank öffnen.
- Datenbank importieren auswählen.
- Bestätigen, dass die lokale Datenbank ersetzt werden darf.
.ccdb-Paket auswählen.- Zugehöriges Passwort eingeben.
- Entschlüsselung und SQLite-Integritätsprüfung abschließen lassen.
| Seite | Zweck |
|---|---|
| Übersicht | Zeigt Kennzahlen, Projektinformationen, häufige Abhängigkeiten, komplexe Dateien und die benutzerdefinierte Meldung. |
| Dateien | Listet Dateien mit Größe, Zeilen, Symbolen, Importen, Komplexität und Status auf. |
| Struktur | Zeigt Klassen, Funktionen, Async-Funktionen und Methoden mit Position und Dokumentationsstatus. |
| Abhängigkeiten | Aggregiert importierte Module, Kategorien, Häufigkeiten und verwendende Dateien. |
| Befunde | Zeigt priorisierte Befunde, Beschreibungen, Dateipositionen und Empfehlungen. |
| Bericht | Zeigt den erzeugten Bericht und ermöglicht JSON- und Markdown-Exporte. |
| Datenbank | Zeigt archivierte Scans und stellt Archiv-, Scan-Export-, Datenbankexport- und Datenbankimportfunktionen bereit. |
- Projekt auswählen.
- Analyse starten.
- Projektordner öffnen.
- Zwischen Deutsch und Englisch wechseln.
- Darstellungsmodus wechseln.
- BylickiLabs-GitHub-Seite öffnen.
- Anwendungsinformationen anzeigen.
Die JSON-Darstellung enthält je nach Export Anwendungsmetadaten, Projektinformationen, Summen, Dateien, Symbole, Importe, Befunde, Archivinformationen und die benutzerdefinierte Meldung.
JSON eignet sich für:
- Automatisierte Weiterverarbeitung.
- Zusätzliche Berichte.
- Datenmigration.
- Integration in interne Werkzeuge.
- Strukturierte Langzeitablage.
Der Markdown-Bericht bietet eine lesbare Projektzusammenfassung für:
- GitHub-Issues.
- Pull Requests.
- Projektdokumentation.
- Review-Notizen.
- Interne technische Berichte.
Der erweiterte Bericht enthält zusätzlich die benutzerdefinierte Meldung und die Scan-ID.
Eine .ccdb-Datei enthält eine verschlüsselte Kopie der vollständigen lokalen SQLite-Datenbank. Das Format dient der Sicherung oder Übertragung zwischen Installationen von Codebase Cartographer.
Der rekursive Scanner schließt versteckte Verzeichnisse sowie standardmäßig folgende Verzeichnisnamen aus:
.git
.github
.hg
.svn
.idea
.vscode
.venv
venv
env
__pycache__
.pytest_cache
.mypy_cache
.ruff_cache
.tox
.nox
node_modules
site-packages
dist
build
Andere Nicht-Python-Dateien werden als ignorierte Dateien gezählt, jedoch nicht analysiert.
Python-Dateien mit mehr als 3.000.000 Byte werden als übersprungen erfasst und erzeugen einen Befund mit niedriger Priorität.
Die aktuelle Implementierung ist als Single-File-Desktop-Anwendung aufgebaut. Die Verantwortlichkeiten sind intern durch Datenklassen, AST-Visitor, Hilfsfunktionen, UI-Komponenten, Persistenzdienste und spezialisierte Fenster getrennt.
| Komponente | Verantwortung |
|---|---|
SymbolInformation |
Speichert Informationen zu einem erkannten Codesymbol. |
ImportInformation |
Speichert Informationen zu einem Import. |
Finding |
Repräsentiert einen priorisierten Analysebefund. |
FileAnalysis |
Enthält sämtliche Kennzahlen einer Datei. |
ProjectAnalysis |
Bündelt Projektergebnisse und berechnet Gesamtsummen. |
ComplexityVisitor |
Berechnet heuristische Komplexitäts- und Verschachtelungswerte. |
PythonStructureVisitor |
Extrahiert Klassen, Funktionen, Methoden und Importe aus dem AST. |
| Analysefunktionen | Erkennen Dateien, parsen Quellcode, zählen Zeilen, finden Markierungen und erzeugen Befunde. |
ModernTreeview |
Stellt wiederverwendbare Tabellenansichten mit Scrollbars bereit. |
MetricCard |
Zeigt Kennzahlen im Dashboard. |
CodebaseCartographerApplication |
Implementiert die grundlegende Analyseoberfläche und Berichtsfunktionen. |
| Serialisierungsfunktionen | Wandeln Analysen in JSON-kompatible Daten um und wieder zurück. |
CodebaseDatabaseManager |
Erstellt und verwaltet das SQLite-Archiv. |
| Kryptografiefunktionen | Leiten Schlüssel ab und importieren oder exportieren geschützte Datenbankpakete. |
DatabasePasswordDialog |
Erfasst Passwörter für Datenbankpakete. |
SourceCodeEditorWindow |
Implementiert die integrierte Dateibearbeitung. |
CompleteCodebaseCartographerApplication |
Verbindet Analyse, Editor, Meldungen und Datenbankarchiv. |
Projekt auswählen
↓
Geeignete Python-Dateien erkennen
↓
Projektmodule erfassen
↓
Dateien lesen und parsen
↓
Symbole und Importe extrahieren
↓
Zeilen, Komplexität, Verschachtelung und Dokumentation ermitteln
↓
Priorisierte Befunde erzeugen
↓
Gesamtsummen und Qualitätsindex berechnen
↓
Ansichten und Berichte darstellen
↓
Abgeschlossene Analyse automatisch in SQLite archivieren
Eine Projektanalyse enthält:
- Projektpfad.
- Erstellungszeitpunkt.
- Liste der Dateianalysen.
- Liste der Befunde.
- Anzahl ignorierter Dateien.
- Konfiguration ausgeschlossener Verzeichnisse.
Eine Dateianalyse enthält:
- Absoluten und relativen Pfad.
- Modulnamen.
- Dateigröße.
- Gesamt-, Code-, Kommentar- und Leerzeilen.
- Status des Modul-Docstrings.
- Symbole.
- Importe.
- TODO-ähnliche Markierungen.
- Komplexität.
- Maximale Verschachtelung.
- Syntaxfehler oder Grund für das Überspringen.
Die Tabelle project_scans speichert:
id
project_path
generated_at
custom_message
file_count
finding_count
quality_score
payload_json
application_version
created_atFür Projektpfad und Analysezeitpunkt werden Indizes angelegt.
- Es werden ausschließlich
.py-Dateien analysiert. - Die Analyse ist statisch und untersucht kein Laufzeitverhalten.
- Dynamische Importe können unentdeckt bleiben.
- Die Importklassifizierung ist heuristisch.
- Die Zeilenzählung bildet die vollständige Python-Tokenisierung nicht exakt ab.
- Mehrzeilige Zeichenketten einschließlich Docstrings werden als Code gezählt.
- Komplexitätswerte sind anwendungsspezifische Heuristiken.
- Doppelte Symbolnamen werden anhand öffentlicher Namen in mindestens drei Dateien erkannt.
- Die Anwendung erstellt keinen vollständigen Aufruf- oder Abhängigkeitsgraphen.
- Vererbung, Decorators, Typaliasse, generierter Code und Monkey Patching werden nicht tiefgreifend aufgelöst.
- Ruff, Flake8, Pylint, MyPy, Pyright, Bandit, pytest, Coverage-Werkzeuge und spezialisierte Sicherheitsscanner werden nicht ersetzt.
- Der Editor ist ein funktionaler Texteditor, jedoch keine vollständige IDE und kein Language-Server-Client.
- Pfade archivierter Scans können auf Dateien verweisen, die später verschoben, umbenannt oder gelöscht wurden.
- Die lokale SQLite-Datenbank wird durch die Anwendung nicht im Ruhezustand verschlüsselt.
Die Abhängigkeit muss in derselben Python-Umgebung installiert werden, mit der die Anwendung gestartet wird:
python -m pip install customtkinterpython -m pip install cryptographyDas Tk-Paket des Betriebssystems installieren. Beispiel für Debian oder Ubuntu:
sudo apt install python3-tkPython-Version und installierte Pakete prüfen:
python --version
python -m pip show customtkinter cryptographyFolgende Punkte prüfen:
- Die Datei endet auf
.py. - Die Datei liegt nicht in einem ausgeschlossenen oder versteckten Verzeichnis.
- Die Datei überschreitet nicht die maximale Dateigröße.
- Der richtige Projektordner wurde ausgewählt.
Die gemeldete Zeile und Spalte im integrierten Editor oder in einer IDE korrigieren. Weitere Strukturkennzahlen dieser Datei gelten erst nach der Korrektur als vollständig belastbar.
Ein anderer Prozess hat die Datei nach dem Öffnen verändert. Vor dem Überschreiben sollten beide Versionen verglichen werden.
Mögliche Ursachen:
- Falsches Passwort.
- Beschädigtes oder unvollständiges Paket.
- Die ausgewählte Datei ist kein gültiges Codebase-Cartographer-Datenbankpaket.
- Fehlende Schreibrechte für das Anwendungsdatenverzeichnis.
Das Speichern einer Datei startet nicht automatisch eine vollständige Projektanalyse. Die Analyse muss erneut ausgeführt werden.
python -m venv .venvUmgebung aktivieren und Abhängigkeiten installieren:
python -m pip install --upgrade pip
pip install customtkinter cryptographySyntaxprüfung durchführen:
python -m py_compile codebase_cartographer.pyAnwendung starten:
python codebase_cartographer.pycodebase-cartographer/
├── codebase_cartographer.py
├── README.md
├── LICENSE
├── requirements.txt
├── .gitignore
└── screenshots/
Empfohlene .gitignore-Einträge:
__pycache__/
*.py[cod]
.venv/
venv/
env/
.pytest_cache/
.mypy_cache/
.ruff_cache/
build/
dist/
*.sqlite3
*.sqlite3-wal
*.sqlite3-shm
*.ccdb- Single-File-Implementierung in fachlich getrennte Module aufteilen.
- Automatisierte Unit- und Integrationstests ergänzen.
- Grenzwerte über die Benutzeroberfläche konfigurierbar machen.
- CSV- und HTML-Berichte ergänzen.
- Syntaxhervorhebung in den Editor integrieren.
- Abhängigkeitsgraphen ergänzen.
- Unterschiede zwischen archivierten Scans darstellen.
- Konfigurierbare Ignore-Muster bereitstellen.
- Installationspakete für Windows, Linux und macOS erstellen.
- CI-Workflows für Linting, Tests und Releases ergänzen.
Beiträge sollten klar abgegrenzt, nachvollziehbar und geprüft sein.
- Repository forken.
- Feature-Branch erstellen.
- Änderung mit klaren Bezeichnungen und Dokumentation umsetzen.
- Startfähigkeit und betroffene Abläufe prüfen.
- Vorhandene Tests erweitern oder neue Tests ergänzen.
- README aktualisieren, wenn sich Verhalten, Abhängigkeiten, Sicherheitsmerkmale oder Bedienabläufe ändern.
- Pull Request mit präziser Beschreibung erstellen.
Beispiel für einen Branch-Namen:
feature/configurable-analysis-thresholds
Beispiel für eine Commit-Nachricht:
feat: add configurable complexity thresholds
Sicherheitsrelevante Schwachstellen sollten nicht sofort mit vollständigen Exploitdetails in einem öffentlichen Issue veröffentlicht werden.
Die Anwendung weist die MIT-Lizenz aus.
Das Repository sollte eine vollständige Datei LICENSE mit dem offiziellen Text der MIT-Lizenz und dem zutreffenden Urheberrechtshinweis enthalten.
Codebase Cartographer
Copyright © 2026 Thorsten Bylicki / BylickiLabs
