Installation - auraz/autodoc_ai GitHub Wiki
Installation
This guide covers how to install and set up autodoc_ai
for both regular usage and development.
Requirements
- Python 3.8+
- uv for Python package management
- aicommit CLI tool
- ruff for linting and formatting
- An OpenAI API key for accessing GPT models
OpenAI API Key Setup
Before using the tool, you need to set up your OpenAI API key:
- Get an API key from OpenAI
- Set it as an environment variable:
# For bash/zsh
export OPENAI_API_KEY="your-api-key-here"
# For Windows Command Prompt
set OPENAI_API_KEY=your-api-key-here
# For Windows PowerShell
$env:OPENAI_API_KEY = "your-api-key-here"
For persistent storage, add it to your shell profile or use a .env
file (see Security for best practices).
Installation Options
Option 1: Install from PyPI (Recommended for Users)
uv pip install autodoc-ai
Option 2: Install from Source (Recommended for Contributors)
Clone the repository and install in development mode:
git clone https://github.com/auraz/autodoc_ai.git
cd autodoc_ai
just install
Development Environment Setup
Using Just Commands
The project uses Just as a command runner. Install it first:
# macOS
brew install just
# Or using cargo
cargo install just
Then set up the development environment:
just dev
This will:
- Create a virtual environment using uv
- Install the project in editable mode
- Install all development dependencies
Manual Setup
If you prefer manual setup:
# Create virtual environment
uv venv
# Activate it
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install in development mode
uv pip install -e ".[dev]"
Operating System Specific Notes
macOS
If using Homebrew:
brew install just uv
Linux
Install uv using the official installer:
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows
- Install uv from astral.sh
- Consider using WSL (Windows Subsystem for Linux) for a better experience
Verification
After installation, verify everything works correctly:
# Test that the command-line tool works
autodoc-ai --help
# For developers, run the test suite
just test
Troubleshooting
Common Issues
-
OpenAI API key not found:
- Check that the environment variable is correctly set
- Try restarting your terminal or IDE
-
aicommit not found:
- Install using:
brew install aicommit
(macOS) or follow aicommit installation guide
- Install using:
-
uv not found:
- Install using the official installer:
curl -LsSf https://astral.sh/uv/install.sh | sh
- Install using the official installer:
For other issues, please open an issue on GitHub.
Next Steps
- Check out the Usage guide to learn how to use the tool
- See Configuration for customization options
- Read Contributing if you want to contribute to the project