A tool to analyze codebase structure and summarize content to use with AI easily.
Project description
Code Context Analyzer
Analyze the structural context of codebases with file discovery, parsing, summarization, and CLI support.
Code Context Analyzer is a Python tool that inspects a codebase (local or GitHub) and provides a structured summary of its layout โ including modules, classes, functions, and constants โ with support for Python and JavaScript.
๐ง Features
- ๐ Codebase discovery with
.gitignorerespect - ๐ง Parsers for Python and JavaScript
- ๐ Clipboard export
- ๐จ๏ธ CLI output formatting with depth and hierarchy controls
- ๐ Supports local paths or GitHub URLs
- ๐งช Extensible parser and formatter architecture
๐ Installation
pip install code-context-analyzer
Or clone it with
git clone https://github.com/youruser/code-context-analyzer.git
cd code-context-analyzer
pip install .
๐งช Example Usage
cca /path/to/the/project
Or
cca /path/to/the/project --ignore assests/
Or
cca https://github.com/pallets/flask
๐ฆ Used configurable flags
| Flag | Description |
|---|---|
| -h --help | show this help message and exit |
| --branch | Branch name (for GitHub repos) default "main" |
| --ignore | Comma-separated ignore patterns (dist/*, *min.js/, main.py) |
| --max-files | Max files to analyze |
| --ignore-tests | Ignore all tests that start with 'tests' (true/false) |
| --no-clipboard | Do not copy to clipboard |
๐งฉ Architecture Overview
code_context_analyzer/
โโโ /
โ โโโ main.py
โ โโโ __init__.py
โโโ analyzer/
โ โโโ clipboard.py
โ โโโ discovery.py
โ โโโ __init__.py
โโโ analyzer\parsers/
โ โโโ base.py
โ โโโ js_parser.py
โ โโโ python_parser.py
โ โโโ __init__.py
โโโ cli/
โ โโโ __init__.py
โโโ dto/
โ โโโ models.py
โ โโโ __init__.py
โโโ formatters/
โ โโโ base.py
โ โโโ default.py
โ โโโ factory.py
โ โโโ html_formatter.py
โ โโโ json_formatter.py
โ โโโ yaml_formatter.py
โ โโโ __init__.py
โโโ repo_system/
โ โโโ handler.py
โ โโโ session.py
โ โโโ __init__.py
โโโ utils/
โโโ dto_converter.py
โโโ temp_dir.py
โโโ __init__.py
๐ ๏ธ Development
Install dev dependencies:
pip install -r requirements.txt
Run tests:
pytest
๐ Documentation
Generated using MkDocs Run locally:
pip install mkdocs
mkdocs serve
Or visit here for docs:
๐ชช License
MIT License ยฉ Md. Ahasanul Arafath
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file code_context_analyzer-0.3.3.tar.gz.
File metadata
- Download URL: code_context_analyzer-0.3.3.tar.gz
- Upload date:
- Size: 21.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b48dce653f8cde131e313988317d2224483e077096e7aca76cde831b6bdcb779
|
|
| MD5 |
a8bff2ce44558d6f942b85a87e7940a8
|
|
| BLAKE2b-256 |
1869470eb1c83094d9d1c928b548f58b8da424609d69d0da85a7966d675999a7
|
File details
Details for the file code_context_analyzer-0.3.3-py3-none-any.whl.
File metadata
- Download URL: code_context_analyzer-0.3.3-py3-none-any.whl
- Upload date:
- Size: 29.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73bf52f686eccc6a81be0b23218cace2c7bdfca817dd4ff89324023b54dbac25
|
|
| MD5 |
035efb7a348cebda2f3197e6f6247f0f
|
|
| BLAKE2b-256 |
7518ed42914f743baa6a815cc6733cb6492b4ce7cceffffbb0f0e85438da3b2a
|