This document describes how to publish new versions of Consoul to PyPI.
- PyPI account at https://pypi.org
- PyPI API token configured in Poetry
- Go to https://pypi.org/manage/account/token/
- Click "Add API token"
- Name:
consoul-publish - Scope: "Project: consoul" (or "Entire account")
- Copy the token (starts with
pypi-)
poetry config pypi-token.pypi YOUR_TOKEN_HEREOr use environment variable:
export PYPI_TOKEN=your-token-here
poetry config pypi-token.pypi $PYPI_TOKENEdit pyproject.toml and update the version number in both locations:
[project]
version = "0.1.1"
[tool.poetry]
version = "0.1.1"Document changes in CHANGELOG.md following the existing format.
git add pyproject.toml CHANGELOG.md
git commit -m "chore: bump version to 0.1.1"
git tag v0.1.1poetry buildThis creates:
dist/consoul-X.Y.Z.tar.gz(source distribution)dist/consoul-X.Y.Z-py3-none-any.whl(wheel)
poetry publishgit push origin develop
git push origin v0.1.1Check the package page: https://pypi.org/project/consoul/
Test installation:
pip install --upgrade consoulUsers can install Consoul with different feature sets:
# SDK only (core dependencies)
pip install consoul
# With TUI
pip install consoul[tui]
# With specific features
pip install consoul[ollama-library]
pip install consoul[pdf]
# All features
pip install consoul[all]Re-configure your PyPI token:
poetry config pypi-token.pypi YOUR_NEW_TOKENYou cannot republish the same version. Bump the version number and try again.
Ensure your environment is clean:
rm -rf dist/
poetry buildTo test publishing without affecting the production PyPI:
# Configure TestPyPI token
poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry config pypi-token.testpypi YOUR_TEST_TOKEN
# Publish to TestPyPI
poetry publish -r testpypi
# Test installation
pip install --index-url https://test.pypi.org/simple/ consoul