# 1. Clean previous builds
rm -rf build dist *.egg-info
# Windows: rmdir /s /q build dist & del /q *.egg-info

# 2. Install build tools
pip install build twine

# 3. Build the package
python -m build

# 4. Check the build
twine check dist/*

# 5. Upload to TestPyPI (recommended first)
twine upload --repository testpypi dist/*

# 6. Test installation
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple agentapps

# 7. Upload to PyPI (once tested)
twine upload dist/*
```
twine upload dist/agentapps-0.2.3-py3-none-any.whl
twine upload dist/agentapps-0.2.32-py3-none-any.whl

## ✅ Final Checklist

- [ ] All dependencies listed: `openai`, `ddgs`, `beautifulsoup4`, `requests`
- [ ] `setup.py` updated
- [ ] `requirements.txt` updated  
- [ ] `README.md` with examples
- [ ] Test locally: `pip install -e .`
- [ ] Build successfully: `python -m build`
- [ ] Test on TestPyPI first
- [ ] Upload to PyPI

## 📋 Package Structure
```
C:\projects\agentapps\
├── agentapps/
│   ├── __init__.py
│   ├── agent.py
│   ├── model.py
│   └── tools.py
├── setup.py              ← Updated
├── README.md             ← Updated
├── requirements.txt      ← Updated
├── LICENSE
└── MANIFEST.in