AutoDoc is a tool that simplifies and automates the documentation of Power BI reports, ideal for administrators and analysts seeking efficiency and precision.
- Power BI Model Upload: Support for
.pbitand.zipfiles. - Batch Processing: Upload and process multiple Power BI reports simultaneously, generating individual Excel and Word files for each report.
- Detailed Documentation: Automatic generation in Excel and Word, including tables, columns, measures, and data sources.
- Interactive Visualization: View data before downloading.
- Automation and Precision: Fast, reliable, and standardized process.
- Intelligent Chat about the Report: After generating or loading documentation, use the integrated chat to ask questions about tables, DAX measures, columns, and relationships in your Power BI model. The assistant responds based on the loaded report information, providing detailed and technical explanations.
graph TD
A[Start] --> B{Choose LLM model}
B -->|OpenAI GPT-4.1 nano| C[OpenAI GPT-4.1 mini]
B -->|Azure OpenAI GPT-41 nano| D[Azure OpenAI GPT-41 nano selected]
B -->|Anthropic Claude 3.7 Sonnet| E[Anthropic Claude 3.7 Sonnet selected]
B -->|Google Gemini 2.5 Pro| F[Google Gemini 2.5 Pro selected]
B -->|Llama 4| G[Llama 4 selected]
C --> H{Choose initial action}
D --> H
E --> H
F --> H
G --> H
H -->|Option 1| I[Upload Power BI model file]
H -->|Option 2| J[Fill information in sidebar]
I --> K{File type}
K -->|.pbit| L[Process .pbit file]
K -->|.zip| M[Process .zip file]
J --> N[App ID]
J --> O[Tenant ID]
J --> P[Secret Value]
L --> Q[Fill information in sidebar]
M --> Q
N --> R[Upload Power BI model file]
O --> R
P --> R
Q --> S[Generate detailed documentation]
R --> S
S --> T[Interactive data visualization]
T --> U{Choose output format}
U -->|Excel| V[Generate Excel document]
U -->|Word| W[Generate Word document]
V --> X[Download documentation]
W --> X
X --> Z[Use Chat for report questions]
Z --> Y[End]
- Fill in App ID, Tenant ID, and Secret Value in the sidebar.
- Upload one or multiple
.pbitor.zipfiles for batch processing. - View the data and download the documentation in Excel or Word.
- Batch Processing: When multiple files are uploaded, AutoDoc will process all reports and generate individual documentation files for each one.
- Access Chat: After processing the report, click the "💬 Chat" button to open the chat. Ask questions about tables, measures, columns, or relationships in your Power BI model. The assistant will respond based on the loaded data.
-
Clone the repository:
git clone https://github.com/LawrenceTeixeira/PBIAutoDoc.git cd AutoDoc -
Create and activate virtual environment:
python -m venv .venv # Windows .venv\Scripts\activate # macOS/Linux source .venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt pip install --no-cache-dir chunkipy
-
Configure environment variables (
.env):OPENAI_API_KEY=your_openai_api_key GROQ_API_KEY=your_groq_api_key AZURE_API_KEY=your_azure_api_key AZURE_API_BASE=your_endpoint # Example: https://<your alias>.openai.azure.com AZURE_API_VERSION=your_version # Example: 2024-02-15-preview GEMINI_API_KEY=your_gemini_api_key ANTHROPIC_API_KEY=your_anthropic_api_key STREAMLIT_WATCHER_IGNORE_MODULES="torch" AVAILABLE_MODELS=groq/meta-llama/llama-4-maverick-17b-128e-instruct,groq/openai/gpt-oss-120b,gpt-5-mini,gpt-5,azure/gpt-4.1-mini,gemini/gemini-2.5-flash-preview-04-17,claude-3-7-sonnet-20250219,deepseek/deepseek-chat DEFAULT_MODEL=groq/meta-llama/llama-4-maverick-17b-128e-instruct # If you want to run models locally with Ollama: https://ollama.com/search #OLLAMA_BASE_URL = "http://localhost:11434"
Check other providers: LiteLLM Providers
-
Run the application:
streamlit run app.py --server.fileWatcherType none python -X utf8 -m streamlit run app.py --server.fileWatcherType none
flyctl launch
flyctl deployflyctl auth login
flyctl auth logoutcurl -L https://fly.io/install.sh | sh
export PATH=/home/codespace/.fly/bin- Windows, macOS, or Linux
- Python 3.10+
- Internet connection
- Valid OpenAI API Key
AutoDoc is designed for data administrators and analysts who need to generate high-quality documentation for Power BI reports, using AI for clarity and detail.
Contributions are welcome! Open issues or pull requests to suggest improvements.
MIT. See LICENSE.
Contact: Form
Simplify and automate the documentation of your Power BI reports with AutoDoc.
