@@ -6,15 +6,13 @@ A comprehensive static analysis tool for Python source code that provides symbol
66
77## Installation
88
9- This project uses [ uv] ( https://docs.astral.sh/uv/ ) for dependency management.
9+ ``` bash
10+ pip install codeanalyzer-python
11+ ```
1012
1113### Prerequisites
1214
13- - [ uv] ( https://docs.astral.sh/uv/getting-started/installation/ ) installed
14- - Python 3.12 or higher. You can use ` uv ` to install Python if it's not already installed:
15- ``` bash
16- uv python install 3.12
17- ```
15+ - Python 3.12 or higher
1816
1917#### System Package Requirements
2018
@@ -56,36 +54,22 @@ pyenv global 3.12.0 # or pyenv local 3.12.0 for project-specific
5654
5755> ** Note:** These packages are required as the tool uses Python's built-in ` venv ` module to create isolated environments for analysis.
5856
59- ### Setup
60-
61- 1 . Clone the repository:
62- ``` bash
63- git clone https://github.com/codellm-devkit/codeanalyzer-python
64- cd codeanalyzer-python
65- ```
66-
67- 2 . Install dependencies using uv:
68- ``` bash
69- uv sync --all-groups
70- ```
71- This will install all dependencies including development and test dependencies.
72-
7357## Usage
7458
7559The codeanalyzer provides a command-line interface for performing static analysis on Python projects.
7660
7761### Basic Usage
7862
7963``` bash
80- uv run codeanalyzer --input /path/to/python/project
64+ codeanalyzer --input /path/to/python/project
8165```
8266
8367### Command Line Options
8468
85- To view the available options and commands, run ` uv run codeanalyzer --help` . You should see output similar to the following:
69+ To view the available options and commands, run ` codeanalyzer --help ` . You should see output similar to the following:
8670
8771``` bash
88- ❯ uv run codeanalyzer --help
72+ ❯ codeanalyzer --help
8973
9074 Usage: codeanalyzer [OPTIONS] COMMAND [ARGS]...
9175
@@ -109,46 +93,46 @@ To view the available options and commands, run `uv run codeanalyzer --help`. Yo
10993
110941 . ** Basic analysis with symbol table:**
11195 ``` bash
112- uv run codeanalyzer --input ./my-python-project
96+ codeanalyzer --input ./my-python-project
11397 ```
11498
11599 This will print the symbol table to stdout in JSON format to the standard output. If you want to save the output, you can use the ` --output ` option.
116100
117101 ``` bash
118- uv run codeanalyzer --input ./my-python-project --output /path/to/analysis-results
102+ codeanalyzer --input ./my-python-project --output /path/to/analysis-results
119103 ```
120104
121105 Now, you can find the analysis results in ` analysis.json ` in the specified directory.
122106
1231072 . ** Toggle analysis levels with ` --analysis-level ` :**
124108 ``` bash
125- uv run codeanalyzer --input ./my-python-project --analysis-level 1 # Symbol table only
109+ codeanalyzer --input ./my-python-project --analysis-level 1 # Symbol table only
126110 ```
127111 Call graph analysis can be enabled by setting the level to ` 2 ` :
128112 ``` bash
129- uv run codeanalyzer --input ./my-python-project --analysis-level 2 # Symbol table + Call graph
113+ codeanalyzer --input ./my-python-project --analysis-level 2 # Symbol table + Call graph
130114 ```
131115 *** Note: The ` --analysis-level=2 ` is not yet implemented in this version.***
132116
1331173 . ** Analysis with CodeQL enabled:**
134118 ``` bash
135- uv run codeanalyzer --input ./my-python-project --codeql
119+ codeanalyzer --input ./my-python-project --codeql
136120 ```
137121 This will perform CodeQL-based analysis in addition to the standard symbol table generation.
138122
139123 *** Note: Not yet fully implemented. Please refrain from using this option until further notice.***
140124
1411254 . ** Eager analysis with custom cache directory:**
142126 ``` bash
143- uv run codeanalyzer --input ./my-python-project --eager --cache-dir /path/to/custom-cache
127+ codeanalyzer --input ./my-python-project --eager --cache-dir /path/to/custom-cache
144128 ```
145129 This will rebuild the analysis cache at every run and store it in ` /path/to/custom-cache/.codeanalyzer ` . The cache will be cleared by default after analysis unless you specify ` --keep-cache ` .
146130
147131 If you provide --cache-dir, the cache will be stored in that directory. If not specified, it defaults to ` .codeanalyzer ` in the current working directory (` $PWD ` ).
148132
1491335 . ** Quiet mode (minimal output):**
150134 ``` bash
151- uv run codeanalyzer --input /path/to/my-python-project --quiet
135+ codeanalyzer --input /path/to/my-python-project --quiet
152136 ```
153137
154138### Output
@@ -157,6 +141,32 @@ By default, analysis results are printed to stdout in JSON format. When using th
157141
158142## Development
159143
144+ This project uses [ uv] ( https://docs.astral.sh/uv/ ) for dependency management during development.
145+
146+ ### Development Setup
147+
148+ 1 . Install [ uv] ( https://docs.astral.sh/uv/getting-started/installation/ )
149+
150+ 2 . Clone the repository:
151+ ``` bash
152+ git clone https://github.com/codellm-devkit/codeanalyzer-python
153+ cd codeanalyzer-python
154+ ```
155+
156+ 3 . Install dependencies using uv:
157+ ``` bash
158+ uv sync --all-groups
159+ ```
160+ This will install all dependencies including development and test dependencies.
161+
162+ ### Running from Source
163+
164+ When developing, you can run the tool directly from source:
165+
166+ ``` bash
167+ uv run codeanalyzer --input /path/to/python/project
168+ ```
169+
160170### Running Tests
161171
162172``` bash
0 commit comments