Local Code Assistant is a command-line tool designed to help developers manage and analyze their Python projects more efficiently. It provides various commands to interact with your project, such as generating documentation, analyzing dependencies, and providing insights into the codebase.
- Interactive Help: Provides detailed help and usage instructions for all available commands.
- Code Analysis: Generates comprehensive summaries of the project's structure, dependencies, and more.
- Readme Generation: Automatically generates a README.md file for your project, which can be previewed before saving.
- Dependency Management: Manages project dependencies through tools like
pipandsetuptools. - User-Friendly Interface: Uses a rich text interface to display information and interact with the user.
To use Local Code Assistant, you need the following:
- Python 3.7 or later
- pip (Python package installer)
Additionally, the following packages are required:
pip install -r requirements.txtThese dependencies include:
pathlib: For handling file system paths.tomli: For parsing TOML files.setuptools: For building and distributing Python packages.requests: For making HTTP requests (not used in this tool but often needed for other purposes).typer: For creating command-line interfaces.rich: For rich text formatting and terminal output.
To install Local Code Assistant, follow these steps:
-
Clone the Repository:
git clone https://github.com/yourusername/local_code_assistant.git cd local_code_assistant -
Install Dependencies:
pip install -r requirements.txt
-
Run the Tool:
python main.py --help
To generate a comprehensive README.md file for your project, use the following command:
python main.py readmeThis will create a README.md file in your project directory. You can preview it before saving by using the --preview option:
python main.py readme --previewTo analyze the dependencies of your project, use the following command:
python main.py analyzeThis will provide a detailed summary of the project's dependencies and their versions.
To get help on any command, use the --help option followed by the command name. For example:
python main.py ask --helpThe project structure is as follows:
local_code_assistant/
├── README.md
├── agent.py
├── codebase.py
├── main.py
├── pyproject.toml
├── requirements.txt
├── setup.py
└── uv.lock
README.md: The generated README file for the project.agent.py: Contains functions and classes that assist in various tasks, such as generating summaries and managing dependencies.codebase.py: Handles the logic for parsing and analyzing the project's codebase.main.py: The entry point of the application, where all commands are defined and executed.pyproject.toml: Specifies the build system requirements and other metadata.requirements.txt: Lists all the dependencies required by the project.setup.py: Provides instructions for building and installing the project.
Local Code Assistant does not require any configuration files. All settings can be managed through command-line options.
Contributions to Local Code Assistant are welcome! Please follow these guidelines:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeatureName). - Make your changes and commit them (
git commit -am 'Add some feature'). - Push to the branch (
git push origin feature/YourFeatureName). - Open a pull request.
Local Code Assistant is released under the MIT License. See the LICENSE file for more details.
This README provides a comprehensive overview of the project, its features, and how to use it. It also includes information on contributing to the project and its licensing.